Bug #64355 [NEW]: Segfault when accepting ssl connection
| From: | nicolyon at free dot fr | Date: | Tue, 05 Mar 2013 07:55:19 +0000 |
| Subject: | Bug #64355 [NEW]: Segfault when accepting ssl connection | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-177590@lists.php.net to get a copy of this message | ||
From: nicolyon at free dot fr
Operating system: Linux
PHP version: 5.4.12
Package: OpenSSL related
Bug Type: Bug
Bug description:Segfault when accepting ssl connection
Description:
------------
When accepting a connection from a SSL socket with openssl >= 1.0.1d PHP
crash.
When using openssl 1.0.1c or lower there's no crash.
Here the stack :
#0 0x00007f2f58eafd1a in ssl_set_cert_masks () from
/usr/lib/libssl.so.1.0.0
#1 0x00007f2f58eb0596 in ssl_get_server_send_pkey () from
/usr/lib/libssl.so.1.0.0
#2 0x00007f2f58eb0689 in ssl_get_server_send_cert () from
/usr/lib/libssl.so.1.0.0
#3 0x00007f2f4c84bf23 in php_SSL_new_from_context () from
/usr/lib/php/extensions/openssl.so
#4 0x00007f2f4c84d5b9 in php_openssl_sockop_set_option () from
/usr/lib/php/extensions/openssl.so
#5 0x00000000006247cc in _php_stream_set_option ()
#6 0x000000000062fe9e in php_stream_xport_crypto_setup ()
#7 0x00007f2f4c84d294 in php_openssl_sockop_set_option () from
/usr/lib/php/extensions/openssl.so
#8 0x00000000006247cc in _php_stream_set_option ()
#9 0x000000000062fcb9 in php_stream_xport_accept ()
#10 0x00000000005c9e9c in zif_stream_socket_accept ()
Test script:
---------------
$context = stream_context_create();
$errno = 0;
$errstr = "";
$s = stream_socket_server( "ssl://127.0.0.1:800", $errno, $errstr,
STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context );
do just telnet localhost 800 for crash
Expected result:
----------------
no crash
Actual result:
--------------
segfault
--
Edit bug report at https://bugs.php.net/bug.php?id=64355&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64355&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64355&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64355&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64355&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64355&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64355&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64355&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64355&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=64355&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64355&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=64355&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=64355&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64355&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64355&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64355&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64355&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=64355&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64355&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64355&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64355&r=mysqlcfg