patch 'test/crypto: check for vdev args overflow' has been queued to stable release 23.11.7
Shani Peretz
shperetz at nvidia.com
Tue Mar 31 08:24:26 CEST 2026
Hi,
FYI, your patch has been queued to stable release 23.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 04/05/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/shanipr/dpdk-stable
This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/8a7b4125074d48a7ff80be4085e49a2e16b12494
Thanks.
Shani
---
>From 8a7b4125074d48a7ff80be4085e49a2e16b12494 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 e20a4a5c77..5dcdc75c9f 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -16052,8 +16052,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++;
@@ -16067,8 +16074,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.43.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-31 00:32:34.990912489 +0300
+++ 0067-test-crypto-check-for-vdev-args-overflow.patch 2026-03-31 00:32:29.211336000 +0300
@@ -1 +1 @@
-From 35cd4ce4bdca34b66d06ac23e88b589ea0b390b9 Mon Sep 17 00:00:00 2001
+From 8a7b4125074d48a7ff80be4085e49a2e16b12494 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 e20a4a5c77..5dcdc75c9f 100644
@@ -23 +24 @@
-@@ -17713,8 +17713,15 @@ scheduler_testsuite_setup(void)
+@@ -16052,8 +16052,15 @@ scheduler_testsuite_setup(void)
@@ -41 +42 @@
-@@ -17728,8 +17735,14 @@ scheduler_testsuite_setup(void)
+@@ -16067,8 +16074,14 @@ scheduler_testsuite_setup(void)
More information about the stable
mailing list