]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arp: use RCU protection in arp_xmit()
authorEric Dumazet <edumazet@google.com>
Fri, 7 Feb 2025 13:58:36 +0000 (13:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:44 +0000 (12:50 +0100)
commitd9366ac2f956a1948b68c0500f84a3462ff2ed8a
treeb558550fbfc1d7e231204312b6475b4c89344583
parent40d8f2f2a373b6c294ffac394d2bb814b572ead1
arp: use RCU protection in arp_xmit()

[ Upstream commit a42b69f692165ec39db42d595f4f65a4c8f42e44 ]

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

Use RCU protection to avoid potential UAF.

Fixes: 29a26a568038 ("netfilter: Pass struct net into the netfilter hooks")
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-5-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/arp.c