php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72303 Bus error with segfault using curl with ssl
Submitted: 2016-05-31 14:34 UTC Modified: 2016-06-02 08:03 UTC
From: daniel dot ylitalo at mytaste dot com Assigned:
Status: Closed Package: cURL related
PHP Version: 5.6.22 OS: FreeBSD 10.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: daniel dot ylitalo at mytaste dot com
New email:
PHP Version: OS:

 

 [2016-05-31 14:34 UTC] daniel dot ylitalo at mytaste dot com
Description:
------------
php segfaults when hitting this scenario:

(gdb) bt
#0  0x0000000801b148dd in free () from /lib/libc.so.7
#1  0x00000008058be495 in CRYPTO_free () from /lib/libcrypto.so.7
#2  0x0000000805dadd24 in SSL_CTX_set_alpn_protos () from /usr/local/lib/libssl.so.8
#3  0x000000080ff00007 in curl_pushheader_byname () from /usr/local/lib/libcurl.so.4
#4  0x000000080ff03f3d in curl_pushheader_byname () from /usr/local/lib/libcurl.so.4
#5  0x000000080fec241d in curl_formfree () from /usr/local/lib/libcurl.so.4
#6  0x000000080fed2091 in curl_formfree () from /usr/local/lib/libcurl.so.4
#7  0x000000080fee5e26 in curl_multi_perform () from /usr/local/lib/libcurl.so.4
#8  0x000000080fee5a0a in curl_multi_perform () from /usr/local/lib/libcurl.so.4
#9  0x000000080fedf31c in curl_easy_perform () from /usr/local/lib/libcurl.so.4
#10 0x000000080fc9fa1a in zif_curl_exec () from /usr/local/lib/php/20131226/curl.so
#11 0x0000000802043801 in xdebug_execute_internal () from /usr/local/lib/php/20131226/xdebug.so
#12 0x00000000005ec4f6 in zend_do_fcall_common_helper_SPEC ()
#13 0x00000000005ad8a8 in execute_ex ()
#14 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#15 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#16 0x00000000005ad8a8 in execute_ex ()
#17 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#18 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#19 0x00000000005ad8a8 in execute_ex ()
#20 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#21 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#22 0x00000000005ad8a8 in execute_ex ()
#23 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#24 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#25 0x00000000005ad8a8 in execute_ex ()
#26 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#27 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#28 0x00000000005ad8a8 in execute_ex ()
#29 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#30 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#31 0x00000000005ad8a8 in execute_ex ()
#32 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#33 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#34 0x00000000005ad8a8 in execute_ex ()
#35 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#36 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#37 0x00000000005ad8a8 in execute_ex ()
#38 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#39 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#40 0x00000000005ad8a8 in execute_ex ()
#41 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#42 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#43 0x00000000005ad8a8 in execute_ex ()
#44 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#45 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#46 0x00000000005ad8a8 in execute_ex ()
#47 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#48 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#49 0x00000000005ad8a8 in execute_ex ()
#50 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#51 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#52 0x00000000005ad8a8 in execute_ex ()
#53 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
---Type <return> to continue, or q <return> to quit---
#54 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#55 0x00000000005ad8a8 in execute_ex ()
#56 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#57 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#58 0x00000000005ad8a8 in execute_ex ()
#59 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#60 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#61 0x00000000005ad8a8 in execute_ex ()
#62 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#63 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#64 0x00000000005ad8a8 in execute_ex ()
#65 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#66 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#67 0x00000000005ad8a8 in execute_ex ()
#68 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#69 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#70 0x00000000005ad8a8 in execute_ex ()
#71 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#72 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#73 0x00000000005ad8a8 in execute_ex ()
#74 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#75 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#76 0x00000000005ad8a8 in execute_ex ()
#77 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#78 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#79 0x00000000005ad8a8 in execute_ex ()
#80 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#81 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#82 0x00000000005ad8a8 in execute_ex ()
#83 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#84 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#85 0x00000000005ad8a8 in execute_ex ()
#86 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#87 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#88 0x00000000005ad8a8 in execute_ex ()
#89 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#90 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#91 0x00000000005ad8a8 in execute_ex ()
#92 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#93 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#94 0x00000000005ad8a8 in execute_ex ()
#95 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#96 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#97 0x00000000005ad8a8 in execute_ex ()
#98 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#99 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#100 0x00000000005ad8a8 in execute_ex ()
#101 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#102 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#103 0x00000000005ad8a8 in execute_ex ()
#104 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#105 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#106 0x00000000005ad8a8 in execute_ex ()
#107 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
---Type <return> to continue, or q <return> to quit---
#108 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#109 0x00000000005ad8a8 in execute_ex ()
#110 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#111 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#112 0x00000000005ad8a8 in execute_ex ()
#113 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#114 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#115 0x00000000005ad8a8 in execute_ex ()
#116 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#117 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#118 0x00000000005ad8a8 in execute_ex ()
#119 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#120 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#121 0x00000000005ad8a8 in execute_ex ()
#122 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#123 0x0000000000578a3e in zend_call_function ()
#124 0x00000000004b3394 in zif_call_user_func_array ()
#125 0x0000000802043801 in xdebug_execute_internal () from /usr/local/lib/php/20131226/xdebug.so
#126 0x00000000005ec4f6 in zend_do_fcall_common_helper_SPEC ()
#127 0x00000000005ad8a8 in execute_ex ()
#128 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#129 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#130 0x00000000005ad8a8 in execute_ex ()
#131 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#132 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#133 0x00000000005ad8a8 in execute_ex ()
#134 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#135 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#136 0x00000000005ad8a8 in execute_ex ()
#137 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#138 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#139 0x00000000005ad8a8 in execute_ex ()
#140 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#141 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#142 0x00000000005ad8a8 in execute_ex ()
#143 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#144 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#145 0x00000000005ad8a8 in execute_ex ()
#146 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#147 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#148 0x00000000005ad8a8 in execute_ex ()
#149 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#150 0x00000000005ec7ca in zend_do_fcall_common_helper_SPEC ()
#151 0x00000000005ad8a8 in execute_ex ()
#152 0x00000008020434c6 in xdebug_execute_ex () from /usr/local/lib/php/20131226/xdebug.so
#153 0x0000000000585a23 in zend_execute_scripts ()
#154 0x000000000052dd93 in php_execute_script ()
#155 0x0000000000608b38 in do_cli ()
#156 0x00000000006079bf in main ()



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-01 03:00 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2016-06-01 03:00 UTC] laruence@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2016-06-02 08:03 UTC] daniel dot ylitalo at mytaste dot com
-Status: Feedback +Status: Closed
 [2016-06-02 08:03 UTC] daniel dot ylitalo at mytaste dot com
I tried upgrading curl from 7.48 to 7.49 and that solved the segfault, sorry for not trying that before doing a report.

I'm closing the issue
 [2016-08-11 04:50 UTC] phpbugs dot 20 dot ooglek at 0sg dot net
Thank you for posting this here. Had the same issue and figured it was with CURL, which I'm upgrading now to 7.50 in hopes that it resolves the issue! I was using 7.47.1 when I got the same segmentation fault and core dump.

gdb /usr/local/bin/php ~/php.core
[...]
(gdb) bt
#0  0x0000000801b1290d in free () from /lib/libc.so.7
#1  0x00000008031fa4b5 in CRYPTO_free () from /lib/libcrypto.so.7
#2  0x0000000805e9dbb4 in SSL_CTX_set_alpn_protos () from /usr/local/lib/libssl.so.8
#3  0x000000080532dfd1 in curl_pushheader_byname () from /usr/local/lib/libcurl.so.4
#4  0x000000080533204d in curl_pushheader_byname () from /usr/local/lib/libcurl.so.4
#5  0x00000008052f310d in curl_formfree () from /usr/local/lib/libcurl.so.4
#6  0x00000008053029c1 in curl_formfree () from /usr/local/lib/libcurl.so.4
#7  0x0000000805315fed in curl_multi_perform () from /usr/local/lib/libcurl.so.4
#8  0x0000000805315bda in curl_multi_perform () from /usr/local/lib/libcurl.so.4
#9  0x00000008068ece48 in zif_curl_multi_exec () from /usr/local/lib/php/20131226/curl.so
#10 0x00000000005ec334 in zend_do_fcall_common_helper_SPEC ()
#11 0x00000000005ad5d8 in execute_ex ()
#12 0x0000000000585753 in zend_execute_scripts ()
#13 0x000000000052dac3 in php_execute_script ()
#14 0x00000000006082f8 in do_cli ()
#15 0x000000000060717f in main ()
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC