Bug #66538 [NEW]: Segfault when accepting client on SSL server
| From: | grzegorz129 at gmail dot com | Date: | Tue, 21 Jan 2014 21:12:55 +0000 |
| Subject: | Bug #66538 [NEW]: Segfault when accepting client on SSL server | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-183943@lists.php.net to get a copy of this message | ||
From: grzegorz129 at gmail dot com
Operating system: OSX 10.9
PHP version: Irrelevant
Package: Reproducible crash
Bug Type: Bug
Bug description:Segfault when accepting client on SSL server
Description:
------------
After making valid SSL connection (using openssl s_client) to server
with SSL context PHP segfaults.
I've tested this with latest CLI version bundled with OSX - 5.4.17.
I think issue source can similar to this one:
https://mail.python.org/pipermail/python-dev/2013-October/129832.html
Test script:
---------------
<?php
$serverSSLContext = stream_context_create();
stream_context_set_option($serverSSLContext, 'ssl', 'local_cert',
"./test.pem");
$serverSocket = stream_socket_server("ssl://127.0.0.1:8000", $errno,
$errstr, STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $serverSSLContext);
while(stream_socket_accept($serverSocket));
Actual result:
--------------
Since gdb isn't supported on Mavericks I've used lldb:
$ lldb php testssl.php
Current executable set to 'php' (x86_64).
(lldb) run
Process 40595 launched: '/usr/bin/php' (x86_64)
Process 40595 stopped
* thread #1: tid = 0x3f395f, 0x00007fff8f0d18f7
libssl.0.9.8.dylib`ssl_set_cert_masks + 39, queue =
'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1,
address=0x20)
frame #0: 0x00007fff8f0d18f7 libssl.0.9.8.dylib`ssl_set_cert_masks +
39
libssl.0.9.8.dylib`ssl_set_cert_masks + 39:
-> 0x7fff8f0d18f7: movb 32(%rsi), %cl
0x7fff8f0d18fa: andb $8, %cl
0x7fff8f0d18fd: shrb $3, %cl
0x7fff8f0d1900: movl $512, %edx
(lldb)
--
Edit bug report at https://bugs.php.net/bug.php?id=66538&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66538&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66538&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66538&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66538&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66538&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66538&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66538&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66538&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66538&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66538&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66538&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66538&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66538&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66538&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66538&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66538&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66538&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66538&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66538&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66538&r=mysqlcfg