tcp: Sanitize CMSG flags and reserved args in tcp_zerocopy_receive.
Explicitly define reserved field and require it and any subsequent
fields to be zero-valued for now. Additionally, limit the valid CMSG
flags that tcp_zerocopy_receive accepts.
Fixes: 7eeba1706e ("tcp: Add receive timestamp support for receive zerocopy.")
Signed-off-by: Arjun Roy <arjunroy@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Suggested-by: David Ahern <dsahern@gmail.com>
Suggested-by: Leon Romanovsky <leon@kernel.org>
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
9fbb4a7ac4
commit
3c5a2fd042
@@ -357,6 +357,6 @@ struct tcp_zerocopy_receive {
|
||||
__u64 msg_control; /* ancillary data */
|
||||
__u64 msg_controllen;
|
||||
__u32 msg_flags;
|
||||
/* __u32 hole; Next we must add >1 u32 otherwise length checks fail. */
|
||||
__u32 reserved; /* set to 0 for now */
|
||||
};
|
||||
#endif /* _UAPI_LINUX_TCP_H */
|
||||
|
||||
Reference in New Issue
Block a user