Skip to content
Snippets Groups Projects
Commit 7add7a11 authored by Eric Dumazet's avatar Eric Dumazet Committed by Frieder Schrempf
Browse files

ndisc: extend RCU protection in ndisc_send_skb()


[ Upstream commit ed6ae1f325d3c43966ec1b62ac1459e2b8e45640 ]

ndisc_send_skb() can be called without RTNL or RCU held.

Acquire rcu_read_lock() earlier, so that we can use dev_net_rcu()
and avoid a potential UAF.

Fixes: 1762f7e8 ("[NETNS][IPV6] ndisc - make socket control per namespace")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250207135841.1948589-8-edumazet@google.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0cb6af98
No related branches found
No related tags found
1 merge request!191🤖 Sync Bot: Update v6.1-ktn to Latest Stable Kernel (v6.1.129)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment