[libc-commits] [libc] [libc] More unpoison for recvmsg (PR #117347)

Alexey Samsonov via libc-commits libc-commits at lists.llvm.org
Fri Nov 22 09:49:39 PST 2024


================
@@ -41,6 +41,7 @@ LLVM_LIBC_FUNCTION(ssize_t, recvmsg, (int sockfd, msghdr *msg, int flags)) {
   // Unpoison the msghdr, as well as all its components.
   MSAN_UNPOISON(msg, sizeof(msghdr));
   MSAN_UNPOISON(msg->msg_name, msg->msg_namelen);
+  MSAN_UNPOISON(msg->msg_iov, msg->msg_iovlen * sizeof(struct iovec));
----------------
vonosmas wrote:

Do you need to check that msg->msg_iov is non-NULL? Same for msg->msg_control below.

https://github.com/llvm/llvm-project/pull/117347


More information about the libc-commits mailing list