[php-src] PR #25641: Fix GH-25639: UAF in report_class_fetch_error() when the autoloader frees the class name
| From: | lazerg | Date: | Sat, 21 Nov 2026 04:55:32 +0000 |
| Subject: | [php-src] PR #25641: Fix GH-25639: UAF in report_class_fetch_error() when the autoloader frees the class name | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40874@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25641
Author: lazerg
Fixes GH-25639
When the autoloader frees the variable that holds the class name,
zend_lookup_class_ex() drops the last reference to the string, and
report_class_fetch_error() then builds the "Class not found" message from
freed memory. zend_fetch_class() and zend_fetch_class_with_scope() now
hold their own reference to the name until the error is reported.