Patch "tipc: Fix potential OOB in tipc_link_proto_rcv()" has been added to the 6.0-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

    tipc: Fix potential OOB in tipc_link_proto_rcv()

to the 6.0-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:
     tipc-fix-potential-oob-in-tipc_link_proto_rcv.patch
and it can be found in the queue-6.0 subdirectory.

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



commit e32882ac4959fa92e104162f28db8a1b6ab7dc85
Author: YueHaibing <yuehaibing@xxxxxxxxxx>
Date:   Sat Dec 3 17:46:35 2022 +0800

    tipc: Fix potential OOB in tipc_link_proto_rcv()
    
    [ Upstream commit 743117a997bbd4840e827295c07e59bcd7f7caa3 ]
    
    Fix the potential risk of OOB if skb_linearize() fails in
    tipc_link_proto_rcv().
    
    Fixes: 5cbb28a4bf65 ("tipc: linearize arriving NAME_DISTR and LINK_PROTO buffers")
    Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221203094635.29024-1-yuehaibing@xxxxxxxxxx
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/tipc/link.c b/net/tipc/link.c
index e260c0d557f5..b3ce24823f50 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -2224,7 +2224,9 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,
 	if (tipc_own_addr(l->net) > msg_prevnode(hdr))
 		l->net_plane = msg_net_plane(hdr);
 
-	skb_linearize(skb);
+	if (skb_linearize(skb))
+		goto exit;
+
 	hdr = buf_msg(skb);
 	data = msg_data(hdr);
 



[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