patch 'crypto/openssl: validate incorrect RSA signature' has been queued to stable release 24.11.2

Kevin Traynor ktraynor at redhat.com
Fri Mar 7 13:47:10 CET 2025


Hi,

FYI, your patch has been queued to stable release 24.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 03/12/25. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1e5703cce5415e8bf08e3cc2ffe0869fd26545e0

Thanks.

Kevin

---
>From 1e5703cce5415e8bf08e3cc2ffe0869fd26545e0 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Date: Sun, 23 Feb 2025 11:34:04 +0530
Subject: [PATCH] crypto/openssl: validate incorrect RSA signature

[ upstream commit 6c209dd8785f34bfdc99b869c14e063d084508c2 ]

Return correct error status when incorrect signature is
used in RSA verify op.

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

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index b090611bd0..5bfad92b7c 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2804,7 +2804,13 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
 		}
 
-		if (EVP_PKEY_verify_recover(rsa_ctx, tmp, &outlen,
+		ret = EVP_PKEY_verify_recover(rsa_ctx, tmp, &outlen,
 				op->rsa.sign.data,
-				op->rsa.sign.length) <= 0) {
+				op->rsa.sign.length);
+		if (ret <= 0) {
+			/* OpenSSL RSA verification returns one on
+			 * successful verification, otherwise 0. Hence,
+			 * this enqueue operation should succeed even if
+			 * invalid signature has been requested in verify.
+			 */
 			OPENSSL_free(tmp);
 			goto err_rsa;
-- 
2.48.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-03-07 11:02:58.255536448 +0000
+++ 0037-crypto-openssl-validate-incorrect-RSA-signature.patch	2025-03-07 11:02:56.907335858 +0000
@@ -1 +1 @@
-From 6c209dd8785f34bfdc99b869c14e063d084508c2 Mon Sep 17 00:00:00 2001
+From 1e5703cce5415e8bf08e3cc2ffe0869fd26545e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6c209dd8785f34bfdc99b869c14e063d084508c2 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list