php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39182 https URLs with curl causes segfault
Submitted: 2006-10-18 07:57 UTC Modified: 2006-10-18 17:40 UTC
From: shawn at digitalpoint dot com Assigned:
Status: Not a bug Package: cURL related
PHP Version: 5.1.6 OS: SuSE Linux Enterprise 9.3
Private report: No CVE-ID: None
 [2006-10-18 07:57 UTC] shawn at digitalpoint dot com
Description:
------------
Configure line:

'./configure' '--with-config-file-path=/etc' '--with-
libdir=lib64' '--with-apxs2=/usr/sbin/apxs2' '--with-zlib' '--
with-mysql' '--with-gd' '--with-png-dir' '--with-freetype-dir' 
'--with-jpeg-dir' '--with-curl' '--enable-exif' '--enable-
mbstring' '--with-openssl'

Updated everything that I could think of that could be 
related...  libcurl/7.15.5 OpenSSL/0.9.8d zlib/1.2.1

Reproduce code:
---------------
<?php
        $curl = curl_init('https://www.apple.com/');
        $response = curl_exec($curl);
?>

Expected result:
----------------
Not a segfault.

Actual result:
--------------
#0  0x0000002a9766dd0f in sk_pop_free () from /usr/local/
ssl/lib/libcrypto.so.0.9.8
#1  0x0000002a976a1844 in X509_VERIFY_PARAM_free () from /
usr/local/ssl/lib/libcrypto.so.0.9.8
#2  0x0000002a9749af4f in SSL_CTX_free () from /usr/local/
ssl/lib/libssl.so.0.9.8
#3  0x0000002a9795f1dc in Curl_ossl_close (conn=0x84f890) at 
ssluse.c:724
#4  0x0000002a9796e047 in Curl_ssl_close (conn=<value 
optimized out>) at sslgen.c:381
#5  0x0000002a979580fd in Curl_disconnect (conn=0x84f890) at 
url.c:1634
#6  0x0000002a97958468 in ConnectionKillOne (data=0x844430) 
at url.c:1835
#7  0x0000002a9795d75e in Curl_close (data=0x844430) at 
url.c:203
#8  0x0000002a979673ae in curl_easy_cleanup (curl=0x150) at 
easy.c:485
#9  0x0000002a967af773 in _php_curl_close (rsrc=<value 
optimized out>) at /root/software_source/php-5.1.6/ext/curl/
interface.c:1750
#10 0x0000002a969739cd in list_entry_destructor (ptr=<value 
optimized out>) at /root/software_source/php-5.1.6/Zend/
zend_list.c:179
#11 0x0000002a96971b44 in zend_hash_del_key_or_index 
(ht=0x2a96da2ec8, arKey=<value optimized out>, 
nKeyLength=<value optimized out>, h=9, flag=<value optimized 
out>) at /root/software_source/php-5.1.6/Zend/zend_hash.c:
492
#12 0x0000002a96973c5e in _zend_list_delete (id=9) at /root/
software_source/php-5.1.6/Zend/zend_list.c:58
#13 0x0000002a967aa754 in zif_curl_close (ht=<value 
optimized out>, return_value=0x8cb258, 
return_value_ptr=<value optimized out>, this_ptr=<value 
optimized out>, return_value_used=<value optimized out>)
    at /root/software_source/php-5.1.6/ext/curl/interface.c:
