You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Packer.pack() segfaults when its default callback calls getbuffer() #733
If the default callback obtains a memoryview through getbuffer() and then returns a sufficiently large value, Packer.pack() reallocates its internal buffer while the memoryview still references the old storage.
Accessing the memoryview afterward causes a segmentation fault, and an ASan build reports a heap-use-after-free.
An ASan build reports a heap-use-after-free in unpack_execute.
The allocation was freed by msgpack_pack_write after the callback exported a memoryview of the buffer.
I found this while fuzzing Python C extension modules.
It looks like a bug to me, but I may be missing an intended constraint, so I would appreciate confirmation.
Activity