linux-stable/drivers/crypto
Herbert Xu 3fb4601e0d crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak
commit d3b17c6d9d upstream.

Using completion_done to determine whether the caller has gone
away only works after a complete call.  Furthermore it's still
possible that the caller has not yet called wait_for_completion,
resulting in another potential UAF.

Fix this by making the caller use cancel_work_sync and then freeing
the memory safely.

Fixes: 7d42e09760 ("crypto: qat - resolve race condition during AER recovery")
Cc: <stable@vger.kernel.org> #6.8+
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:39:58 +02:00
..
allwinner crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs() 2023-05-17 11:50:20 +02:00
amcc crypto: crypto4xx - Call dma_unmap_page when done 2023-03-10 09:39:17 +01:00
amlogic crypto: amlogic - Remove kcalloc without check 2022-12-31 13:14:25 +01:00
axis
bcm crypto: bcm - Fix pointer arithmetic 2024-06-16 13:39:16 +02:00
caam crypto: caam/jr - fix Chacha20 + Poly1305 self test failure 2023-11-20 11:08:22 +01:00
cavium crypto: nitrox - avoid double free on error path in nitrox_sriov_init() 2022-12-31 13:14:21 +01:00
ccp crypto: ccp - drop platform ifdef checks 2024-06-16 13:39:16 +02:00
ccree crypto: ccree - Make cc_debugfs_global_fini() available for module init function 2022-12-31 13:14:24 +01:00
chelsio
gemini
hisilicon crypto: hisilicon/hpre - Fix a erroneous check after snprintf() 2023-11-20 11:08:22 +01:00
inside-secure crypto: safexcel - Cleanup ring IRQ workqueues on load failure 2023-05-11 23:00:17 +09:00
keembay
marvell crypto: octeontx2 - Fix cptvf driver cleanup 2024-02-23 08:54:39 +01:00
nx crypto: nx - fix build warnings when DEBUG_FS is not enabled 2023-07-23 13:47:15 +02:00
qat crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak 2024-06-16 13:39:58 +02:00
qce
rockchip crypto: rockchip - rework by using crypto_engine 2022-12-31 13:14:22 +01:00
stm32 crypto: stm32/crc32 - fix parsing list of devices 2024-02-23 08:54:39 +01:00
ux500
virtio virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session() 2024-01-25 14:52:46 -08:00
vmx
xilinx crypto: xilinx - call finalize with bh disabled 2024-03-26 18:21:27 -04:00
Kconfig crypto: sa2ul - Select CRYPTO_DES 2023-05-11 23:00:27 +09:00
Makefile
atmel-aes-regs.h
atmel-aes.c
atmel-authenc.h
atmel-ecc.c
atmel-i2c.c
atmel-i2c.h
atmel-sha-regs.h
atmel-sha.c
atmel-sha204a.c
atmel-tdes-regs.h
atmel-tdes.c
exynos-rng.c
geode-aes.c
geode-aes.h
hifn_795x.c
img-hash.c crypto: img-hash - Fix variable dereferenced before check 'hdev->req' 2022-12-31 13:14:26 +01:00
ixp4xx_crypto.c
mxs-dcp.c
n2_asm.S
n2_core.c crypto: n2 - add missing hash statesize 2023-01-12 11:58:58 +01:00
n2_core.h
omap-aes-gcm.c
omap-aes.c
omap-aes.h
omap-crypto.c
omap-crypto.h
omap-des.c
omap-sham.c crypto: omap-sham - Use pm_runtime_resume_and_get() in omap_sham_probe() 2022-12-31 13:14:26 +01:00
padlock-aes.c
padlock-sha.c
qcom-rng.c
s5p-sss.c
sa2ul.c crypto: sa2ul - Return crypto_aead_setkey to transfer the error 2024-01-25 14:52:34 -08:00
sa2ul.h
sahara.c crypto: sahara - do not resize req->src when doing hash operations 2024-01-25 14:52:35 -08:00
talitos.c
talitos.h