patch 'crypto/openssl: fix freeing in RSA EVP' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:24:39 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

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/11/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/log/?h=22.11-staging/commit/72c1da7b2d2c8b0726a34ed675658c965151508e

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 72c1da7b2d2c8b0726a34ed675658c965151508e Mon Sep 17 00:00:00 2001
From: Kai Ji <kai.ji at intel.com>
Date: Wed, 8 Mar 2023 22:47:48 +0800
Subject: [PATCH] crypto/openssl: fix freeing in RSA EVP
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 4de0f183506c5fecbf0486780068c044b1711daf ]

Fixed ASAN heap-use-after-free error on tmp buffer.

Fixes: d7bd42f6db19 ("crypto/openssl: update RSA routine with 3.0 EVP API")

Signed-off-by: Kai Ji <kai.ji at intel.com>
Acked-by: Ciara Power <ciara.power at intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index abcb641a44..384d262621 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2633,7 +2633,7 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
 		if (EVP_PKEY_verify_recover(rsa_ctx, tmp, &outlen,
 				op->rsa.sign.data,
 				op->rsa.sign.length) <= 0) {
-			rte_free(tmp);
+			OPENSSL_free(tmp);
 			goto err_rsa;
 		}
 
@@ -2645,7 +2645,7 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
 				op->rsa.message.length)) {
 			OPENSSL_LOG(ERR, "RSA sign Verification failed");
 		}
-		rte_free(tmp);
+		OPENSSL_free(tmp);
 		break;
 
 	default:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:41.096254900 +0800
+++ 0091-crypto-openssl-fix-freeing-in-RSA-EVP.patch	2023-04-09 21:45:38.709042200 +0800
@@ -1 +1 @@
-From 4de0f183506c5fecbf0486780068c044b1711daf Mon Sep 17 00:00:00 2001
+From 72c1da7b2d2c8b0726a34ed675658c965151508e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 4de0f183506c5fecbf0486780068c044b1711daf ]
@@ -9 +11,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list