FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-126037: fix UAF in `xml.etree.ElementTree.Element.find*` when concurrent mutations happen by picnixz · Pull Request #127964 · python/cpython · GitHub

/ cpython Public

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

Merged
picnixz merged 7 commits into
python:mainfrom
picnixz:fix/xml/evil-find-126037
Mar 31, 2025
Merged

gh-126037: fix UAF in xml.etree.ElementTree.Element.find* when concurrent mutations happen#127964
picnixz merged 7 commits into
python:mainfrom
picnixz:fix/xml/evil-find-126037

Conversation

picnixz commented Dec 15, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

picnixz added topic-XML needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Dec 15, 2024
picnixz changed the title gh-126037: fix crashes in xml.etree.ElementTree.Element.find* with tag's custom str.__eq__ gh-126037: fix crashes in xml.etree.ElementTree.Element.find* when concurrent mutations happen Dec 17, 2024

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

picnixz merged commit c57623c into python:main Mar 31, 2025

Copy link
Copy Markdown

Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

picnixz deleted the fix/xml/evil-find-126037 branch March 31, 2025 10:26

Copy link
Copy Markdown

Sorry, @picnixz, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker c57623c221d46daeaedfbf2b32d041fde0c882de 3.13

Copy link
Copy Markdown

Sorry, @picnixz, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker c57623c221d46daeaedfbf2b32d041fde0c882de 3.12

picnixz added a commit to picnixz/cpython that referenced this pull request Mar 31, 2025
…n concurrent mutations happen (python#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.

bedevere-app Bot commented Mar 31, 2025

Copy link
Copy Markdown

GH-131931 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Mar 31, 2025

bedevere-app Bot commented Mar 31, 2025

Copy link
Copy Markdown

GH-131932 is a backport of this pull request to the 3.12 branch.

bedevere-app Bot removed the needs backport to 3.12 only security fixes label Mar 31, 2025
picnixz changed the title gh-126037: fix crashes in xml.etree.ElementTree.Element.find* when concurrent mutations happen gh-126037: fix UAF in xml.etree.ElementTree.Element.find* when concurrent mutations happen Mar 31, 2025
picnixz added a commit that referenced this pull request Mar 31, 2025
…en concurrent mutations happen (#127964) (#131932)

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 c57623c)
picnixz added a commit that referenced this pull request Mar 31, 2025
…en 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 c57623c)
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL