Patch "net/ieee802154: reject zero-sized raw_sendmsg()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net/ieee802154: reject zero-sized raw_sendmsg()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-ieee802154-reject-zero-sized-raw_sendmsg.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit eb13284e2fddc4123ade1f516ad40797110e95c0
Author: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
Date:   Sun Oct 2 01:43:44 2022 +0900

    net/ieee802154: reject zero-sized raw_sendmsg()
    
    [ Upstream commit 3a4d061c699bd3eedc80dc97a4b2a2e1af83c6f5 ]
    
    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@xxxxxxxxxxxxxxxxxxxxxxxxx>
    Fixes: fd1894224407c484 ("bpf: Don't redirect packets with invalid pkt_len")
    Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c
index 7edec210780a..d4c162d63634 100644
--- a/net/ieee802154/socket.c
+++ b/net/ieee802154/socket.c
@@ -252,6 +252,9 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
 		return -EOPNOTSUPP;
 	}
 
+	if (!size)
+		return -EINVAL;
+
 	lock_sock(sk);
 	if (!sk->sk_bound_dev_if)
 		dev = dev_getfirstbyhwtype(sock_net(sk), ARPHRD_IEEE802154);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux