When copying received control messages out to a 32-bit process, compat32 temporarily modified the length field of each message header in place. When a large control message was read with the MSG_PEEK flag, its storage remained shared with the socket buffer, so this modification could race with concurrent operations on the same socket and corrupt the socket's queue of messages. An unprivileged local user can exploit the resulting memory corruption to escalate privileges.