Use After Free when assigning into a memoryview #92888
Labels
interpreter-core
Interpreter core (Objects, Python, Grammar, and Parser dirs)
type-bug
An unexpected behavior, bug, or error
type-crash
A hard crash of the interpreter, possibly with a core dump
type-security
A security issue
Bug report
within memoryview.c, I have found two Use After Frees, both based around
memory_ass_sub
.The first is if a class with a malicious
__index__
method is used as the index for the assignment, its index method is called after the memoryview is checked if it is released. This allows the index method to release the memory view and backing buffer, leading to a write to freed memory when the write completes. The same vuln exists if the class with a malicious index method is used as the assigned value, as its__index__
method is called inside ofpack_single
Your environment
The text was updated successfully, but these errors were encountered: