All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Lici <ralf@mandelbit.com>
To: netdev@vger.kernel.org
Cc: David Ahern <dsahern@kernel.org>,
	Ido Schimmel <idosch@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Willem de Bruijn <willemb@google.com>,
	Simon Horman <horms@kernel.org>,
	linux-kernel@vger.kernel.org,
	Antonio Quartulli <antonio@mandelbit.com>
Subject: [PATCH net-next 0/2] ipv6: keep fib6 node serials from going backwards
Date: Fri,  4 Dec 2026 12:28:02 +0100	[thread overview]
Message-ID: <cover.1796382778.git.ralf@mandelbit.com> (raw)

Hi,

Two writers can give a fib6 node a serial older than the one it had,
or one that fib6_new_sernum never allocates: ip6_link_failure writes -1
into the node of a default route, and fib6_flush_trees allocates its
serial before walking the tables, so it can overwrite a newer serial
stamped by a concurrent route change.

Validating dsts by comparing serials by age, as Ido suggested [1],
needs node serials to only move forward, so both writers have to be
fixed before the respin of "ipv6: tie dst validation to the lookup that
returned the dst" [2].

Patch 1 stamps the default route node with a fresh serial on link
failure, and patch 2 allocates the flush serial under each table's
lock.

[1] https://lore.kernel.org/netdev/20261203153447.GA3201592@shredder/
[2] https://lore.kernel.org/netdev/cover.1795537128.git.ralf@mandelbit.com/

Thanks,

Ralf Lici
Mandelbit Srl

---
Changes since v5 of "ipv6: tie dst validation to the lookup that returned the dst" [2]
- Send 1/4 separately, without the Fixes tag. (Ido)
- Add the fib6_flush_trees fix. (Ido)

Ralf Lici (2):
  ipv6: stamp the default route node with a fresh serial on link failure
  ipv6: allocate the flush serial under each table's lock

 net/ipv6/ip6_fib.c | 13 ++++++++-----
 net/ipv6/route.c   | 18 ++++++++++--------
 2 files changed, 18 insertions(+), 13 deletions(-)


base-commit: 8a3d0368f58e34e34d402718c7655811902a6bd4
-- 
2.56.1


             reply	other threads:[~2026-12-04 11:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 11:28 Ralf Lici [this message]
2026-12-04 11:28 ` [PATCH net-next 1/2] ipv6: stamp the default route node with a fresh serial on link failure Ralf Lici
2026-12-05 11:47   ` netdev-bot+sashiko
2026-12-04 11:28 ` [PATCH net-next 2/2] ipv6: allocate the flush serial under each table's lock Ralf Lici
2026-12-05 11:47   ` netdev-bot+sashiko

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=cover.1796382778.git.ralf@mandelbit.com \
    --to=ralf@mandelbit.com \
    --cc=antonio@mandelbit.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.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 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.