]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-126037: fix UAF in `xml.etree.ElementTree.Element.find*` when concurrent mutation...
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Mon, 31 Mar 2025 10:26:52 +0000 (12:26 +0200)
committerGitHub <noreply@github.com>
Mon, 31 Mar 2025 10:26:52 +0000 (12:26 +0200)
commitc57623c221d46daeaedfbf2b32d041fde0c882de
tree03f280bef7563abca0c6d0be1fe25878a7476a75
parent6aa88a2cb36240fe2b587f2e82043873270a27cf
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.
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