[php-src] PR #26071: Fixed bug GH-26067: guard NULL scoreboard copy in fpm_status_export_to_zval()
| From: | fusionfoto | Date: | Fri, 04 Dec 2026 11:55:14 +0000 |
| Subject: | [php-src] PR #26071: Fixed bug GH-26067: guard NULL scoreboard copy in fpm_status_export_to_zval() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-41415@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/26071
Author: fusionfoto
Fixes GH-26067.
fpm_status_export_to_zval() dereferenced the result of
fpm_scoreboard_copy() without a NULL check. The copy can return NULL
(allocation failure, or no scoreboard), crashing the worker. This is reachable
from PHP userland through the fpm_get_status() builtin
(sapi/fpm/fpm/fpm_main.c:1525).
PHP-8.6 already guards this right after the copy; this backports the same guard
to PHP-8.3 (return -1 when the copy is NULL).
Built with --enable-fpm --enable-debug; make test TESTS=sapi/fpm passes
(120 passed, 0 failed, 15 skipped; exit 0). No new test is added: triggering the
NULL path requires a scoreboard-copy allocation failure, which has no
deterministic reproducer in the test harness.