patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Ji, Kai" <kai.ji@intel.com>
To: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>, Akhil Goyal <gakhil@marvell.com>,
	Fan Zhang <fanzhang.oss@gmail.com>
Cc: "anoobj@marvell.com" <anoobj@marvell.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [PATCH] crypto/openssl: validate incorrect signature in verify op
Date: Mon, 17 Feb 2025 10:47:52 +0000	[thread overview]
Message-ID: <DS0PR11MB745813B2C7CF3717F0E69F7A81FB2@DS0PR11MB7458.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20250216142822.1508-1-gmuthukrishn@marvell.com>

[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]




________________________________
From: Gowrishankar Muthukrishnan
Sent: Sunday, February 16, 2025 14:28
To: dev@dpdk.org; Akhil Goyal; Ji, Kai; Fan Zhang
Cc: anoobj@marvell.com; Gowrishankar Muthukrishnan; stable@dpdk.org
Subject: [PATCH] crypto/openssl: validate incorrect signature in verify op

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")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index b090611bd0..239688ed47 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2710,6 +2710,8 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
                 return ret;
         }

+       cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
+
[Kai] I dont see any status need to be change between L.2694 to here, unless I missing anyhere.

         switch (op->rsa.op_type) {
         case RTE_CRYPTO_ASYM_OP_ENCRYPT:
                 if (EVP_PKEY_encrypt_init(rsa_ctx) != 1)
@@ -2807,6 +2809,7 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
                                 op->rsa.sign.data,
                                 op->rsa.sign.length) <= 0) {
                         OPENSSL_free(tmp);
+                       ret = 0;
[Kai] Please add some comments why ret need to return 0
                         goto err_rsa;
                 }

--
2.25.1


[-- Attachment #2: Type: text/html, Size: 4065 bytes --]

  reply	other threads:[~2025-02-17 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-16 14:28 Gowrishankar Muthukrishnan
2025-02-17 10:47 ` Ji, Kai [this message]
2025-02-21 17:05 ` [PATCH v2] " Gowrishankar Muthukrishnan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DS0PR11MB745813B2C7CF3717F0E69F7A81FB2@DS0PR11MB7458.namprd11.prod.outlook.com \
    --to=kai.ji@intel.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=gmuthukrishn@marvell.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).