-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-143195: fix UAF in {bytearray,memoryview}.hex(sep) via re-entrant sep.__len__
#143209
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
Conversation
…entrant `sep.__len__`
64e6922 to
0488d21
Compare
vstinner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Mmh. The memoryview is not entirely fixed. Looks like there is still a UAF but this one doesn't crash with the default build (bytearray crashed without ASAN build but memoryview requires ASAN). I'll fix this as well (I'll need to configure my build with ASAN, which I previously didn't) |
a7f98fb to
0b1553f
Compare
|
Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…entrant `sep.__len__` (pythonGH-143209) (cherry picked from commit 9976c2b6349a079ae39931d960b8c147e21c6c3f) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
Sorry, @picnixz, I could not cleanly backport this to |
|
GH-143219 is a backport of this pull request to the 3.14 branch. |
…via re-entrant `sep.__len__` (pythonGH-143209) (cherry picked from commit 9976c2b) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
GH-143220 is a backport of this pull request to the 3.13 branch. |
_Py_strhex_implvia re-entrantsep.__len__inbytearray.hex#143195