From: Ido Schimmel <idosch@nvidia.com>
To: Kyle Zeng <kylebot@openai.com>
Cc: netdev@vger.kernel.org, David Ahern <dsahern@kernel.org>,
linux-kernel@vger.kernel.org, outbounddisclosures@openai.com
Subject: Re: [PATCH] ip6mr: Serialize multicast router socket ownership
Date: Tue, 3 Nov 2026 12:44:45 +0200 [thread overview]
Message-ID: <20261103104445.GA1107544@shredder> (raw)
In-Reply-To: <20261030042221.73996-1-kylebot@openai.com>
On Thu, Oct 29, 2026 at 09:22:21PM -0700, Kyle Zeng wrote:
> MRT6_TABLE checks whether the socket owns its current table before
> acquiring RTNL. MRT6_INIT also looks up its table before taking RTNL.
> Consequently, concurrent TABLE and INIT calls can initialize the old
> table and then change the socket's selected table. Another INIT can
> register the same socket in the new table.
>
> rawv6_close() calls ip6mr_sk_done(), which clears only the first table
> owned by the socket. After the socket's RCU-delayed free, the other
> table retains a dangling mroute_sk pointer. A subsequent multicast cache
> report passes that pointer to sock_queue_rcv_skb_reason(). This produces
> a KASAN slab-use-after-free in sk_filter_trim_cap().
>
> Look up the selected table in ip6mr_sk_init() after acquiring RTNL.
> Likewise, re-read the current table and check its owner under RTNL in
> MRT6_TABLE before updating the selection. This preserves the single-table
> ownership invariant shared with ip6mr_sk_done(), without changing the
> locking of the other multicast socket options.
>
> Fixes: d1db275dd3f6 ("ipv6: ip6mr: support multiple tables")
> Signed-off-by: Kyle Zeng <kylebot@openai.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
prev parent reply other threads:[~2026-11-03 10:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 4:22 [PATCH] ip6mr: Serialize multicast router socket ownership Kyle Zeng
2026-10-30 4:24 ` netdev-bot+sinfo
2026-11-03 10:44 ` Ido Schimmel [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=20261103104445.GA1107544@shredder \
--to=idosch@nvidia.com \
--cc=dsahern@kernel.org \
--cc=kylebot@openai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=outbounddisclosures@openai.com \
/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