-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-143378: Fix UAF when BytesIO is concurrently mutated during write operations
#143408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+53
−10
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2409319
gh-143378: Fix use-after-free BytesIO write via re-entrant buffer access
superboy-zjc 2c3035c
gh-143378: Fix Sphinx references in NEWS entry
superboy-zjc 1a667a4
Update Lib/test/test_io/test_memoryio.py
superboy-zjc 35f9856
Update Modules/_io/bytesio.c
superboy-zjc 5997e90
Update Lib/test/test_io/test_memoryio.py
superboy-zjc 27c99da
gh-143378: reduce duplication in unit tests per review
superboy-zjc 586fbdc
gh-143378: address review comments in NEWS entry
superboy-zjc 89b2cb7
gh-143378: clean up unit tests
superboy-zjc 7805fa1
gh-143378: refactor the buffer check and unit tests for C and Python …
superboy-zjc 6ac90be
gh-143378: clean up test comments
superboy-zjc 9956cef
Merge branch 'main' into issue-143378
superboy-zjc 2155e48
gh-143378: clean up duplicated shape check
superboy-zjc 4f0b8b6
gh-143378: clean up duplicated shape check in Python implementation
superboy-zjc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Library/2026-01-03-19-41-36.gh-issue-143378.29AvE7.rst
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix use-after-free crashes when a :class:`~io.BytesIO` object is concurrently mutated during :meth:`~io.RawIOBase.write` or :meth:`~io.IOBase.writelines`. |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.