1735
#14 0x0000002a9698617a in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fbfffb750) at zend_vm_execute.h:200
#15 0x0000002a969d845d in execute (op_array=0x8cc378) at 
zend_vm_execute.h:92
#16 0x0000002a96985cbe in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fbfffb980) at zend_vm_execute.h:234
#17 0x0000002a969d845d in execute (op_array=0x8cacb8) at 
zend_vm_execute.h:92
#18 0x0000002a96985cbe in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fbfffbd70) at zend_vm_execute.h:234
#19 0x0000002a969d845d in execute (op_array=0x8adc68) at 
zend_vm_execute.h:92
#20 0x0000002a96966ece in zend_execute_scripts (type=8, 
retval=0x0, file_count=3) at /root/software_source/
php-5.1.6/Zend/zend.c:1109
#21 0x0000002a9692acc9 in php_execute_script 
(primary_file=0x7fbfffe2c0) at /root/software_source/
php-5.1.6/main/main.c:1737
#22 0x0000002a969d8e66 in php_handler (r=0x7a9ee0) at /root/
software_source/php-5.1.6/sapi/apache2handler/
sapi_apache2.c:586
#23 0x0000000000427111 in ap_run_handler ()
#24 0x000000000042a0a9 in ap_invoke_handler ()
#25 0x0000000000424fce in ap_process_request ()
#26 0x000000000041ff58 in ap_process_http_connection ()
#27 0x00000000004312d1 in ap_run_process_connection ()
#28 0x00000000004313e2 in ap_process_connection ()
#29 0x0000000000425fe5 in child_main ()
#30 0x00000000004261a9 in make_child ()
#31 0x0000000000426294 in startup_children ()
#32 0x000000000042694b in ap_mpm_run ()
#33 0x000000000042c9bf in main ()

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-18 09:43 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2006-10-18 17:36 UTC] shawn at digitalpoint dot com
#0  0x0000002a97838157 in lh_doall_arg () from /usr/local/
ssl/lib/libcrypto.so.0.9.8
#1  0x0000002a97667cad in SSL_CTX_flush_sessions () from /
usr/local/ssl/lib/libssl.so.0.9.8
#2  0x0000002a97664fbf in SSL_CTX_free () from /usr/local/
ssl/lib/libssl.so.0.9.8
#3  0x0000002a97b291dc in Curl_ossl_close (conn=0x7cf0a0) at 
ssluse.c:724
#4  0x0000002a97b38047 in Curl_ssl_close (conn=<value 
optimized out>) at sslgen.c:381
#5  0x0000002a97b220fd in Curl_disconnect (conn=0x7cf0a0) at 
url.c:1634
#6  0x0000002a97b22468 in ConnectionKillOne (data=0x7c64c0) 
at url.c:1835
#7  0x0000002a97b2775e in Curl_close (data=0x7c64c0) at 
url.c:203
#8  0x0000002a97b313ae in curl_easy_cleanup (curl=0x7d0400) 
at easy.c:485
#9  0x0000002a967de85a in _php_curl_close 
(rsrc=0x2a991c4ad8) at /root/software_source/
php5.2-200610181630/ext/curl/interface.c:1901
#10 0x0000002a96ade2dd in list_entry_destructor 
(ptr=0x2a991c4ad8) at /root/software_source/
php5.2-200610181630/Zend/zend_list.c:184
#11 0x0000002a96adb6df in zend_hash_del_key_or_index 
(ht=0x2a96f6ce88, arKey=0x0, nKeyLength=0, h=2, flag=1) at /
root/software_source/php5.2-200610181630/Zend/zend_hash.c:
492
#12 0x0000002a96adddd2 in _zend_list_delete (id=2) at /root/
software_source/php5.2-200610181630/Zend/zend_list.c:58
#13 0x0000002a96acc7e6 in _zval_dtor_func 
(zvalue=0x2a991c5a68, __zend_filename=0x2a96d76750 "/root/
software_source/php5.2-200610181630/Zend/zend_variables.h", 
__zend_lineno=35) at /root/software_source/
php5.2-200610181630/Zend/zend_variables.c:60
#14 0x0000002a96ac17d2 in _zval_dtor (zvalue=0x2a991c5a68, 
__zend_filename=0x2a96d76248 "/root/software_source/
php5.2-200610181630/Zend/zend_execute_API.c", 
__zend_lineno=414) at zend_variables.h:35
#15 0x0000002a96abdc0a in _zval_ptr_dtor 
(zval_ptr=0x2a991c5ff8, __zend_filename=0x2a96d77408 "/root/
software_source/php5.2-200610181630/Zend/zend_variables.c", 
__zend_lineno=175) at /root/software_source/
php5.2-200610181630/Zend/zend_execute_API.c:414
#16 0x0000002a96accaeb in _zval_ptr_dtor_wrapper 
(zval_ptr=0x2a991c5ff8) at /root/software_source/
php5.2-200610181630/Zend/zend_variables.c:175
#17 0x0000002a96adbbb2 in zend_hash_apply_deleter 
(ht=0x2a96f6cd88, p=0x2a991c5fe0) at /root/software_source/
php5.2-200610181630/Zend/zend_hash.c:606
#18 0x0000002a96adbd1e in zend_hash_graceful_reverse_destroy 
(ht=0x2a96f6cd88) at /root/software_source/
php5.2-200610181630/Zend/zend_hash.c:641
#19 0x0000002a96abd4ba in shutdown_executor () at /root/
software_source/php5.2-200610181630/Zend/zend_execute_API.c:
239
#20 0x0000002a96ace26a in zend_deactivate () at /root/
software_source/php5.2-200610181630/Zend/zend.c:840
#21 0x0000002a96a74d82 in php_request_shutdown (dummy=0x0) 
at /root/software_source/php5.2-200610181630/main/main.c:
1300
#22 0x0000002a96b46c64 in php_apache_request_dtor 
(r=0x7c44a0) at /root/software_source/php5.2-200610181630/
sapi/apache2handler/sapi_apache2.c:451
#23 0x0000002a96b472ab in php_handler (r=0x7c44a0) at /root/
software_source/php5.2-200610181630/sapi/apache2handler/
sapi_apache2.c:609
#24 0x0000000000427111 in ap_run_handler ()
#25 0x000000000042a0a9 in ap_invoke_handler ()
#26 0x0000000000424fce in ap_process_request ()
#27 0x000000000041ff58 in ap_process_http_connection ()
#28 0x00000000004312d1 in ap_run_process_connection ()
#29 0x00000000004313e2 in ap_process_connection ()
#30 0x0000000000425fe5 in child_main ()
#31 0x00000000004261a9 in make_child ()
#32 0x0000000000426294 in startup_children ()
#33 0x000000000042694b in ap_mpm_run ()
#34 0x000000000042c9bf in main ()
 [2006-10-18 17:40 UTC] tony2001@php.net
The backtrace shows it's not PHP problem.
Most likely it's caused by YaSSL used in MySQL binary builds.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 21:01:27 2024 UTC