patch 'fib: fix full table overwrite on address wraparound' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Nov 16 23:52:31 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/18/26. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/18814039f7d38d6190f2192428c401aa1f81c08b

Thanks.

Luca Boccassi

---
>From 18814039f7d38d6190f2192428c401aa1f81c08b Mon Sep 17 00:00:00 2001
From: Robert Sanford <rsanford at akamai.com>
Date: Tue, 27 Oct 2026 10:54:02 -0400
Subject: [PATCH] fib: fix full table overwrite on address wraparound

[ upstream commit cd9aeda9c432e8a2db3dede6cf0f8216e75f3402 ]

When a prefix whose range ends at 255.255.255.255 is added, deleted,
or has its next hop changed, modify_fib() walks the more-specific
routes under it and installs the next hop into the gaps. If the last
of those routes starts exactly at the current left edge and ends at
255.255.255.255, the equal-edges branch advances ledge past it, and
ledge wraps to 0. That branch has no wraparound check, so the loop
continues. With no more routes, the final branch computes redge,
which also wraps to 0. Its ledge != 0 exception, which exists for a
default route added as the first route, lets the call through, and
install_to_fib(dp, 0, 0, nh) overwrites the entire table. The call
returns 0, so the corruption is silent.

For example, 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. With 10.0.0.0/8,
255.255.255.0/25 and 255.255.255.128/25 installed, adding
255.255.255.0/24 makes every address, including 10.1.1.1, return the
/24's next hop.

Commit ab1b927cd73e ("fib: fix adding default route overwriting
entire table") added the wraparound check to the other branch only.
Add the same check to the equal-edges branch.

Fixes: 880bc2b5f3bd ("fib: fix adding default route")

Signed-off-by: Robert Sanford <rsanford at akamai.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
---
 lib/fib/dir24_8.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/fib/dir24_8.c b/lib/fib/dir24_8.c
index 41ed6c072a..ff140d9d56 100644
--- a/lib/fib/dir24_8.c
+++ b/lib/fib/dir24_8.c
@@ -415,6 +415,12 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip,
 			if (ledge == redge) {
 				ledge = redge +
 					(uint32_t)(1ULL << (32 - tmp_depth));
+				/*
+				 * we got to the end of address space
+				 * and wrapped around
+				 */
+				if (ledge == 0)
+					break;
 				continue;
 			}
 			ret = install_to_fib(dp, ledge, redge,
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-16 22:52:19.529813357 +0000
+++ 0077-fib-fix-full-table-overwrite-on-address-wraparound.patch	2026-11-16 22:52:16.540234862 +0000
@@ -1 +1 @@
-From cd9aeda9c432e8a2db3dede6cf0f8216e75f3402 Mon Sep 17 00:00:00 2001
+From 18814039f7d38d6190f2192428c401aa1f81c08b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cd9aeda9c432e8a2db3dede6cf0f8216e75f3402 ]
+
@@ -29 +30,0 @@
-Cc: stable at dpdk.org
@@ -38 +39 @@
-index c135285a65..68029c6165 100644
+index 41ed6c072a..ff140d9d56 100644
@@ -41 +42 @@
-@@ -436,6 +436,12 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip,
+@@ -415,6 +415,12 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip,


More information about the stable mailing list