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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Mar 7 13:24:23 CET 2025


Hi,

FYI, your patch has been queued to stable release 22.11.8

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/09/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c174c2bdcbe73b47a291a6145806c0bfdd534d4d

Thanks.

Luca Boccassi

---
>From c174c2bdcbe73b47a291a6145806c0bfdd534d4d 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 679a7bbeb6..01a7e5e30b 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2805,9 +2805,15 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
 			goto err_rsa;
 		}
 
-		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.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-03-07 12:23:38.889368579 +0000
+++ 0024-crypto-openssl-validate-incorrect-RSA-signature.patch	2025-03-07 12:23:38.026838877 +0000
@@ -1 +1 @@
-From 6c209dd8785f34bfdc99b869c14e063d084508c2 Mon Sep 17 00:00:00 2001
+From c174c2bdcbe73b47a291a6145806c0bfdd534d4d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6c209dd8785f34bfdc99b869c14e063d084508c2 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index b090611bd0..5bfad92b7c 100644
+index 679a7bbeb6..01a7e5e30b 100644
@@ -22 +23 @@
-@@ -2803,9 +2803,15 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
+@@ -2805,9 +2805,15 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,


More information about the stable mailing list