Repository navigation
Conversation
Member
Author
|
One of the 2 PRs mentioned in slack |
Member
|
seems correct but there is a conflict. |
…attribute php_libxml_node_free_resource() freed a detached ID attribute's children before xmlFreeProp() called xmlRemoveID(), which reads the ID value from those children, so the entry was not found and the document's ID table kept pointing at the freed attribute. Remove the ID before freeing the children, as php_libxml_node_free_list() already does. This also covers removeAttribute() while a reference to the attribute node is still held.
iliaal
force-pushed
the
fix/dom-removed-id-attr-uaf
branch
from
November 23, 2026 19:44
0726b06 to
b0c38ac
Compare
Member
Author
|
Rebased. |
devnexen
approved these changes
Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Freeing a detached ID attribute, for example after removeAttributeNode() and unset(), left the document's ID table pointing at it, so a later
getElementById()for that ID read freed memory. php_libxml_node_free_resource() freed the attribute's children before xmlFreeProp() called xmlRemoveID(), which needs those children to find the entry. Remove the ID first, as php_libxml_node_free_list() already does.