HomeFreeBSD

netlink: refuse a send(2) that is larger than socket buffer

Description

netlink: refuse a send(2) that is larger than socket buffer

The Netlink RFC doesn't say that explicitly, but general discussion seems
to state that a single netlink message shall be delivered in a single
send(2) to the socket. So, if a single message doesn't fit into buffer it
is clear EMSGSIZE. The RFC is unclear if application is allowed to send
several smaller messages with a single syscall potentially overflowing the
buffer and whether kernel should accept any of them. At the moment, no
legit application does that. So, decision was taken not to overload
nl_sosend() with a message parsing logic and deny any oversized write.

Reported-by: syzbot+eb5db60d36b005dbccf5@syzkaller.appspotmail.com

Details

Provenance
glebiusAuthored on Fri, Feb 28, 11:39 PM
Parents
rG457d745d90a6: release: ensure default sudo flavor is selected
Branches
Unknown
Tags
Unknown