All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] tipc: Fix potential OOB in tipc_link_proto_rcv()
@ 2022-12-03  9:46 YueHaibing
  2022-12-06 12:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2022-12-03  9:46 UTC (permalink / raw)
  To: jmaloy, ying.xue, davem, edumazet, kuba, pabeni
  Cc: netdev, tipc-discussion, linux-kernel, YueHaibing

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@huawei.com>
---
 net/tipc/link.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] tipc: Fix potential OOB in tipc_link_proto_rcv()
  2022-12-03  9:46 [PATCH net] tipc: Fix potential OOB in tipc_link_proto_rcv() YueHaibing
@ 2022-12-06 12:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-06 12:10 UTC (permalink / raw)
  To: YueHaibing
  Cc: jmaloy, ying.xue, davem, edumazet, kuba, pabeni, netdev,
	tipc-discussion, linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Sat, 3 Dec 2022 17:46:35 +0800 you wrote:
> 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@huawei.com>
> ---
>  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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-06 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-03  9:46 [PATCH net] tipc: Fix potential OOB in tipc_link_proto_rcv() YueHaibing
2022-12-06 12:10 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.