]> www.infradead.org Git - users/willy/pagecache.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)
committerJakub Kicinski <kuba@kernel.org>
Tue, 11 Feb 2025 02:09:09 +0000 (18:09 -0800)
commit628e6d18930bbd21f2d4562228afe27694f66da9
tree4ee9e91e855cc03159bba3fcbe5dd8a3d7767151
parent48145a57d4bbe3496e8e4880b23ea6b511e6e519
ndisc: use RCU protection in ndisc_alloc_skb()

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>
net/ipv6/ndisc.c