[php-src] PR #22580: Fix NULL pointer dereference in SessionHandler::create_sid()
| From: | jorgsowa | Date: | Fri, 03 Jul 2026 17:31:28 +0000 |
| Subject: | [php-src] PR #22580: Fix NULL pointer dereference in SessionHandler::create_sid() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36809@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22580
Author: jorgsowa
s_create_sid() can return NULL when php_random_bytes_throw() fails (e.g.
CSPRNG exhaustion). Every other internal caller of s_create_sid() in session.c
([php_session_initialize](https://github.com/php/php-src/blob/master/ext/session/session.c#L448-L454),
[session_regenerate_id](https://github.com/php/php-src/blob/master/ext/session/session.c#L2399-L2405))
already NULL-checks the result.
It's not possible to test it through .phpt test file. Should it be pointed to the PHP8.4
branch?