gh-142664: fix UAF in memoryview.__hash__ via re-entrant data's __hash__ (#143217)

This commit is contained in:
Bénédikt Tran 2025-12-27 13:12:03 +00:00 committed by GitHub
parent 7726119651
commit 00e24b80e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 27 additions and 3 deletions

View file

@ -0,0 +1,3 @@
Fix a use-after-free crash in :meth:`memoryview.__hash__ <object.__hash__>`
when the ``__hash__`` method of the referenced object mutates that object or
the view. Patch by Bénédikt Tran.