diff --git a/NEWS b/NEWS index a4b3d143c37c..3bf743b3f997 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,10 @@ PHP NEWS . Fix too wide type inference for ASSIGN_DIM_OP. (ndossche) . Fix OSS-Fuzz #568005340 (FETCH_DIM_FUNC_ARG partial conversion). (ndossche) +- OpenSSL: + . Fixed bug GH-24220 (Failed listen() on a tcp:// server reported as + success with ext/openssl). (Ryosuke Ishibashi) + - Phar: . Fixed GH-24166 (Double-free in Phar::webPhar() in CGI without PATH_INFO). (RigelYoung, Jakub Zelenka) diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index ad06af444ffe..c9c2b8081c30 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -3843,8 +3843,9 @@ static int php_openssl_sockop_set_option(php_stream *stream, int option, int val case STREAM_XPORT_OP_LISTEN: /* Do normal listen first */ - xparam->outputs.returncode = php_stream_socket_ops.set_option( - stream, option, value, ptrparam); + if (php_stream_socket_ops.set_option(stream, option, value, ptrparam) != PHP_STREAM_OPTION_RETURN_OK) { + xparam->outputs.returncode = -1; + } if (xparam->outputs.returncode == 0 && sslsock->enable_on_connect) { /* Create SSL_CTX early to share it for session resumption and early data */