]> 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>
Thu, 13 Mar 2025 11:50:44 +0000 (12:50 +0100)
commit40d8f2f2a373b6c294ffac394d2bb814b572ead1
treea9d3ea85c7c1cfc7b89f79785d602281ee2aac2b
parent44e35955237802b4b175ab1eb7bdb971a402a644
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