[php-src] PR #22696: Fix use-after-free in extract() EXTR_REFS collision modes
| From: | iliaal | Date: | Sat, 11 Jul 2026 12:10:33 +0000 |
| Subject: | [php-src] PR #22696: Fix use-after-free in extract() EXTR_REFS collision modes | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36975@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22696
Author: iliaal
The GH-18209 fix guarded
php_extract_ref_overwrite against a destructor freeing the
extract target during the reference write, but the five sibling EXTR_REFS collision paths still drop
the old value before writing the reference. The added test crashes on master through the
EXTR_IF_EXISTS and EXTR_PREFIX_ALL paths; the fix copies the old value aside and drops it after the
write, matching php_extract_ref_overwrite.
Fixes GH-18209