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
socket.sendmsg() and socket.recvmsg_into() crash via __buffer__ re-entrancy (related to gh-143637) #143988
Similar to gh-143637, socket.sendmsg() and socket.recvmsg_into() can crash due to re-entrant mutation during argument parsing, but via the __buffer__ protocol instead of __index__.
Affected functions
Function
Argument
Trigger
sendmsg()
arg 1 (data buffers)
__buffer__
recvmsg_into()
arg 1 (buffers)
__buffer__
Root cause
Same as gh-143637: PySequence_Fast() returns the original list when input is already a list. During iteration, PyObject_GetBuffer() triggers __buffer__ callbacks which can clear the list, causing subsequent accesses to read invalid memory.
Activity
pythongh-143988: Fix re-entrant mutation crashes in socket sendmsg/re…
pythongh-143988: Fix re-entrant mutation crashes in socket sendmsg/re…
pythongh-143988: Fix re-entrant mutation crashes in socket sendmsg/re…
pythongh-143988: Fix re-entrant mutation crashes in socket sendmsg/re…
pythongh-143988: Fix re-entrant mutation crashes in socket sendmsg/re…
gh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_…
pythongh-143988: Fix re-entrant mutation crashes in socket sendmsg/re…
[3.14] gh-143988: Fix re-entrant mutation crashes in socket sendmsg/r…
[3.15] gh-143988: Fix re-entrant mutation crashes in socket sendmsg/r…
[3.13][3.14] gh-143988: Fix re-entrant mutation crashes in socket sen…
pythongh-143988: Fix re-entrant mutation crashes in socket sendmsg/re…