linux-stable/drivers/crypto
Giovanni Cabiddu 0f967fdc09 crypto: qat - fix memory leak in RSA
[ Upstream commit 80a52e1ee7 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-07-29 17:28:15 +02:00
..
allwinner crypto: sun8i-ss - handle zero sized sg 2022-06-09 10:30:30 +02:00
amcc crypto: amcc - fix incorrect kernel-doc comment syntax in files 2021-03-26 20:15:58 +11:00
amlogic crypto: amlogic - call finalize with bh disabled 2022-03-03 10:47:49 +12:00
axis crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
bcm crypto: bcm - Fix a whole host of kernel-doc misdemeanours 2021-03-26 20:02:35 +11:00
caam crypto: caam - fix i.MX6SX entropy delay value 2022-06-06 08:48:56 +02:00
cavium crypto: cavium/nitrox - don't cast parameter in bit operations 2022-03-03 10:49:21 +12:00
ccp crypto: ccp - Fix the INIT_EX data file open failure 2022-06-09 10:30:27 +02:00
ccree crypto: ccree - use fine grained DMA mapping dir 2022-06-09 10:29:49 +02:00
chelsio treewide: Replace open-coded flex arrays in unions 2021-10-18 12:28:53 -07:00
gemini crypto: gemini - call finalize with bh disabled 2022-03-03 10:47:49 +12:00
hisilicon VFIO updates for v5.18-rc1 2022-03-24 12:35:59 -07:00
inside-secure crypto: inside-secure - Minor typo fix in the file safexcel.c 2021-03-26 20:02:35 +11:00
keembay crypto: keembay-ocs-ecc - Fix error return code in kmb_ocs_ecc_probe() 2021-11-20 15:02:08 +11:00
marvell crypto: marvell/cesa - ECB does not IV 2022-06-09 10:30:25 +02:00
nx powerpc/powernv/vas: Assign real address to rx_fifo in vas_rx_win_attr 2022-06-09 10:29:51 +02:00
qat crypto: qat - fix memory leak in RSA 2022-07-29 17:28:15 +02:00
qce crypto: qce - fix uaf on qce_skcipher_register_one 2021-11-20 15:02:08 +11:00
rockchip crypto: rockchip - ECB does not need IV 2022-02-18 16:21:10 +11:00
stm32 crypto: stm32 - fix reference leak in stm32_crc_remove 2022-03-25 16:21:05 +12:00
ux500 crypto: ux500 - use GFP_KERNEL 2022-02-18 16:21:09 +11:00
virtio virtio-crypto: rename skcipher algs 2022-03-28 16:52:58 -04:00
vmx crypto: vmx - add missing dependencies 2022-03-03 10:49:21 +12:00
xilinx crypto: xilinx: prevent probing on non-xilinx hardware 2022-03-09 15:12:31 +12:00
atmel-aes-regs.h
atmel-aes.c crypto: atmel - add support for AES and SHA IPs available on lan966x SoC 2022-02-05 15:10:51 +11:00
atmel-authenc.h crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
atmel-ecc.c crypto: atmel-ecc - Struct headers need to start with keyword 'struct' 2021-03-26 20:02:36 +11:00
atmel-i2c.c crypto: atmel - use the correct print format 2021-04-16 21:16:33 +10:00
atmel-i2c.h
atmel-sha-regs.h
atmel-sha.c crypto: atmel - add support for AES and SHA IPs available on lan966x SoC 2022-02-05 15:10:51 +11:00
atmel-sha204a.c
atmel-tdes-regs.h
atmel-tdes.c crypto: atmel-tdes - Add support for the TDES IP available on sama7g5 SoC 2022-02-11 20:39:38 +11:00
exynos-rng.c
geode-aes.c crypto: geode - use DEFINE_SPINLOCK() for spinlock 2021-04-16 21:16:31 +10:00
geode-aes.h
hifn_795x.c
img-hash.c crypto: img-hash - remove need for error return variable ret 2021-09-17 11:06:14 +08:00
ixp4xx_crypto.c ARM: ixp4xx: Drop all common code 2022-02-12 18:20:04 +01:00
Kconfig crypto: xilinx - Turn SHA into a tristate and allow COMPILE_TEST 2022-03-14 14:45:45 +12:00
Makefile crypto: xilinx - Updated Makefile for xilinx subdirectory 2022-03-03 10:49:21 +12:00
mxs-dcp.c crypto: mxs-dcp - Fix scatterlist processing 2022-01-31 11:21:46 +11:00
n2_asm.S
n2_core.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
n2_core.h
omap-aes-gcm.c
omap-aes.c crypto: omap-aes - Constify static attribute_group 2022-02-18 16:21:09 +11:00
omap-aes.h
omap-crypto.c crypto: omap - Avoid redundant copy when using truncated sg list 2021-08-21 15:44:53 +08:00
omap-crypto.h
omap-des.c crypto: omap - increase priority of DES/3DES 2021-12-24 14:18:22 +11:00
omap-sham.c crypto: omap-sham - Constify static attribute_group 2022-02-18 16:21:09 +11:00
padlock-aes.c
padlock-sha.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
qcom-rng.c crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ 2022-05-13 17:13:38 +08:00
s5p-sss.c crypto: s5p-sss - Add error handling in s5p_aes_probe() 2021-10-29 21:04:03 +08:00
sa2ul.c crypto: sa2ul - Use bitfield helpers 2021-12-03 15:56:17 +11:00
sa2ul.h crypto: sa2ul - Add support for AM64 2021-04-22 17:31:30 +10:00
sahara.c crypto: sahara - Remove unused .id_table support 2021-01-03 08:41:34 +11:00
talitos.c crypto: talitos - Fix ctr(aes) on SEC1 2021-01-29 15:57:59 +11:00
talitos.h crypto: talitos - Work around SEC6 ERRATA (AES-CTR mode data size error) 2021-01-29 15:57:58 +11:00