[php-src] Issue #20802: Segfault when bad type SNI_server_cert passed in

From: Date: Tue, 30 Dec 2025 03:59:58 +0000
Subject: [php-src] Issue #20802: Segfault when bad type SNI_server_cert passed in
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251449@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/20802 Author: dixyes ### Description server: ```php <?php $context = stream_context_create([ 'ssl' => [ 'SNI_enabled' => true, 'SNI_server_certs' => [ 'localhost' => false, // not a string/array ], ], ]); $stream = stream_socket_server('tls://0.0.0.0:12443', $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context); $conn = stream_socket_accept($stream); ``` connect with: ```bash openssl s_client -debug 127.0.0.1:12443 ``` missing check here: https://github.com/php/php-src/blob/434b14e4a3001c3b23607df0c80478d72e4ac2c8/ext/openssl/xp_ssl.c#L1435-L1437 ### PHP Version ```plain master ``` ### Operating System _No response_

« previous php.bugs (#251449) next »