[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aed28a3c-5f6a-4377-a9df-ed24d602509c@kernel.org>
Date: Fri, 7 Feb 2025 13:50:49 -0700
From: David Ahern <dsahern@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>, "David S . Miller"
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, Kuniyuki Iwashima <kuniyu@...zon.com>,
Simon Horman <horms@...nel.org>, eric.dumazet@...il.com
Subject: Re: [PATCH net 8/8] ipv6: mcast: extend RCU protection in
igmp6_send()
On 2/7/25 6:58 AM, Eric Dumazet wrote:
> 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 <edumazet@...gle.com>
> ---
> net/ipv6/mcast.c | 31 +++++++++++++++----------------
> 1 file changed, 15 insertions(+), 16 deletions(-)
>
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists