patch 'test/crypto: check for vdev args overflow' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 20 15:56:10 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.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 02/22/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/c3d2067881d82e0e7cd6db2c3fb164ffe7b66d03
Thanks.
Luca Boccassi
---
>From c3d2067881d82e0e7cd6db2c3fb164ffe7b66d03 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 1d5f87242d..84b85615db 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -17564,8 +17564,15 @@ scheduler_testsuite_setup(void)
RTE_LCORE_FOREACH_WORKER(i) {
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));
worker_core_count++;
@@ -17579,8 +17586,14 @@ scheduler_testsuite_setup(void)
return TEST_FAILED;
}
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(
rte_cryptodev_driver_id_get(
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:45.857755261 +0000
+++ 0068-test-crypto-check-for-vdev-args-overflow.patch 2026-02-20 14:55:43.264192090 +0000
@@ -1 +1 @@
-From 35cd4ce4bdca34b66d06ac23e88b589ea0b390b9 Mon Sep 17 00:00:00 2001
+From c3d2067881d82e0e7cd6db2c3fb164ffe7b66d03 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 35cd4ce4bdca34b66d06ac23e88b589ea0b390b9 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 9bdd357727..3269583f74 100644
+index 1d5f87242d..84b85615db 100644
@@ -23 +24 @@
-@@ -17713,8 +17713,15 @@ scheduler_testsuite_setup(void)
+@@ -17564,8 +17564,15 @@ scheduler_testsuite_setup(void)
@@ -41 +42 @@
-@@ -17728,8 +17735,14 @@ scheduler_testsuite_setup(void)
+@@ -17579,8 +17586,14 @@ scheduler_testsuite_setup(void)
More information about the stable
mailing list