php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76267 pg_escape_string, pg_send_query will cause a segfault in some rare cases
Submitted: 2018-04-25 14:34 UTC Modified: 2018-06-24 04:25 UTC
From: nick dot ilyin at oracle dot com Assigned:
Status: No Feedback Package: PDO PgSQL
PHP Version: 7.1.16 OS: Ubuntu 16.04.4 LTS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nick dot ilyin at oracle dot com
New email:
PHP Version: OS:

 

 [2018-04-25 14:34 UTC] nick dot ilyin at oracle dot com
Description:
------------
In some rare cases both pg_escape_string and pg_send_query cause a segfault in Apache/2.4.18. Unfortunately it happens in cases where I cannot replicate outside of our stack with a test script. However, I have a test machine up where I can replicate the issue consistently so I can provide whatever information is necessary from there.

I can provide whatever output is needed.

Test script:
---------------
Unable to provide given the nature of not knowing how to reproduce the issue in a simple test script. This issue is fully reproducible in a brand new machine built on our stack and is reproducible on brand new Ubuntu 16.04.4 machines using PHP 7.1.16.


Expected result:
----------------
No segmentation fault.

Actual result:
--------------
In the error log: [Wed Apr 25 10:32:28.271689 2018] [core:notice] [pid 32568] AH00052: child pid 12510 exit signal Segmentation fault (11)



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-04-26 00:34 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2018-04-26 00:34 UTC] requinix@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2018-04-26 00:50 UTC] yohgaki@php.net
pg_escape_string() is simple libpq wrapper function, so chances are high that other feature's memory management error is the cause. Please do not forget to paste list of installed modules. i.e. php -m or phpinfo()'s modules list.
 [2018-06-24 04:25 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 12:01:30 2024 UTC