-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Uninitialized value usage of localspluskinds in assemble.c's makecode function #119666
Comments
Marked as security and crash, since msan indicates UB which are all provisionally security issues. |
cc @iritkatriel @markshannon as owners of |
It seems that In Question is whether this needs to be fixed in the compiler, or there is something here that should be rejected by the parser. CC @carljm . |
This should be fixed in the compiler; the code is legal. Here is a variation that runs fine in 3.11 but crashes (with a SystemError in this case) in 3.12:
|
Seems almost certainly related to comprehension inlining; I can take the investigation from here @iritkatriel if you want to assign to me. |
Done. |
…__class__ (pythonGH-120295) (cherry picked from commit 0ae8579) Co-authored-by: Carl Meyer <[email protected]>
…__class__ (pythonGH-120295) (cherry picked from commit 0ae8579) Co-authored-by: Carl Meyer <[email protected]>
Bug report
Bug description:
Recreator
Details
This issue was found through the oss-fuzz compilation fuzzer. Here is the MSAN stack trace:
I haven't done any debugging yet but my hunch is that this code is hitting a path in
compute_localsplus_info
cpython/Python/assemble.c
Line 475 in f912e5a
that ends up not setting the
localspluskinds
made herecpython/Python/assemble.c
Lines 580 to 587 in f912e5a
and when this eventually gets to
_PyCode_Validate
it causes it to read uninitialized memory.CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: