DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/4] fib: fix full table overwrite on address wraparound
@ 2026-10-27  0:14 Robert Sanford
  2026-10-27  0:14 ` [PATCH v1 1/4] " Robert Sanford
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Robert Sanford @ 2026-10-27  0:14 UTC (permalink / raw)
  To: dev; +Cc: vladimir.medvedkin, Robert Sanford

From: Robert Sanford <rsanford@akamai.com>

Both FIB dataplanes can overwrite their entire lookup table when a
prefix whose range ends at the top of the address space is added,
deleted, or has its next hop changed, while more-specific routes cover
its range up to that point. The call returns 0, so the corruption is
silent.

One real-world trigger is a default route coexisting with explicit /1
routes: with 0.0.0.0/0, 0.0.0.0/1 and 128.0.0.0/1 installed, deleting
0.0.0.0/0 makes every lookup miss. IPv6 behaves the same with ::/0,
::/1 and 8000::/1.

In modify_fib() (dir24_8.c) and modify_dp() (trie.c), the branch that
skips a route starting exactly at the current left edge has no
wraparound check, while the branch that installs a gap does. Patches 1
and 2 add the missing check. Patches 3 and 4 add unit tests that fail
without the fixes and pass with them.

Robert Sanford (4):
  fib: fix full table overwrite on address wraparound
  fib6: fix full table overwrite on address wraparound
  test/fib: reproduce table overwrite on address wraparound
  test/fib6: reproduce table overwrite on address wraparound

 app/test/test_fib.c  |  94 +++++++++++++++++++++++++++++++++++++++
 app/test/test_fib6.c | 103 +++++++++++++++++++++++++++++++++++++++++++
 lib/fib/dir24_8.c    |   6 +++
 lib/fib/trie.c       |   6 +++
 4 files changed, 209 insertions(+)

-- 
2.34.1


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

end of thread, other threads:[~2026-10-27 14:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-27  0:14 [PATCH v1 0/4] fib: fix full table overwrite on address wraparound Robert Sanford
2026-10-27  0:14 ` [PATCH v1 1/4] " Robert Sanford
2026-10-27  0:14 ` [PATCH v1 2/4] fib6: " Robert Sanford
2026-10-27  0:14 ` [PATCH v1 3/4] test/fib: reproduce " Robert Sanford
2026-10-27  0:14 ` [PATCH v1 4/4] test/fib6: " Robert Sanford
2026-10-27 14:54 ` [PATCH v2 0/5] fib: fix full " Robert Sanford
2026-10-27 14:54   ` [PATCH v2 1/5] rib: fix undefined behavior in bit test Robert Sanford
2026-10-27 14:54   ` [PATCH v2 2/5] fib: fix full table overwrite on address wraparound Robert Sanford
2026-10-27 14:54   ` [PATCH v2 3/5] fib6: " Robert Sanford
2026-10-27 14:54   ` [PATCH v2 4/5] test/fib: reproduce " Robert Sanford
2026-10-27 14:54   ` [PATCH v2 5/5] test/fib6: " Robert Sanford

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