]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
neighbour: use RCU protection in __neigh_notify()
authorEric Dumazet <edumazet@google.com>
Fri, 7 Feb 2025 13:58:35 +0000 (13:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:50:08 +0000 (13:50 +0100)
commit784eb2376270e086f7db136d154b8404edacf97b
treee8a28a9742590ecb47db3769958f0813f6ca84bf
parent9b4d091de5d0d8cb223c9d7a0d0cd6fa490d2458
neighbour: use RCU protection in __neigh_notify()

[ Upstream commit becbd5850c03ed33b232083dd66c6e38c0c0e569 ]

__neigh_notify() can be called without RTNL or RCU protection.

Use RCU protection to avoid potential UAF.

Fixes: 426b5303eb43 ("[NETNS]: Modify the neighbour table code so it handles multiple network namespaces")
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-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/neighbour.c