mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue