patch 'ip_frag: fix unsafe tailq usage' has been queued to stable release 24.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Jun 11 15:20:12 CEST 2026
Hi,
FYI, your patch has been queued to stable release 24.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/ef38088f8540fd285dc050e42d5701c55efbaa00
Thanks.
Luca Boccassi
---
>From ef38088f8540fd285dc050e42d5701c55efbaa00 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 8 Apr 2026 09:16:16 -0700
Subject: [PATCH] ip_frag: fix unsafe tailq usage
[ upstream commit fa6adb457d9f377947719f8d1beaec3347a5e98b ]
The frag table next pointer was being access after TAILQ_REMOVE().
This is not safe since it depends on TAILQ_REMOVE() not changing
next pointer. Fix by using RTE_TAILQ_FOREACH_SAFE().
Fixes: 95908f52393d ("ip_frag: free mbufs on reassembly table destroy")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
---
lib/ip_frag/ip_frag_common.h | 1 +
lib/ip_frag/rte_ip_frag_common.c | 20 ++++++++++----------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/lib/ip_frag/ip_frag_common.h b/lib/ip_frag/ip_frag_common.h
index 51fc9d47fb..34be5bb6ab 100644
--- a/lib/ip_frag/ip_frag_common.h
+++ b/lib/ip_frag/ip_frag_common.h
@@ -8,6 +8,7 @@
#include <sys/queue.h>
#include <rte_common.h>
+#include <rte_tailq.h>
#if defined(RTE_ARCH_ARM64)
#include <rte_cmp_arm64.h>
diff --git a/lib/ip_frag/rte_ip_frag_common.c b/lib/ip_frag/rte_ip_frag_common.c
index 05f9e479c2..c49a2738c4 100644
--- a/lib/ip_frag/rte_ip_frag_common.c
+++ b/lib/ip_frag/rte_ip_frag_common.c
@@ -129,18 +129,18 @@ rte_ip_frag_table_del_expired_entries(struct rte_ip_frag_tbl *tbl,
struct rte_ip_frag_death_row *dr, uint64_t tms)
{
uint64_t max_cycles;
- struct ip_frag_pkt *fp;
+ struct ip_frag_pkt *fp, *tmp;
max_cycles = tbl->max_cycles;
- TAILQ_FOREACH(fp, &tbl->lru, lru)
- if (max_cycles + fp->start < tms) {
- /* check that death row has enough space */
- if (RTE_IP_FRAG_DEATH_ROW_MBUF_LEN - dr->cnt >=
- fp->last_idx)
- ip_frag_tbl_del(tbl, dr, fp);
- else
- return;
- } else
+ RTE_TAILQ_FOREACH_SAFE(fp, &tbl->lru, lru, tmp) {
+ if (max_cycles + fp->start >= tms)
return;
+
+ /* check that death row has enough space */
+ if (RTE_IP_FRAG_DEATH_ROW_MBUF_LEN - dr->cnt < fp->last_idx)
+ return;
+
+ ip_frag_tbl_del(tbl, dr, fp);
+ }
}
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-06-11 14:20:03.827599880 +0100
+++ 0063-ip_frag-fix-unsafe-tailq-usage.patch 2026-06-11 14:20:01.274747441 +0100
@@ -1 +1 @@
-From fa6adb457d9f377947719f8d1beaec3347a5e98b Mon Sep 17 00:00:00 2001
+From ef38088f8540fd285dc050e42d5701c55efbaa00 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa6adb457d9f377947719f8d1beaec3347a5e98b ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -33 +34 @@
-index ee9aa93027..79ac45289b 100644
+index 05f9e479c2..c49a2738c4 100644
@@ -36 +37 @@
-@@ -135,18 +135,18 @@ rte_ip_frag_table_del_expired_entries(struct rte_ip_frag_tbl *tbl,
+@@ -129,18 +129,18 @@ rte_ip_frag_table_del_expired_entries(struct rte_ip_frag_tbl *tbl,
More information about the stable
mailing list