Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] ipv6: keep fib6 node serials from going backwards
@ 2026-12-04 11:28 Ralf Lici
  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-04 11:28 ` [PATCH net-next 2/2] ipv6: allocate the flush serial under each table's lock Ralf Lici
  0 siblings, 2 replies; 3+ messages in thread
From: Ralf Lici @ 2026-12-04 11:28 UTC (permalink / raw)
  To: netdev
  Cc: David Ahern, Ido Schimmel, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
	linux-kernel, Antonio Quartulli

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-04 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 11:28 [PATCH net-next 0/2] ipv6: keep fib6 node serials from going backwards Ralf Lici
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-04 11:28 ` [PATCH net-next 2/2] ipv6: allocate the flush serial under each table's lock Ralf Lici

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox