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/2026…@shredder/
[2] https://lore.kernel.org/netdev/cove…@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