-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Use After Free in list_richcompare_impl #120298
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
Labels
3.12
only security fixes
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
type-crash
A hard crash of the interpreter, possibly with a core dump
Comments
Thanks for the report! |
sobolevn
added a commit
that referenced
this issue
Jun 11, 2024
Loading
Loading status checks…
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jun 11, 2024
Loading
Loading status checks…
…nGH-120303) (cherry picked from commit 141baba) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jun 11, 2024
Loading
Loading status checks…
…nGH-120303) (cherry picked from commit 141baba) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
mrahtz
pushed a commit
to mrahtz/cpython
that referenced
this issue
Jun 30, 2024
…n#120303) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gpshead
added a commit
to gpshead/cpython
that referenced
this issue
Jul 3, 2024
This backports the fix to python#120298. commit id b884536
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this issue
Jul 11, 2024
…n#120303) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
…n#120303) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.12
only security fixes
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
type-crash
A hard crash of the interpreter, possibly with a core dump
Crash report
Bisect
bisect from 65e1cea
Build
Root Cause
The
list_richcompare_impl
function calls arbitrary code while comparing nested list structures. This can causevl->ob_item[i]
andwl->ob_item[i]
to have their reference counts decreased, triggering a use-after-free issue. This issue arises when called from bisect, deque and heapq(#115706) indices with improper validation.POC
asan
bisect asan
deque asan
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.14.0a0 (heads/main:34f5ae69fe, Jun 9 2024, 21:27:54) [GCC 11.4.0]
Linked PRs
list_richcompare_impl
#120303list_richcompare_impl
(GH-120303) #120339list_richcompare_impl
(GH-120303) #120340The text was updated successfully, but these errors were encountered: