You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
extract() with EXTR_REFS: use-after-free still present in modes other than EXTR_OVERWRITE (follow-up to #18209) #24730
The fix for #18209 was applied to php_extract_ref_overwrite() only. The five sibling
functions still destroy the old variable before overwriting the slot, so the same
use-after-free is reachable through the other EXTR_REFS modes.
ext/standard/array.c, e.g. php_extract_ref_if_exists():
Affected: php_extract_ref_if_exists, php_extract_ref_prefix_if_exists, php_extract_ref_prefix_all, php_extract_ref_prefix_same, php_extract_ref_prefix_invalid. EXTR_REFS|EXTR_OVERWRITE is clean, as expected after #18209.
The other four modes crash the same way with the variable named to match the mode:
Fixed by #22696, which covers all five modes; each of them is valgrind-clean on current master with it applied. That PR is on hold until the general fix for reentrant destructors lands.
Activity
iliaal commentedon Oct 26, 2026
Fixed by #22696, which covers all five modes; each of them is valgrind-clean on current master with it applied. That PR is on hold until the general fix for reentrant destructors lands.