patch 'test/crypto: check for vdev args overflow' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 26 14:09:22 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/5fc1c3f0341648a6df1b0d512eaac140643d65fc
Thanks.
Kevin
---
>From 5fc1c3f0341648a6df1b0d512eaac140643d65fc Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 21 Jan 2026 13:06:26 -0800
Subject: [PATCH] test/crypto: check for vdev args overflow
[ upstream commit 35cd4ce4bdca34b66d06ac23e88b589ea0b390b9 ]
The vdev args buffer could in theory get truncated if there were
lots of sockets or lcores. Handle that by checking return value
of snprintf.
Fixes: 8bfdd8a7f0f1 ("test/crypto: refactor to use sub test suites")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
app/test/test_cryptodev.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 9bdd357727..3269583f74 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -17714,6 +17714,13 @@ scheduler_testsuite_setup(void)
if (worker_core_count > 1)
break;
- snprintf(vdev_args, sizeof(vdev_args),
- "%s%d", temp_str, i);
+ ret = snprintf(vdev_args, sizeof(vdev_args), "%s%d", temp_str, i);
+
+ /* If too many args the result will have been truncated */
+ if (ret >= VDEV_ARGS_SIZE) {
+ RTE_LOG(ERR, USER1,
+ "Cryptodev scheduler test vdev arg size exceeded\n");
+ return TEST_FAILED;
+ }
+
strcpy(temp_str, vdev_args);
strlcat(temp_str, ";", sizeof(temp_str));
@@ -17729,6 +17736,12 @@ scheduler_testsuite_setup(void)
}
strcpy(temp_str, vdev_args);
- snprintf(vdev_args, sizeof(vdev_args), "%s,socket_id=%d",
- temp_str, socket_id);
+ ret = snprintf(vdev_args, sizeof(vdev_args), "%s,socket_id=%d", temp_str,
+ socket_id);
+ if (ret >= VDEV_ARGS_SIZE) {
+ RTE_LOG(ERR, USER1,
+ "Cryptodev scheduler test vdev arg size exceeded\n");
+ return TEST_FAILED;
+ }
+
RTE_LOG(DEBUG, USER1, "vdev_args: %s\n", vdev_args);
nb_devs = rte_cryptodev_device_count_by_driver(
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-26 10:16:50.267536930 +0000
+++ 0080-test-crypto-check-for-vdev-args-overflow.patch 2026-02-26 10:16:47.020459539 +0000
@@ -1 +1 @@
-From 35cd4ce4bdca34b66d06ac23e88b589ea0b390b9 Mon Sep 17 00:00:00 2001
+From 5fc1c3f0341648a6df1b0d512eaac140643d65fc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 35cd4ce4bdca34b66d06ac23e88b589ea0b390b9 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list