History

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.

Arjun Roy committed 5 years ago

Commit 3c5a2fd1 parent 9fbb4a72 files · +11 −2Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/tcp.h+1−1
@@ -357,6 +357,6 @@ struct tcp_zerocopy_receive { · 356 unmodified lines
357 __u64 msg_control; /* ancillary data */357 __u64 msg_control; /* ancillary data */
358 __u64 msg_controllen;358 __u64 msg_controllen;
359 __u32 msg_flags;359 __u32 msg_flags;
360 /* __u32 hole; Next we must add >1 u32 otherwise length checks fail. */360 __u32 reserved; /* set to 0 for now */
361};361};
362#endif /* _UAPI_LINUX_TCP_H */362#endif /* _UAPI_LINUX_TCP_H */