[dpdk-stable] patch 'app/crypto-perf: fix AAD template copy overrun' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:30:13 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2c8268b307e45be2a6dc8137e55b5e8389a4ca89

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 2c8268b307e45be2a6dc8137e55b5e8389a4ca89 Mon Sep 17 00:00:00 2001
From: Przemyslaw Zegan <przemyslawx.zegan at intel.com>
Date: Tue, 12 Oct 2021 12:56:11 +0000
Subject: [PATCH] app/crypto-perf: fix AAD template copy overrun
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 49c19c94dc67a3db2f8534a1e6ca253e1f08fff7 ]

This patch fixes a possible buffer overrun problem in crypto perf test.
Previously when user configured AAD size is over 12 bytes the copy
of template AAD will cause a buffer overrun.
The problem is fixed by only copy up to 12 bytes of AAD template.

Fixes: 8a5b494a7f99 ("app/test-crypto-perf: add AEAD parameters")

Signed-off-by: Przemyslaw Zegan <przemyslawx.zegan at intel.com>
Acked-by: Fan Zhang <roy.fan.zhang at intel.com>
---
 app/test-crypto-perf/cperf_test_vectors.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/test-crypto-perf/cperf_test_vectors.c b/app/test-crypto-perf/cperf_test_vectors.c
index 0af01ff911..167bf87bc4 100644
--- a/app/test-crypto-perf/cperf_test_vectors.c
+++ b/app/test-crypto-perf/cperf_test_vectors.c
@@ -554,6 +554,10 @@ cperf_test_vector_get_dummy(struct cperf_options *options)
 				rte_free(t_vec);
 				return NULL;
 			}
+
+			if (options->aead_aad_sz > sizeof(aad))
+				options->aead_aad_sz = sizeof(aad);
+
 			memcpy(t_vec->aad.data, aad, options->aead_aad_sz);
 			t_vec->aad.phys_addr = rte_malloc_virt2iova(t_vec->aad.data);
 			t_vec->aad.length = options->aead_aad_sz;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.678303986 +0800
+++ 0129-app-crypto-perf-fix-AAD-template-copy-overrun.patch	2021-11-10 14:17:01.890745927 +0800
@@ -1 +1 @@
-From 49c19c94dc67a3db2f8534a1e6ca253e1f08fff7 Mon Sep 17 00:00:00 2001
+From 2c8268b307e45be2a6dc8137e55b5e8389a4ca89 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 49c19c94dc67a3db2f8534a1e6ca253e1f08fff7 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 4bba405961..7da1a8fa2e 100644
+index 0af01ff911..167bf87bc4 100644
@@ -24 +26 @@
-@@ -590,6 +590,10 @@ cperf_test_vector_get_dummy(struct cperf_options *options)
+@@ -554,6 +554,10 @@ cperf_test_vector_get_dummy(struct cperf_options *options)


More information about the stable mailing list