Ubuntu-focal-kernel/drivers/crypto
Herbert Xu 988a0f5242 crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak
BugLink: https://bugs.launchpad.net/bugs/2071668

commit d3b17c6d9dddc2db3670bc9be628b122416a3d26 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: 7d42e097607c ("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>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2024-07-05 10:52:03 +02:00
..
amcc crypto: crypto4xx - Call dma_unmap_page when done 2023-05-12 17:15:02 +02:00
axis
bcm crypto: bcm - Fix pointer arithmetic 2024-07-05 10:51:56 +02:00
caam crypto: caam/jr - fix Chacha20 + Poly1305 self test failure 2024-02-02 14:13:04 +01:00
cavium crypto: cavium - prevent integer overflow loading firmware 2023-01-06 08:44:02 -08:00
ccp crypto: ccp - drop platform ifdef checks 2024-07-05 10:51:56 +02:00
ccree crypto: ccree - Make cc_debugfs_global_fini() available for module init function 2023-02-01 15:22:45 +01:00
chelsio chtls: fix tp->rcv_tstamp initialization 2024-02-02 14:13:02 +01:00
hisilicon
inside-secure crypto: safexcel - Cleanup ring IRQ workqueues on load failure 2023-08-09 12:25:24 +02:00
marvell crypto: marvell/cesa - Fix type mismatch warning 2023-10-02 12:12:06 +02:00
mediatek
nx crypto: nx - fix build warnings when DEBUG_FS is not enabled 2023-10-02 12:12:05 +02:00
qat crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak 2024-07-05 10:52:03 +02:00
qce
rockchip
stm32 crypto: stm32/crc32 - fix parsing list of devices 2024-03-28 15:18:34 +01:00
sunxi-ss
ux500
virtio crypto: virtio - Wait for tasklet to complete on device remove 2024-02-29 15:23:35 +01:00
vmx
Kconfig
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' 2023-02-01 15:22:50 +01:00
ixp4xx_crypto.c
mxs-dcp.c
n2_asm.S
n2_core.c crypto: n2 - add missing hash statesize 2023-02-01 15:23:26 +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() 2023-02-01 15:22:49 +01:00
padlock-aes.c
padlock-sha.c
picoxcell_crypto.c
picoxcell_crypto_regs.h
qcom-rng.c
s5p-sss.c
sahara.c crypto: sahara - do not resize req->src when doing hash operations 2024-02-29 15:23:35 +01:00
talitos.c
talitos.h