gh-142557: fix UAF in bytearray.__mod__ when object is mutated while formatting %-style arguments#143213
Merged
picnixz merged 7 commits intopython:mainfrom Dec 27, 2025
Merged
Conversation
…nt's `__repr__`
picnixz
commented
Dec 27, 2025
Misc/NEWS.d/next/Core_and_Builtins/2025-12-27-12-25-06.gh-issue-142557.KWOc8b.rst
Outdated
Show resolved
Hide resolved
…e-142557.KWOc8b.rst
picnixz
commented
Dec 27, 2025
Misc/NEWS.d/next/Core_and_Builtins/2025-12-27-12-25-06.gh-issue-142557.KWOc8b.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Core_and_Builtins/2025-12-27-12-25-06.gh-issue-142557.KWOc8b.rst
Outdated
Show resolved
Hide resolved
serhiy-storchaka
approved these changes
Dec 27, 2025
Member
serhiy-storchaka
left a comment
There was a problem hiding this comment.
LGTM. 👍
Don't forget to edit the commit message before merging.
bytearray.__mod__ via re-entrant argument's __repr__bytearray.__mod__ when object is mutated while formatting %-style arguments
|
Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Dec 27, 2025
…d while formatting `%`-style arguments (pythonGH-143213) (cherry picked from commit 61ee048) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
Sorry, @picnixz, I could not cleanly backport this to |
|
GH-143227 is a backport of this pull request to the 3.14 branch. |
picnixz
added a commit
to picnixz/cpython
that referenced
this pull request
Dec 27, 2025
… mutated while formatting `%`-style arguments (pythonGH-143213) (cherry picked from commit 61ee048) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
GH-143229 is a backport of this pull request to the 3.13 branch. |
thunder-coding
pushed a commit
to thunder-coding/cpython
that referenced
this pull request
Feb 15, 2026
…d while formatting `%`-style arguments (python#143213)
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.
bytearray_mod(bytes formatting) via re-entrant__repr__method #142557