patch 'cmdline: guard zero-size destination buffers' has been queued to stable release 25.11.3
Kevin Traynor
ktraynor at redhat.com
Thu Jul 23 19:14:28 CEST 2026
Hi,
FYI, your patch has been queued to stable release 25.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/27/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/2cae03e4e421dc19a1e965060c8acfeb0e6c0959
Thanks.
Kevin
---
>From 2cae03e4e421dc19a1e965060c8acfeb0e6c0959 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Thu, 7 May 2026 15:59:48 +0100
Subject: [PATCH] cmdline: guard zero-size destination buffers
[ upstream commit d503e984003ce151c79f083cb6c59483893c57b1 ]
Add missing zero-size destination checks in cmdline helper routines.
Always check for size == 0, before doing an assignment of '\0' to string
position of "size - 1".
Fixes: af75078fece3 ("first public release")
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
lib/cmdline/cmdline_parse_num.c | 2 +-
lib/cmdline/cmdline_parse_string.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/cmdline/cmdline_parse_num.c b/lib/cmdline/cmdline_parse_num.c
index f21796bedb..4cfc900391 100644
--- a/lib/cmdline/cmdline_parse_num.c
+++ b/lib/cmdline/cmdline_parse_num.c
@@ -324,5 +324,5 @@ cmdline_get_help_num(cmdline_parse_token_hdr_t *tk, char *dstbuf, unsigned int s
int ret;
- if (!tk)
+ if (!tk || !dstbuf || size == 0)
return -1;
diff --git a/lib/cmdline/cmdline_parse_string.c b/lib/cmdline/cmdline_parse_string.c
index 731947159f..33cf89f84f 100644
--- a/lib/cmdline/cmdline_parse_string.c
+++ b/lib/cmdline/cmdline_parse_string.c
@@ -172,4 +172,7 @@ int cmdline_complete_get_elt_string(cmdline_parse_token_hdr_t *tk, int idx,
return -1;
+ if (size == 0)
+ return -1;
+
tk2 = (struct cmdline_token_string *)tk;
sd = &tk2->string_data;
--
2.55.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-23 17:57:58.865676941 +0100
+++ 0005-cmdline-guard-zero-size-destination-buffers.patch 2026-07-23 17:57:58.625560862 +0100
@@ -1 +1 @@
-From d503e984003ce151c79f083cb6c59483893c57b1 Mon Sep 17 00:00:00 2001
+From 2cae03e4e421dc19a1e965060c8acfeb0e6c0959 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d503e984003ce151c79f083cb6c59483893c57b1 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list