DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev v1] crypto/openssl: fix of ASAN heap-use-after-free
@ 2023-03-08 14:47 Kai Ji
  2023-03-10 15:18 ` Power, Ciara
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Ji @ 2023-03-08 14:47 UTC (permalink / raw)
  To: dev; +Cc: gakhil, Kai Ji

fix of ASAN report on heap-use-after-free error on tmp buffer.

Fixes: d7bd42f6db19 ("crypto/openssl: update RSA routine with 3.0 EVP API")
Cc: kai.ji@intel.com

Signed-off-by: Kai Ji <kai.ji@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.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [dpdk-dev v1] crypto/openssl: fix of ASAN heap-use-after-free
  2023-03-08 14:47 [dpdk-dev v1] crypto/openssl: fix of ASAN heap-use-after-free Kai Ji
@ 2023-03-10 15:18 ` Power, Ciara
  2023-03-11 18:57   ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Power, Ciara @ 2023-03-10 15:18 UTC (permalink / raw)
  To: Ji, Kai, dev; +Cc: gakhil, Ji, Kai

Hey Kai,

> -----Original Message-----
> From: Kai Ji <kai.ji@intel.com>
> Sent: Wednesday 8 March 2023 14:48
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Ji, Kai <kai.ji@intel.com>
> Subject: [dpdk-dev v1] crypto/openssl: fix of ASAN heap-use-after-free
> 
> fix of ASAN report on heap-use-after-free error on tmp buffer.
> 
> Fixes: d7bd42f6db19 ("crypto/openssl: update RSA routine with 3.0 EVP
> API")
> Cc: kai.ji@intel.com
> 
> Signed-off-by: Kai Ji <kai.ji@intel.com>
> ---
>  drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

[CP] 
Need to add cc for stable@dpdk.org 

Acked-by: Ciara Power <ciara.power@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [dpdk-dev v1] crypto/openssl: fix of ASAN heap-use-after-free
  2023-03-10 15:18 ` Power, Ciara
@ 2023-03-11 18:57   ` Akhil Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2023-03-11 18:57 UTC (permalink / raw)
  To: Power, Ciara, Ji, Kai, dev; +Cc: Ji, Kai, stable

> > Subject: [dpdk-dev v1] crypto/openssl: fix of ASAN heap-use-after-free
> >
> > fix of ASAN report on heap-use-after-free error on tmp buffer.
> >
> > Fixes: d7bd42f6db19 ("crypto/openssl: update RSA routine with 3.0 EVP
> > API")
> > Cc: kai.ji@intel.com
> >
> > Signed-off-by: Kai Ji <kai.ji@intel.com>
> > ---
> >  drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> 
> [CP]
> Need to add cc for stable@dpdk.org
> 
> Acked-by: Ciara Power <ciara.power@intel.com>
Applied to dpdk-next-crypto
Cc: stable@dpdk.org
Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-11 18:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-08 14:47 [dpdk-dev v1] crypto/openssl: fix of ASAN heap-use-after-free Kai Ji
2023-03-10 15:18 ` Power, Ciara
2023-03-11 18:57   ` Akhil Goyal

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).