android_kernel_xiaomi_sm8450/drivers/crypto
Herbert Xu a718b6d2a3 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:32:34 +02:00
..
allwinner crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs() 2023-05-17 11:48:13 +02:00
amcc crypto: crypto4xx - Call dma_unmap_page when done 2023-03-11 16:39:28 +01:00
amlogic crypto: amlogic - Remove kcalloc without check 2023-01-14 10:15:52 +01:00
axis treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
bcm crypto: bcm - Fix pointer arithmetic 2024-06-16 13:32:01 +02:00
caam crypto: caam/jr - fix Chacha20 + Poly1305 self test failure 2023-11-20 11:06:50 +01:00
cavium crypto: nitrox - avoid double free on error path in nitrox_sriov_init() 2023-01-14 10:15:46 +01:00
ccp crypto: ccp - drop platform ifdef checks 2024-06-16 13:32:02 +02:00
ccree crypto: ccree - Make cc_debugfs_global_fini() available for module init function 2023-01-14 10:15:50 +01:00
chelsio crypto: chelsio - Read rxchannel-id from firmware 2021-05-14 09:50:19 +02:00
hisilicon crypto: hisilicon/hpre - Fix a erroneous check after snprintf() 2023-11-20 11:06:50 +01:00
inside-secure crypto: safexcel - Cleanup ring IRQ workqueues on load failure 2023-05-17 11:47:34 +02:00
marvell crypto: marvell/cesa - Fix type mismatch warning 2023-07-27 08:44:00 +02:00
mediatek crypto: mediatek - simplify the return expression of mtk_dfe_dse_reset() 2020-10-02 18:02:10 +10:00
nx crypto: nx - fix build warnings when DEBUG_FS is not enabled 2023-07-27 08:43:59 +02:00
qat crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak 2024-06-16 13:32:34 +02:00
qce crypto: qce - fix uaf on qce_skcipher_register_one 2022-01-27 10:53:49 +01:00
rockchip crypto: rockchip - rework by using crypto_engine 2023-01-14 10:15:48 +01:00
stm32 crypto: stm32/crc32 - fix parsing list of devices 2024-02-23 08:42:04 +01:00
ux500 crypto: ux500 - Fix error return code in hash_hw_final() 2021-07-14 16:56:03 +02:00
virtio crypto: virtio/akcipher - Fix stack overflow on memcpy 2024-03-06 14:37:48 +00:00
vmx crypto: vmx - add missing dependencies 2022-04-08 14:40:01 +02:00
xilinx crypto: xilinx - call finalize with bh disabled 2024-03-26 18:21:56 -04:00
atmel-aes-regs.h
atmel-aes.c crypto: atmel-aes - convert to use be32_add_cpu() 2020-09-25 17:48:12 +10:00
atmel-authenc.h
atmel-ecc.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
atmel-i2c.c
atmel-i2c.h
atmel-sha204a.c
atmel-sha-regs.h
atmel-sha.c crypto: lib/sha1 - remove unnecessary includes of linux/cryptohash.h 2020-05-08 15:32:17 +10:00
atmel-tdes-regs.h
atmel-tdes.c crypto: atmel-tdes - use semicolons rather than commas to separate statements 2020-10-02 18:02:15 +10:00
exynos-rng.c
geode-aes.c
geode-aes.h
hifn_795x.c crypto: drivers - use semicolons rather than commas to separate statements 2020-10-02 18:02:15 +10:00
img-hash.c crypto: img-hash - Fix variable dereferenced before check 'hdev->req' 2023-01-14 10:15:53 +01:00
ixp4xx_crypto.c crypto: ixp4xx - update IV after requests 2021-07-14 16:56:03 +02:00
Kconfig crypto: sa2ul - Select CRYPTO_DES 2023-05-17 11:47:49 +02:00
Makefile crypto: sa2ul - Add crypto driver 2020-07-23 17:34:16 +10:00
mxs-dcp.c crypto: mxs-dcp - Fix scatterlist processing 2022-04-08 14:39:59 +02:00
n2_asm.S
n2_core.c crypto: n2 - add missing hash statesize 2023-01-14 10:16:36 +01:00
n2_core.h
omap-aes-gcm.c crypto: omap-aes - avoid spamming console with self tests 2020-06-04 22:03:39 +10:00
omap-aes.c crypto: omap-aes - Fix broken pm_runtime_and_get() usage 2022-01-27 10:54:24 +01:00
omap-aes.h crypto: omap-aes - permit asynchronous skcipher as fallback 2020-07-16 21:49:02 +10:00
omap-crypto.c crypto: omap-crypto - fix userspace copied buffer access 2020-06-04 22:03:40 +10:00
omap-crypto.h
omap-des.c crypto: omap - Fix inconsistent locking of device lists 2021-09-15 09:50:26 +02:00
omap-sham.c crypto: omap-sham - Use pm_runtime_resume_and_get() in omap_sham_probe() 2023-01-14 10:15:53 +01:00
padlock-aes.c crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
padlock-sha.c crypto: Convert to new CPU match macros 2020-03-24 21:36:06 +01:00
picoxcell_crypto_regs.h
picoxcell_crypto.c crypto: picoxcell - Fix potential race condition bug 2020-08-21 14:47:50 +10:00
qcom-rng.c crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ 2022-05-25 09:17:56 +02:00
s5p-sss.c crypto: s5p-sss - Add error handling in s5p_aes_probe() 2021-11-18 14:03:38 +01:00
sa2ul.c crypto: sa2ul - Return crypto_aead_setkey to transfer the error 2024-01-25 14:37:41 -08:00
sa2ul.h crypto: sa2ul - Add AEAD algorithm support 2020-07-23 17:34:17 +10:00
sahara.c crypto: sahara - do not resize req->src when doing hash operations 2024-01-25 14:37:43 -08:00
talitos.c crypto: talitos - Fix ctr(aes) on SEC1 2021-03-04 11:37:45 +01:00
talitos.h crypto: talitos - Work around SEC6 ERRATA (AES-CTR mode data size error) 2021-03-04 11:37:45 +01:00