]> 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 12:50:08 +0000 (13:50 +0100)
commit3c2d705f5adf5d860aaef90cb4211c0fde2ba66d
treec3949fc53b2ae977bc1f2183db2de773b8cf03e5
parent84212387caadb211cd9dadd6fd5563bd37dc1f5e
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