net/ieee802154: reject zero-sized raw_sendmsg()
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Sat, 1 Oct 2022 16:43:44 +0000 (01:43 +0900)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Oct 2022 12:26:41 +0000 (13:26 +0100)
commit3a4d061c699bd3eedc80dc97a4b2a2e1af83c6f5
treee2a5c714c310bc75d97db404ad69e522eca9a2ef
parentba0fbdb95da5ddd8db457ce6ba09d16dd979a294
net/ieee802154: reject zero-sized raw_sendmsg()

syzbot is hitting skb_assert_len() warning at raw_sendmsg() for ieee802154
socket. What commit dc633700f00f726e ("net/af_packet: check len when
min_header_len equals to 0") does also applies to ieee802154 socket.

Link: https://syzkaller.appspot.com/bug?extid=5ea725c25d06fb9114c4
Reported-by: syzbot <syzbot+5ea725c25d06fb9114c4@syzkaller.appspotmail.com>
Fixes: fd1894224407c484 ("bpf: Don't redirect packets with invalid pkt_len")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ieee802154/socket.c