]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-126037: fix UAF in `xml.etree.ElementTree.Element.find*` when current mutat...
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Mon, 31 Mar 2025 12:48:42 +0000 (14:48 +0200)
committerGitHub <noreply@github.com>
Mon, 31 Mar 2025 12:48:42 +0000 (14:48 +0200)
commit588bb6ddf4388cefc926006e9e4752b7e62ea077
tree9eb3bb6fe5404b2707e044b953b9782225b6ba98
parent19187991a8311e87735eb3abe55c0c499739769d
[3.13] gh-126037: fix UAF in `xml.etree.ElementTree.Element.find*` when current mutations happen (#127964) (#131931)

gh-126037: fix UAF in `xml.etree.ElementTree.Element.find*` when concurrent mutations happen (#127964)

We fix a use-after-free in the `find`, `findtext` and `findall` methods of `xml.etree.ElementTree.Element`
objects that can be triggered when the tag to find implements an `__eq__` method that mutates the
element being queried.

(cherry picked from commit c57623c221d46daeaedfbf2b32d041fde0c882de)
Lib/test/test_xml_etree.py
Misc/NEWS.d/next/Library/2024-12-15-15-07-22.gh-issue-126037.OyA7JP.rst [new file with mode: 0644]
Modules/_elementtree.c