linux-stable/drivers/crypto/qat
Giovanni Cabiddu 80a52e1ee7 crypto: qat - fix memory leak in RSA
When an RSA key represented in form 2 (as defined in PKCS #1 V2.1) is
used, some components of the private key persist even after the TFM is
released.
Replace the explicit calls to free the buffers in qat_rsa_exit_tfm()
with a call to qat_rsa_clear_ctx() which frees all buffers referenced in
the TFM context.

Cc: stable@vger.kernel.org
Fixes: 879f77e907 ("crypto: qat - Add RSA CRT mode")
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Adam Guerin <adam.guerin@intel.com>
Reviewed-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2022-05-20 13:49:17 +08:00
..
qat_4xxx crypto: qat - disable registration of algorithms 2022-03-09 15:12:32 +12:00
qat_c3xxx crypto: qat - fix ETR sources enabled by default on GEN2 devices 2022-04-15 16:34:26 +08:00
qat_c3xxxvf crypto: qat - config VFs based on ring-to-svc mapping 2021-12-24 14:18:27 +11:00
qat_c62x crypto: qat - fix ETR sources enabled by default on GEN2 devices 2022-04-15 16:34:26 +08:00
qat_c62xvf crypto: qat - config VFs based on ring-to-svc mapping 2021-12-24 14:18:27 +11:00
qat_common crypto: qat - fix memory leak in RSA 2022-05-20 13:49:17 +08:00
qat_dh895xcc crypto: qat - replace disable_vf2pf_interrupts() 2022-04-15 16:34:27 +08:00
qat_dh895xccvf crypto: qat - config VFs based on ring-to-svc mapping 2021-12-24 14:18:27 +11:00
Kconfig crypto: qat - introduce support for PFVF block messages 2021-12-24 14:18:26 +11:00
Makefile crypto: qat - add qat_4xxx driver 2020-11-20 14:45:34 +11:00