8000 gh-126703: Fix possible use after free in pycfunction freelist by Fidget-Spinner · Pull Request #132319 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-126703: Fix possible use after free in pycfunction freelist #132319

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
merged 4 commits into from
Apr 9, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review
  • Loading branch information
Fidget-Spinner committed Apr 9, 2025
commit 088d3a4ef47d15bba282c572ebac5f7ff02ad293
2 changes: 1 addition & 1 deletion Objects/methodobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ meth_dealloc(PyObject *self)
PyObject_ClearWeakRefs((PyObject*) m);
}
// We need to access ml_flags here rather than later.
// `m` might have the same lifetime
// `m->m_ml` might have the same lifetime
// as `m_self` when it's dynamically allocated.
int ml_flags = m->m_ml->ml_flags;
// Dereference class before m_self: PyCFunction_GET_CLASS accesses
Expand Down
0