Skip to content

gh-142731: fix re-entrant __hash__ UAF in setattr/delattr paths#144937

Closed
harshang03 wants to merge 1 commit intopython:mainfrom
harshang03:fix-142731-dict-uaf-reentrant-hash
Closed

gh-142731: fix re-entrant __hash__ UAF in setattr/delattr paths#144937
harshang03 wants to merge 1 commit intopython:mainfrom
harshang03:fix-142731-dict-uaf-reentrant-hash

Conversation

@harshang03
Copy link

Pull Request title

gh-142731: Fix re-entrant hash UAF in setattr/delattr paths

Summary

Fixes a use-after-free in dict attribute write/delete paths when __hash__ is re-entered and mutates state during lookup.

What changed

Issue

Testing

  • Added targeted regression tests.
  • Existing tests in affected area pass locally.

issue #142731

@python-cla-bot
Copy link

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@harshang03 harshang03 closed this Feb 17, 2026
@harshang03 harshang03 deleted the fix-142731-dict-uaf-reentrant-hash branch February 17, 2026 22:59
@harshang03 harshang03 restored the fix-142731-dict-uaf-reentrant-hash branch February 18, 2026 02:12
@harshang03 harshang03 reopened this Feb 18, 2026
@harshang03 harshang03 closed this Feb 18, 2026
@harshang03 harshang03 deleted the fix-142731-dict-uaf-reentrant-hash branch February 18, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant