patch 'crypto/openssl: fix memory free' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Sun Jun 25 08:34:54 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=e3456f2478537de03017d34f18eb1fa54b694074

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From e3456f2478537de03017d34f18eb1fa54b694074 Mon Sep 17 00:00:00 2001
From: Saoirse O'Donovan <saoirse.odonovan at intel.com>
Date: Thu, 11 May 2023 13:59:44 +0000
Subject: [PATCH] crypto/openssl: fix memory free
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 26c7b4fe2e2c26dca0a6c8ee3f8b66c1898c6a59 ]

Allocated memory was being freed using 'free' when it should have been
freed using 'OPENSSL_free'. This has now been modified so that the
correct method is used to free allocated memory.

Coverity issue: 384415
Fixes: 4c7ae22f1f83 ("crypto/openssl: update DSA routine with 3.0 EVP API")

Signed-off-by: Saoirse O'Donovan <saoirse.odonovan at intel.com>
Signed-off-by: Ciara Power <ciara.power at intel.com>
Acked-by: Kai Ji <kai.ji at intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 384d262621..f65fbca300 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1927,7 +1927,7 @@ process_openssl_dsa_sign_op_evp(struct rte_crypto_op *cop,
 
 	if (EVP_PKEY_sign(dsa_ctx, dsa_sign_data, &outlen, op->message.data,
 						op->message.length) <= 0) {
-		free(dsa_sign_data);
+		OPENSSL_free(dsa_sign_data);
 		goto err_dsa_sign;
 	}
 
@@ -1935,7 +1935,7 @@ process_openssl_dsa_sign_op_evp(struct rte_crypto_op *cop,
 	DSA_SIG *sign = d2i_DSA_SIG(NULL, &dsa_sign_data_p, outlen);
 	if (!sign) {
 		OPENSSL_LOG(ERR, "%s:%d\n", __func__, __LINE__);
-		free(dsa_sign_data);
+		OPENSSL_free(dsa_sign_data);
 		goto err_dsa_sign;
 	} else {
 		const BIGNUM *r = NULL, *s = NULL;
@@ -1947,7 +1947,7 @@ process_openssl_dsa_sign_op_evp(struct rte_crypto_op *cop,
 	}
 
 	DSA_SIG_free(sign);
-	free(dsa_sign_data);
+	OPENSSL_free(dsa_sign_data);
 	return 0;
 
 err_dsa_sign:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.544251600 +0800
+++ 0076-crypto-openssl-fix-memory-free.patch	2023-06-25 14:31:58.445773900 +0800
@@ -1 +1 @@
-From 26c7b4fe2e2c26dca0a6c8ee3f8b66c1898c6a59 Mon Sep 17 00:00:00 2001
+From e3456f2478537de03017d34f18eb1fa54b694074 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 26c7b4fe2e2c26dca0a6c8ee3f8b66c1898c6a59 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list