crypto/openssl: fix of ASAN heap-use-after-free
PATCH 1/1 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")
Signed-off-by Kai Ji <[email protected]>
--- drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/openssl/rte_openssl_pmd.c +2 -2
@@ -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 :
Signature · 1 line
2.17.1
Hey Kai,
Quoted 9 lines
-----Original Message-----
From: Kai Ji <[email protected]>
Sent: Wednesday 8 March 2023 14:48
To: [email protected]
Cc: [email protected]; Ji, Kai <[email protected]>
Subject: [dpdk-dev v1]crypto/openssl: fix of ASAN heap-use-after-freefix of ASAN report on heap-use-after-free error on tmp buffer.
Quoted 9 lines
Fixes d7bd42f6db19 ("crypto/openssl: update RSA routine with 3.0 EVPAPI")
Cc: [email protected]Signed-off-by Kai Ji <[email protected]>--- drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[CP]
Need to add cc for [email protected]
Acked-by Ciara Power <[email protected]>
Akhil Goyal
AppliedQuoted 14 lines
Quoted 4 lines
Subject: [dpdk-dev v1]
crypto/openssl: fix of ASAN heap-use-after-freefix of ASAN report on heap-use-after-free error on tmp buffer.
Quoted 9 lines
Fixes d7bd42f6db19 ("crypto/openssl: update RSA routine with 3.0 EVPAPI")
Cc: [email protected]Signed-off-by Kai Ji <[email protected]>--- drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines
[CP]
Need to add cc for [email protected]Acked-by Ciara Power <[email protected]>
Applied to dpdk-next-crypto
Cc: [email protected]
Thanks.