OpenCloudOS-Kernel/drivers/crypto
Herbert Xu aa22eef1dd crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak
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: Jianping Liu <frankjpliu@tencent.com>
2024-11-28 21:43:50 +08:00
..
amcc tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
axis tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
bcm crypto: bcm - Fix pointer arithmetic 2024-11-28 15:03:50 +08:00
caam tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
cavium tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
ccp tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
ccree tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
chelsio tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
hisilicon driver: update hisilicon hardware crypto engine 2024-11-27 15:13:04 +08:00
inside-secure tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
marvell tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
mediatek ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
montage add support for Montage Mont-TSSE driver 2024-06-12 13:16:49 +08:00
nx tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
qat crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak 2024-11-28 21:43:50 +08:00
qce tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
rockchip crypto: rk3288/des - switch to new verification routines 2019-08-22 14:57:32 +10:00
stm32 tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
sunxi-ss ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
ux500 tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
virtio ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
vmx tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
Kconfig add support for Montage Mont-TSSE driver 2024-06-12 13:16:49 +08:00
Makefile add support for Montage Mont-TSSE driver 2024-06-12 13:16:49 +08:00
atmel-aes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-aes.c tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
atmel-authenc.h tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
atmel-ecc.c crypto: atmel-ecc - factor out code that can be shared 2019-05-30 15:35:45 +08:00
atmel-i2c.c crypto: atmel - Fix -Wunused-const-variable warning 2019-08-30 18:05:31 +10:00
atmel-i2c.h crypto: atmel - Fix -Wunused-const-variable warning 2019-08-30 18:05:31 +10:00
atmel-sha-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-sha.c tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
atmel-sha204a.c crypto: atmel-sha204a - Use device-managed registration API 2019-08-02 14:43:59 +10:00
atmel-tdes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-tdes.c crypto: atmel/des - switch to new verification routines 2019-08-22 14:39:38 +10:00
exynos-rng.c crypto: exynos - use devm_platform_ioremap_resource() to simplify code 2019-08-09 15:11:59 +10:00
geode-aes.c tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
geode-aes.h tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
hifn_795x.c crypto: hifn/des - switch to new verification routines 2019-08-22 14:39:40 +10:00
img-hash.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
ixp4xx_crypto.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
mxs-dcp.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
n2_asm.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
n2_core.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
n2_core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
omap-aes-gcm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
omap-aes.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
omap-aes.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
omap-crypto.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
omap-crypto.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
omap-des.c crypto: omap/des - switch to new verification routines 2019-08-22 14:57:31 +10:00
omap-sham.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
padlock-aes.c crypto: padlock/aes - switch to library version of key expansion routine 2019-07-26 14:56:02 +10:00
padlock-sha.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
picoxcell_crypto.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
picoxcell_crypto_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
qcom-rng.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
s5p-sss.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
sahara.c crypto: drivers - Remove dev_err() usage after platform_get_irq() 2019-08-09 15:11:38 +10:00
talitos.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
talitos.h ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00