php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58288 resetCookies causes apache to crash
Submitted: 2008-07-25 22:40 UTC Modified: 2010-06-21 10:15 UTC
From: troy at yortfolio dot com Assigned: mike (profile)
Status: Wont fix Package: pecl_http (PECL)
PHP Version: 5_2 CVS-2008-07-25 (dev) OS: Win XP x64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-07-25 22:40 UTC] troy at yortfolio dot com
Description:
------------
I added comments to bug #11939 but no reply (i might be doing something wrong) so opening up this case instead.

I tried the same tests as #11939 also (below for conveniance) and they still cause issues where Apache crashes.

Reproduce code:
---------------
$objHttp = new HttpRequest('http://www.google.com');
$objHttp->resetCookies();
// -> segmentation fault

// OR

$arrCookies = array('test' => 'testvalue');
$objHttp = new HttpRequest('http://www.google.com');
$objHttp->setCookies($arrCookies);
var_dump($objHttp->getCookies());
$objHttp->resetCookies();
// -> segmentation fault


Expected result:
----------------
Apache not to crash

Actual result:
--------------
Apache crashes, below are the results from both code examples.

First example produces the below.
szAppName : httpd.exe     szAppVer : 2.2.8.0     szModName : php_http.dll
szModVer : 5.2.6.6     offset : 0003ff45

Second example produces the below.
szAppName : httpd.exe     szAppVer : 2.2.8.0     szModName : php_http.dll
szModVer : 5.2.6.6     offset : 0003ff45

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-27 08:52 UTC] mike@php.net
What's your pecl_http version?
This issue is fixed since 2 years ago.
 [2008-07-28 03:07 UTC] troy at yortfolio dot com
Hiya,

Details below

Extension Version 1.6.1-dev
libcurl 7.16.0
 [2008-10-21 03:01 UTC] mike@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.


 [2009-02-11 11:21 UTC] mike@php.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 "Open". Thank you.


 [2010-06-18 15:38 UTC] irving at jounce dot com
Running pecl_http 1.7.0 for php 5.2.10 on centos 5.5 i386

#0  0xb739083a in Curl_cookie_clearall () from /usr/lib/libcurl.so.3
#1  0xb73a119a in Curl_setopt () from /usr/lib/libcurl.so.3
#2  0xb73ac507 in curl_easy_setopt () from /usr/lib/libcurl.so.3
#3  0xb7064891 in _http_request_reset_cookies (request=0x80293ca0, session_only=0) at /var/tmp/pecl_http/http_request_api.c:434
#4  0xb70542dc in zim_HttpRequest_resetCookies (ht=0, return_value=0x80293a5c, return_value_ptr=0x0, this_ptr=0x80293a10, return_value_used=0) at /var/tmp/pecl_http/http_request_object.c:1095
#5  0xb76c9f40 in ?? () from /etc/httpd/modules/libphp5.so
#6  0xb76bda78 in execute () from /etc/httpd/modules/libphp5.so
#7  0xb76c990e in ?? () from /etc/httpd/modules/libphp5.so
#8  0xb76bda78 in execute () from /etc/httpd/modules/libphp5.so
#9  0xb76c990e in ?? () from /etc/httpd/modules/libphp5.so
#10 0xb76bda78 in execute () from /etc/httpd/modules/libphp5.so
#11 0xb76c990e in ?? () from /etc/httpd/modules/libphp5.so
#12 0xb76bda78 in execute () from /etc/httpd/modules/libphp5.so
#13 0xb76c17d5 in ?? () from /etc/httpd/modules/libphp5.so
#14 0xb76bda78 in execute () from /etc/httpd/modules/libphp5.so
#15 0xb769c7ea in zend_execute_scripts () from /etc/httpd/modules/libphp5.so
#16 0xb7656a26 in php_execute_script () from /etc/httpd/modules/libphp5.so
#17 0xb7725aad in ?? () from /etc/httpd/modules/libphp5.so
#18 0x80024a4d in ap_run_handler ()
#19 0x800283f8 in ap_invoke_handler ()
#20 0x80034354 in ap_internal_redirect ()
#21 0xb783c640 in ap_make_dirstr_parent () from /etc/httpd/modules/mod_rewrite.so
#22 0x80024a4d in ap_run_handler ()
#23 0x800283f8 in ap_invoke_handler ()
#24 0x8003450e in ap_process_request ()
#25 0x800312af in ?? ()
#26 0x8002c92d in ap_run_process_connection ()
#27 0x8002ca2c in ap_process_connection ()
#28 0x80038df4 in ?? ()
#29 0x80039064 in ?? ()
#30 0x80039f79 in ap_mpm_run ()
#31 0x80010157 in main ()
 [2010-06-21 10:15 UTC] mike@php.net
As stated in numerous other bug reports:

This is a problem of old libcurl installations.
It has been fixed upstream long time ago.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 18:01:25 2019 UTC