Skip to content

Fix DOMNameSpaceNode clone UAF after xinclude - #23248

Open
iliaal wants to merge 1 commit into
php:PHP-8.4from
iliaal:fix/dom-nsnode-clone-xinclude
Open

Fix DOMNameSpaceNode clone UAF after xinclude#23248
iliaal wants to merge 1 commit into
php:PHP-8.4from
iliaal:fix/dom-nsnode-clone-xinclude

Conversation

@iliaal

@iliaal iliaal commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

DOMNameSpaceNode clone used original_node->parent to build the fake namespace decl. After DOMDocument::xinclude() that parent is freed. The clone now takes its parent from parent_intern, or NULL if that wrapper was stripped. parentNode and lookup* still use original_node->parent (#22627).

Clone built the fake namespace decl from original_node->parent. After
xinclude that parent is gone; parent_intern is the durable handle.
lookupNamespaceURI and parentNode still use original_node->parent
(open PR 22627).
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