]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ndisc: use RCU protection in ndisc_alloc_skb()
authorEric Dumazet <edumazet@google.com>
Fri, 7 Feb 2025 13:58:34 +0000 (13:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 13:01:42 +0000 (14:01 +0100)
commitbbec88e4108e8d6fb468d3817fa652140a44ff28
tree619abc4673d82b5f93ddec1b1bd2387ca9e188cb
parent3e38cbbfa0a128a9d64773240a9eb3bc7bae3b1a
ndisc: use RCU protection in ndisc_alloc_skb()

[ Upstream commit 628e6d18930bbd21f2d4562228afe27694f66da9 ]

ndisc_alloc_skb() can be called without RTNL or RCU being held.

Add RCU protection to avoid possible UAF.

Fixes: de09334b9326 ("ndisc: Introduce ndisc_alloc_skb() helper.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250207135841.1948589-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/ndisc.c