Skip to content

Fix UAF in reflected attribute write paths - #25120

Merged
bukka merged 2 commits into
php:PHP-8.4from
bukka:dom_reflected_attribute_uaf
Nov 1, 2026
Merged

bukka merged 2 commits into
php:PHP-8.4from
bukka:dom_reflected_attribute_uaf

Conversation

@bukka

@bukka bukka commented Nov 1, 2026

Copy link
Copy Markdown
Member

Reflected className/id writes and TokenList mutations call xmlSetNsProp(), which frees an existing attribute child list. Unlink live child wrappers before replacement, following GH-23348.

@bukka
bukka requested a review from devnexen as a code owner November 1, 2026 10:49
@bukka
bukka changed the base branch from master to PHP-8.4 November 1, 2026 10:49
Reflected className/id writes and TokenList mutations call
xmlSetNsProp(), which frees an existing attribute child list.
Unlink live child wrappers before replacement, following phpGH-23348.
@bukka
bukka force-pushed the dom_reflected_attribute_uaf branch from 78d9acc to 8f7f8d2 Compare November 1, 2026 10:49
Comment thread ext/dom/element.c Resolved
@bukka
bukka merged commit 0857fdc into php:PHP-8.4 Nov 1, 2026
18 checks passed
bukka added a commit that referenced this pull request Nov 1, 2026
* PHP-8.4:
  Fix UAF in reflected attribute write paths (#25120)
bukka added a commit that referenced this pull request Nov 1, 2026
* PHP-8.5:
  Fix UAF in reflected attribute write paths (#25120)
bukka added a commit that referenced this pull request Nov 1, 2026
* PHP-8.6:
  Fix UAF in reflected attribute write paths (#25120)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants