Skip to content
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

Possible null pointer dereference of freevars in _PyCompile_LookupArg #126238

Open
federicovalenso opened this issue Oct 31, 2024 · 2 comments
Open
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes easy interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@federicovalenso
Copy link

federicovalenso commented Oct 31, 2024

Bug report

Bug description:

freevars is checked for null, but later possible dereference happens. Maybe replacing Py_DECREF by Py_XDECREF should do the trick.

CPython versions tested on:

3.11

Operating systems tested on:

No response

Linked PRs

@federicovalenso federicovalenso added the type-bug An unexpected behavior, bug, or error label Oct 31, 2024
@federicovalenso
Copy link
Author

FYI @sobolevn

@ZeroIntensity ZeroIntensity added interpreter-core (Objects, Python, Grammar, and Parser dirs) easy type-crash A hard crash of the interpreter, possibly with a core dump 3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes and removed type-bug An unexpected behavior, bug, or error labels Oct 31, 2024
@ZeroIntensity
Copy link
Member

Yeah, that looks incorrect. Simply changing it to Py_XDECREF should work. PR welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes easy interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

2 participants