patch 'app/testpmd: fix crash in flow rule parser' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 13:58:56 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3d2797decc4bb581f0c05edf6bc4975aed921c75
Thanks.
Kevin
---
>From 3d2797decc4bb581f0c05edf6bc4975aed921c75 Mon Sep 17 00:00:00 2001
From: Artin Davari <artin.davari at broadcom.com>
Date: Tue, 21 Jul 2026 13:09:31 -0600
Subject: [PATCH] app/testpmd: fix crash in flow rule parser
[ upstream commit 76c44a9ea062ed355ea0abd79387a075834bcfd7 ]
Replace temporary stack arrays in the flow rule parser with static
arrays in three parse functions - prefix spec, RSS type, and RSS
queue handling - to prevent invalid pointer access during parsing
of complex flow rules.
NEXT_ENTRY() expands to a compound literal, which has automatic
storage duration when used inside a function body. The parser stores
the resulting pointer in ctx->next[], which is dereferenced after the
function returns, so the stack storage backing it is no longer valid
by the time it is accessed. Declaring the arrays 'static const' gives
them a lifetime that outlives the call, fixing the dangling pointer.
Fixes: c439a84f1a78 ("app/testpmd: fix build with MSVC on non-constant initializer")
Signed-off-by: Artin Davari <artin.davari at broadcom.com>
---
.mailmap | 1 +
app/test-pmd/cmdline_flow.c | 9 ++++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/.mailmap b/.mailmap
index 597910ea37..203e659f57 100644
--- a/.mailmap
+++ b/.mailmap
@@ -158,4 +158,5 @@ Artem V. Andreev <artem.andreev at oktetlabs.ru>
Artemii Morozov <artemii.morozov at arknetworks.am>
Artemy Kovalyov <artemyko at nvidia.com>
+Artin Davari <artin.davari at broadcom.com>
Artur Rojek <ar at semihalf.com>
Artur Trybula <arturx.trybula at intel.com>
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 5188d3afdd..433605b38b 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -8836,4 +8836,5 @@ parse_vc_spec(struct context *ctx, const struct token *token,
void *buf, unsigned int size)
{
+ static const enum index next_prefix[] = { COMMON_PREFIX, ZERO };
struct buffer *out = buf;
struct rte_flow_item *item;
@@ -8862,5 +8863,5 @@ parse_vc_spec(struct context *ctx, const struct token *token,
if (ctx->next_num < 2)
return -1;
- ctx->next[ctx->next_num - 2] = NEXT_ENTRY(COMMON_PREFIX);
+ ctx->next[ctx->next_num - 2] = next_prefix;
/* Fall through. */
case ITEM_PARAM_MASK:
@@ -9304,4 +9305,5 @@ parse_vc_action_rss_type(struct context *ctx, const struct token *token,
void *buf, unsigned int size)
{
+ static const enum index next_rss_type[] = { ACTION_RSS_TYPE, ZERO };
struct action_rss_data *action_rss_data;
unsigned int i;
@@ -9329,5 +9331,5 @@ parse_vc_action_rss_type(struct context *ctx, const struct token *token,
if (ctx->next_num == RTE_DIM(ctx->next))
return -1;
- ctx->next[ctx->next_num++] = NEXT_ENTRY(ACTION_RSS_TYPE);
+ ctx->next[ctx->next_num++] = next_rss_type;
if (!ctx->object)
return len;
@@ -9347,4 +9349,5 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
void *buf, unsigned int size)
{
+ static const enum index next_rss_queue[] = { ACTION_RSS_QUEUE, ZERO };
struct action_rss_data *action_rss_data;
const struct arg *arg;
@@ -9379,5 +9382,5 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
if (ctx->next_num == RTE_DIM(ctx->next))
return -1;
- ctx->next[ctx->next_num++] = NEXT_ENTRY(ACTION_RSS_QUEUE);
+ ctx->next[ctx->next_num++] = next_rss_queue;
end:
if (!ctx->object)
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:39.647424720 +0000
+++ 0010-app-testpmd-fix-crash-in-flow-rule-parser.patch 2026-12-03 12:52:39.020938567 +0000
@@ -1 +1 @@
-From 76c44a9ea062ed355ea0abd79387a075834bcfd7 Mon Sep 17 00:00:00 2001
+From 3d2797decc4bb581f0c05edf6bc4975aed921c75 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 76c44a9ea062ed355ea0abd79387a075834bcfd7 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -28 +29 @@
-index 9e45cdce8f..cc79a026e7 100644
+index 597910ea37..203e659f57 100644
@@ -31 +32 @@
-@@ -160,4 +160,5 @@ Artem V. Andreev <artem.andreev at oktetlabs.ru>
+@@ -158,4 +158,5 @@ Artem V. Andreev <artem.andreev at oktetlabs.ru>
@@ -38 +39 @@
-index fbbe36233b..661a05f59f 100644
+index 5188d3afdd..433605b38b 100644
@@ -41 +42 @@
-@@ -8860,4 +8860,5 @@ parse_vc_spec(struct context *ctx, const struct token *token,
+@@ -8836,4 +8836,5 @@ parse_vc_spec(struct context *ctx, const struct token *token,
@@ -47 +48 @@
-@@ -8886,5 +8887,5 @@ parse_vc_spec(struct context *ctx, const struct token *token,
+@@ -8862,5 +8863,5 @@ parse_vc_spec(struct context *ctx, const struct token *token,
@@ -54 +55 @@
-@@ -9328,4 +9329,5 @@ parse_vc_action_rss_type(struct context *ctx, const struct token *token,
+@@ -9304,4 +9305,5 @@ parse_vc_action_rss_type(struct context *ctx, const struct token *token,
@@ -60 +61 @@
-@@ -9353,5 +9355,5 @@ parse_vc_action_rss_type(struct context *ctx, const struct token *token,
+@@ -9329,5 +9331,5 @@ parse_vc_action_rss_type(struct context *ctx, const struct token *token,
@@ -67 +68 @@
-@@ -9371,4 +9373,5 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
+@@ -9347,4 +9349,5 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
@@ -73 +74 @@
-@@ -9403,5 +9406,5 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
+@@ -9379,5 +9382,5 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
More information about the stable
mailing list