[dpdk-stable] patch 'crypto/qat: fix null auth algo overwrite' has been queued to LTS release 16.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Feb 7 17:46:35 CET 2018


Hi,

FYI, your patch has been queued to LTS release 16.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/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 60c716b84bfa6566612e45bd1c93e36bab37e9dd Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe at intel.com>
Date: Thu, 25 Jan 2018 17:19:14 +0000
Subject: [PATCH] crypto/qat: fix null auth algo overwrite

[ upstream commit 4e0955bddb0880949fb12de3a1a8f07eb9ace832 ]

If auth algorithm is RTE_CRYPTO_AUTH_NULL and digest_length is 0
in the xform and digest pointer is set in the op, then
the PMD may overwrite memory at the digest pointer.
With this patch the memory is not overwritten.

Fixes: db0e952a5c01 ("crypto/qat: add NULL capability")

Signed-off-by: Fiona Trahe <fiona.trahe at intel.com>
Acked-by: Radu Nicolau <radu.nicolau at intel.com>
---
 drivers/crypto/qat/qat_crypto.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 8b830b80f..a9416790c 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -1085,8 +1085,9 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg)
 			ICP_QAT_FW_LA_DIGEST_IN_BUFFER_SET(
 					qat_req->comn_hdr.serv_specif_flags,
 					ICP_QAT_FW_LA_NO_DIGEST_IN_BUFFER);
-			auth_param->auth_res_addr =
-					op->sym->auth.digest.phys_addr;
+			if (likely(ctx->qat_hash_alg != ICP_QAT_HW_AUTH_ALGO_NULL))
+				auth_param->auth_res_addr =
+						op->sym->auth.digest.phys_addr;
 			digest_appended = 0;
 		}
 
-- 
2.14.2



More information about the stable mailing list