tipc: Fix potential OOB in tipc_link_proto_rcv()
Subsystems (3)
PATCH 1/1 tipc: Fix potential OOB in tipc_link_proto_rcv()
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 <[email protected]>
--- net/tipc/link.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/tipc/link.c +3 -1
@@ -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);
Signature · 1 line
2.34.1
This patch was applied to netdev/net.git (master) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by Paolo Abeni <[email protected]>:
Quoted 8 lines · On Sat, 3 Dec 2022 17:46:35 +0800 you wrote:
Fix the potential risk of OOB if
skb_linearize()fails intipc_link_proto_rcv().Fixes 5cbb28a4bf65 ("tipc: linearize arriving NAME_DISTR and LINK_PROTO buffers")Signed-off-by YueHaibing <[email protected]>--- net/tipc/link.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Here is the summary with links:
- [net] tipc: Fix potential OOB in tipc_link_proto_rcv()
https://git.kernel.org/netdev/net/c/743117a997bb
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html