]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: netlink: catch attempts to send empty messages
authorJakub Kicinski <kuba@kernel.org>
Wed, 18 Dec 2024 02:44:00 +0000 (18:44 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 20 Dec 2024 02:06:28 +0000 (18:06 -0800)
commit75e2c86c7b180fd1068ad271178c2820a199e7eb
treea7d1f65161d241c0eae2a98916581c03ce60b5ee
parent3fc87cb94f5f3224a9ea168ee935286d915d2a6a
net: netlink: catch attempts to send empty messages

syzbot can figure out a way to redirect a netlink message to a tap.
Sending empty skbs to devices is not valid and we end up hitting
a skb_assert_len() in __dev_queue_xmit().

Make catching these mistakes easier, assert the skb size directly
in netlink core.

Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241218024400.824355-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/netlink/af_netlink.c