diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-10-28 00:25:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-10-31 12:13:10 +0300 |
commit | 738136a0e3757a8534df3ad97d6ff6d7f429f6c1 (patch) | |
tree | 4ea24529d3600c1aa926aaa791f1085af6c111e6 /include/uapi | |
parent | eca485d22165695587bed02d8b9d0f7f44246c4a (diff) | |
download | linux-738136a0e3757a8534df3ad97d6ff6d7f429f6c1.tar.xz |
netlink: split up copies in the ack construction
Clean up the use of unsafe_memcpy() by adding a flexible array
at the end of netlink message header and splitting up the header
and data copies.
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/netlink.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h index e2ae82e3f9f7..5da0da59bf01 100644 --- a/include/uapi/linux/netlink.h +++ b/include/uapi/linux/netlink.h @@ -48,6 +48,7 @@ struct sockaddr_nl { * @nlmsg_flags: Additional flags * @nlmsg_seq: Sequence number * @nlmsg_pid: Sending process port ID + * @nlmsg_data: Message payload */ struct nlmsghdr { __u32 nlmsg_len; @@ -55,6 +56,7 @@ struct nlmsghdr { __u16 nlmsg_flags; __u32 nlmsg_seq; __u32 nlmsg_pid; + __u8 nlmsg_data[]; }; /* Flags values */ |