Acked-by: Kai Ji <kai.ji@intel.com>


From: Power, Ciara <ciara.power@intel.com>
Sent: 03 November 2023 15:45
To: dev@dpdk.org <dev@dpdk.org>
Cc: Power, Ciara <ciara.power@intel.com>; Ji, Kai <kai.ji@intel.com>; gmuthukrishn@marvell.com <gmuthukrishn@marvell.com>; sunila.sahu@caviumnetworks.com <sunila.sahu@caviumnetworks.com>; stable@dpdk.org <stable@dpdk.org>
Subject: [PATCH] crypto/openssl: fix asym memory leaks
 
Numerous memory leaks were detected by ASAN
in the OpenSSL PMD asymmetric code path.

These are now fixed to free all variables allocated
by OpenSSL functions such as BN_bin2bn and
OSSL_PARAM_BLD_new.

Some need to exist until the op is processed,
for example the BIGNUMs associated with DSA.
The pointers for these are added to the private
asym session so they can be accessed later when calling free.

Fixes: 4c7ae22f1f83 ("crypto/openssl: update DSA routine with 3.0 EVP API")
Fixes: c794b40c9258 ("crypto/openssl: update DH routine with 3.0 EVP API")
Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2")
Fixes: ac42813a0a7c ("crypto/openssl: add DH and DSA asym operations")
Fixes: d7bd42f6db19 ("crypto/openssl: update RSA routine with 3.0 EVP API")
Cc: kai.ji@intel.com
Cc: gmuthukrishn@marvell.com
Cc: sunila.sahu@caviumnetworks.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
Depends-on: patch-133837 ("crypto/openssl: fix memory leaks in asym ops")
---
2.34.1