patch 'crypto/qat: fix crash with CCM null AAD pointer' has been queued to stable release 22.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Mar 18 16:38:53 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.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 03/20/24. 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/a56f1654c4c4d00f7df77f61733f59c840b5c090

Thanks.

Luca Boccassi

---
>From a56f1654c4c4d00f7df77f61733f59c840b5c090 Mon Sep 17 00:00:00 2001
From: Arkadiusz Kusztal <arkadiuszx.kusztal at intel.com>
Date: Fri, 8 Mar 2024 08:25:12 +0000
Subject: [PATCH] crypto/qat: fix crash with CCM null AAD pointer

[ upstream commit e90ef1803bb34768d1446e756046020e8cbce4bc ]

This commit fixes a segfault, that occurs when NULL pointer
is being set to the AAD pointer field.

Fixes: a815a04cea05 ("crypto/qat: support symmetric build op request")

Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal at intel.com>
Acked-by: Ciara Power <ciara.power at intel.com>
---
 drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 7972c7cfeb..2b1b0eb717 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -812,10 +812,12 @@ enqueue_one_aead_job_gen1(struct qat_sym_session *ctx,
 		*(uint8_t *)&cipher_param->u.cipher_IV_array[0] =
 			q - ICP_QAT_HW_CCM_NONCE_OFFSET;
 
-		rte_memcpy((uint8_t *)aad->va +
-				ICP_QAT_HW_CCM_NONCE_OFFSET,
-			(uint8_t *)iv->va + ICP_QAT_HW_CCM_NONCE_OFFSET,
-			ctx->cipher_iv.length);
+		if (ctx->aad_len > 0) {
+			rte_memcpy((uint8_t *)aad->va +
+					ICP_QAT_HW_CCM_NONCE_OFFSET,
+				(uint8_t *)iv->va + ICP_QAT_HW_CCM_NONCE_OFFSET,
+				ctx->cipher_iv.length);
+		}
 		break;
 	default:
 		break;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.398261243 +0000
+++ 0003-crypto-qat-fix-crash-with-CCM-null-AAD-pointer.patch	2024-03-18 12:58:39.091344117 +0000
@@ -1 +1 @@
-From e90ef1803bb34768d1446e756046020e8cbce4bc Mon Sep 17 00:00:00 2001
+From a56f1654c4c4d00f7df77f61733f59c840b5c090 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e90ef1803bb34768d1446e756046020e8cbce4bc ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 60b0f0551c..1f5d2583c4 100644
+index 7972c7cfeb..2b1b0eb717 100644
@@ -22 +23 @@
-@@ -925,10 +925,12 @@ enqueue_one_aead_job_gen1(struct qat_sym_session *ctx,
+@@ -812,10 +812,12 @@ enqueue_one_aead_job_gen1(struct qat_sym_session *ctx,


More information about the stable mailing list