From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Chanho Min <chanho.min@lge.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
gunho.lee@lge.com, stable@vger.kernel.org,
Sasha Levin <sashal@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH] ipv6: mcast: extend RCU protection in igmp6_send()
Date: Sun, 24 Aug 2025 08:03:42 +0200 [thread overview]
Message-ID: <2025082405-entomb-eligibly-c616@gregkh> (raw)
In-Reply-To: <20250818092453.38281-1-chanho.min@lge.com>
On Mon, Aug 18, 2025 at 06:24:53PM +0900, Chanho Min wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> [ Upstream commit 087c1faa594fa07a66933d750c0b2610aa1a2946 ]
>
> 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.
>
> Cc: stable@vger.kernel.org # 5.4
> Fixes: b8ad0cbc58f7 ("[NETNS][IPV6] mcast - handle several network namespace")
> 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-9-edumazet@google.com
> [ chanho: Backports to v5.4.y. v5.4.y does not include
> commit b4a11b2033b7(net: fix IPSTATS_MIB_OUTPKGS increment in OutForwDatagrams),
> so IPSTATS_MIB_OUTREQUESTS was changed to IPSTATS_MIB_OUTPKGS defined as
> 'OutRequests'. ]
We can not take patches for only older kernel versions, as when you
upgrade you would have a regression. Please send backports for all of
the missing stable versions and we will be glad to queue them up.
thanks,
greg k-h
prev parent reply other threads:[~2025-08-24 6:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 9:24 [PATCH] ipv6: mcast: extend RCU protection in igmp6_send() Chanho Min
2025-08-21 9:23 ` Paolo Abeni
2025-08-21 13:04 ` Sasha Levin
2025-08-24 6:03 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025082405-entomb-eligibly-c616@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=chanho.min@lge.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gunho.lee@lge.com \
--cc=kuba@kernel.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox