php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67226 PHP crashes with segmentation fault when using curl
Submitted: 2014-05-07 13:56 UTC Modified: 2014-05-08 15:10 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: m99coder at gmail dot com Assigned:
Status: Not a bug Package: cURL related
PHP Version: 5.4.28 OS: Mac OS X 10.9.2
Private report: No CVE-ID: None
 [2014-05-07 13:56 UTC] m99coder at gmail dot com
Description:
------------
PHP tries to make a SSL-backed curl request.


List of modules (configure line):

'./configure'  '--prefix=/usr/local/Cellar/php54/5.4.28' '--localstatedir=/usr/local/var' '--sysconfdir=/usr/local/etc/php/5.4' '--with-config-file-path=/usr/local/etc/php/5.4' '--with-config-file-scan-dir=/usr/local/etc/php/5.4/conf.d' '--with-iconv-dir=/usr' '--enable-dba' '--with-ndbm=/usr' '--enable-exif' '--enable-soap' '--enable-wddx' '--enable-ftp' '--enable-sockets' '--enable-zip' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-mbstring' '--enable-mbregex' '--enable-bcmath' '--enable-calendar' '--with-zlib=/usr/local/opt/zlib' '--with-ldap' '--with-ldap-sasl=/usr' '--with-xmlrpc' '--with-kerberos=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/opt/freetype' '--with-jpeg-dir=/usr/local/opt/jpeg' '--with-png-dir=/usr/local/opt/libpng' '--with-gettext=/usr/local/opt/gettext' '--with-snmp=/usr' '--with-libedit' '--with-unixODBC=/usr/local/opt/unixodbc' '--with-pdo-odbc=unixODBC,/usr/local/opt/unixodbc' '--mandir=/usr/local/Cellar/php54/5.4.28/share/man' '--with-mhash' '--with-curl=/usr/local/opt/curl' '--with-bz2=/usr' '--disable-debug' '--with-openssl=/usr/local/opt/openssl' '--with-xsl=/usr' '--with-apxs2=/usr/local/bin/apxs' '--libexecdir=/usr/local/Cellar/php54/5.4.28/libexec' '--with-mysql-sock=/tmp/mysql.sock' '--with-mysqli=mysqlnd' '--with-mysql=mysqlnd' '--with-pdo-mysql=mysqlnd' '--enable-pcntl'

Expected result:
----------------
PHP doesn't crash with segmentation fault.

Actual result:
--------------
Process 26863 stopped
* thread #1: tid = 0x226200, 0x00007fff91faf452 CoreFoundation`CFArrayGetValueAtIndex + 114, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00007fff91faf452 CoreFoundation`CFArrayGetValueAtIndex + 114
CoreFoundation`CFArrayGetValueAtIndex + 114:
-> 0x7fff91faf452:  movq   (%rax), %rcx
   0x7fff91faf455:  leaq   0x10(%rax,%rcx,8), %rbx
   0x7fff91faf45a:  jmp    0x7fff91faf49c            ; CFArrayGetValueAtIndex + 188
   0x7fff91faf45c:  movq   -0x15f07b03(%rip), %rax   ; { /usr/lib/libobjc.A.dylib`objc_msgSend_fixedup, "objectAtIndex:" }
(lldb) bt
* thread #1: tid = 0x226200, 0x00007fff91faf452 CoreFoundation`CFArrayGetValueAtIndex + 114, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00007fff91faf452 CoreFoundation`CFArrayGetValueAtIndex + 114
    frame #1: 0x00000001006eebb8 libcurl.4.dylib`darwinssl_connect_common + 1571
    frame #2: 0x00000001006ede55 libcurl.4.dylib`Curl_ssl_connect_nonblocking + 36
    frame #3: 0x00000001006ba725 libcurl.4.dylib`Curl_http_connect + 77
    frame #4: 0x00000001006c8263 libcurl.4.dylib`Curl_protocol_connect + 129
    frame #5: 0x00000001006d89d0 libcurl.4.dylib`multi_runsingle + 732
    frame #6: 0x00000001006d8661 libcurl.4.dylib`curl_multi_perform + 168
    frame #7: 0x00000001006d2f5d libcurl.4.dylib`curl_easy_perform + 338
    frame #8: 0x0000000102902ea0 libphp5.so`zif_curl_exec + 128
    frame #9: 0x0000000102c34417 libphp5.so`zend_do_fcall_common_helper_SPEC + 1799
    frame #10: 0x0000000102be9bb1 libphp5.so`execute + 678
    frame #11: 0x0000000102bba1d8 libphp5.so`zend_call_function + 1922
    frame #12: 0x0000000102aad882 libphp5.so`zif_call_user_func_array + 102
    frame #13: 0x0000000102c34417 libphp5.so`zend_do_fcall_common_helper_SPEC + 1799
    frame #14: 0x0000000102be9bb1 libphp5.so`execute + 678
    frame #15: 0x0000000102bc6a61 libphp5.so`zend_execute_scripts + 515
    frame #16: 0x0000000102b6e121 libphp5.so`php_execute_script + 796
    frame #17: 0x0000000102c561d0 libphp5.so`php_handler + 1145
    frame #18: 0x000000010000351d httpd`ap_run_handler + 65
    frame #19: 0x000000010000396a httpd`ap_invoke_handler + 244
    frame #20: 0x0000000100030919 httpd`ap_process_async_request + 895
    frame #21: 0x00000001000309c0 httpd`ap_process_request + 25
    frame #22: 0x000000010002d972 httpd`ap_process_http_connection + 161
    frame #23: 0x0000000100011e49 httpd`ap_run_process_connection + 65
    frame #24: 0x0000000100037581 httpd`child_main + 923
    frame #25: 0x00000001000370bb httpd`make_child + 378
    frame #26: 0x0000000100036479 httpd`prefork_run + 1040
    frame #27: 0x0000000100013bb9 httpd`ap_run_mpm + 82
    frame #28: 0x000000010000a178 httpd`main + 2304

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-08 15:10 UTC] mike@php.net
-Status: Open +Status: Not a bug
 [2014-05-08 15:10 UTC] mike@php.net
Please report upstream. The backtrace suggests either a failure in libcurl handling DarwinSSL or in DarwinSSL itself.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Oct 22 14:01:27 2019 UTC