Bug #66538 [Fbk->NoF]: Segfault when accepting client on SSL server

From: Date: Sun, 20 Jun 2021 04:22:13 +0000
Subject: Bug #66538 [Fbk->NoF]: Segfault when accepting client on SSL server
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234541@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66538&edit=1

 ID:               66538
 Updated by:       php-bugs@lists.php.net
 Reported by:      grzegorz129 at gmail dot com
 Summary:          Segfault when accepting client on SSL server
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          Reproducible crash
 Operating System: OSX 10.9
 PHP Version:      5.5.8
 Assigned To:      cmb
 Private report:   N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2021-06-09 14:34:34] cmb@php.net

Is this still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>

------------------------------------------------------------------------
[2014-01-21 23:42:01] grzegorz129 at gmail dot com

After installing 5.5.8 problem still exists.

------------------------------------------------------------------------
[2014-01-21 21:12:55] grzegorz129 at gmail dot com

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 this bug report at https://bugs.php.net/bug.php?id=66538&edit=1


Thread (4 messages)

« previous php.bugs (#234541) next »