All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Zihan Xi <zihanx@nebusec.ai>
Cc: David Ahern <dsahern@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, Simon Horman <horms@kernel.org>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Vega <vega@nebusec.ai>, Luxing Yin <root@tr0jan.top>
Subject: Re: [PATCH net 1/1] ipv6: fix fib6 walker UAF on seq stop
Date: Wed, 9 Sep 2026 11:20:08 +0300	[thread overview]
Message-ID: <20260909082008.GA1258831@shredder> (raw)
In-Reply-To: <89699735763f6c297584d7c2ff106239cc1e8ce0.1788837093.git.zihanx@nebusec.ai>

On Tue, Sep 08, 2026 at 07:42:56AM +0000, Zihan Xi wrote:
> ipv6_route_iter_active() treats a walker in FWS_U at the table root as
> already unlinked. fib6_del_route() can move a still-linked walker into
> that same state when the current leaf is the last route at the root,
> so ipv6_route_native_seq_stop() skips fib6_walker_unlink(). The seq
> private object can then be freed while it remains on
> net->ipv6.fib6_walkers. A later route deletion walks the dangling list
> and uses the freed walker.
> 
> Use the list head as membership state and reinitialize it when
> unlinking. Keep the existing w->node check so a never-started iterator
> with a zeroed private object is not treated as linked.
> 
> The same stop helper is used by /proc/net/ipv6_route and by the BPF
> ipv6_route iterator. The BPF show path only widens the race.
> 
> Fixes: 8d2ca1d7b5c3 ("ipv6: avoid high order memory allocations for /proc/net/ipv6_route")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Assisted-by: LLM
> Co-developed-by: Luxing Yin <root@tr0jan.top>
> Signed-off-by: Luxing Yin <root@tr0jan.top>
> Signed-off-by: Zihan Xi <zihanx@nebusec.ai>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

  reply	other threads:[~2026-09-09  8:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08  7:42 [PATCH net 0/1] ipv6: fix fib6 walker UAF on seq stop Zihan Xi
2026-09-08  7:42 ` [PATCH net 1/1] " Zihan Xi
2026-09-09  8:20   ` Ido Schimmel [this message]
2026-09-10 15:50 ` [PATCH net 0/1] " patchwork-bot+netdevbpf

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=20260909082008.GA1258831@shredder \
    --to=idosch@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=hannes@stressinduktion.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=root@tr0jan.top \
    --cc=stable@vger.kernel.org \
    --cc=vega@nebusec.ai \
    --cc=zihanx@nebusec.ai \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.