mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-04 04:02:26 +00:00
[NET]: Do not leak MSG_CMSG_COMPAT into userspace.
Noticed by Sridhar Samudrala. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
065d9cac98
commit
37f7f421cc
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user