Re: [PATCH net 8/8] ipv6: mcast: extend RCU protection in igmp6_send()

From
Kuniyuki Iwashima <hidden>
Date
2025-02-10 03:08:11
Reply to
Eric Dumazet, 2025-02-07
From: Eric Dumazet <redacted>
Date: Fri,  7 Feb 2025 13:58:40 +0000
igmp6_send() can be called without RTNL or RCU being held.

Extend RCU protection so that we can safely fetch the net pointer
and avoid a potential UAF.

Note that we no longer can use sock_alloc_send_skb() because
ipv6.igmp_sk uses GFP_KERNEL allocations which can sleep.

Instead use alloc_skb() and charge the net->ipv6.igmp_sk
socket under RCU protection.

Fixes: b8ad0cbc58f7 ("[NETNS][IPV6] mcast - handle several network namespace")
Signed-off-by: Eric Dumazet <redacted>
Reviewed-by: Kuniyuki Iwashima <redacted>
Thread (25 messages) 25 messages, 4 authors, last reply 2025-02-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help