[DFSan] Fix recvmsg wrapper to support MSG_TRUNC flag. (#92599)
The MSG_TRUNC flag makes recvmsg return the real length of the packet, even if it was too big to fit in the provided buffer. This is commonly used together with MSG_PEEK. Without this patch, dfsan's clear_msghdr_labels expects the return value of recvmsg (size recieved) to be less than or equal to the iov buffer length where recvmsg writes data, resulting in a crash.
parent
df626dd1
Please register or sign in to comment