Commit 37f7f421 authored by David S. Miller's avatar David S. Miller

[NET]: Do not leak MSG_CMSG_COMPAT into userspace.

Noticed by Sridhar Samudrala.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 065d9cac
......@@ -1862,7 +1862,8 @@ asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned int flag
if (err < 0)
goto out_freeiov;
}
err = __put_user(msg_sys.msg_flags, COMPAT_FLAGS(msg));
err = __put_user((msg_sys.msg_flags & ~MSG_CMSG_COMPAT),
COMPAT_FLAGS(msg));
if (err)
goto out_freeiov;
if (MSG_CMSG_COMPAT & flags)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment