linux-stable/drivers/crypto
Kees Cook 1fc9760afd crypto: hisilicon: Wipe entire pool on error
[ Upstream commit aa85923a95 ]

To work around a Clang __builtin_object_size bug that shows up under
CONFIG_FORTIFY_SOURCE and UBSAN_BOUNDS, move the per-loop-iteration
mem_block wipe into a single wipe of the entire pool structure after
the loop.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/1780
Cc: Weili Qian <qianweili@huawei.com>
Cc: Zhou Wang <wangzhou1@hisilicon.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Link: https://lore.kernel.org/r/20230106041945.never.831-kees@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 16:39:50 +01:00
..
allwinner crypto: sun8i-ss - use dma_addr instead u32 2023-01-14 10:15:46 +01: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
bcm
caam crypto: caam - fix i.MX6SX entropy delay value 2022-06-06 08:42:43 +02: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 - Flush the SEV-ES TMR memory before giving it to firmware 2023-03-11 16:39:25 +01:00
ccree crypto: ccree - Make cc_debugfs_global_fini() available for module init function 2023-01-14 10:15:50 +01:00
chelsio
hisilicon crypto: hisilicon: Wipe entire pool on error 2023-03-11 16:39:50 +01:00
inside-secure crypto: inside-secure - Change swab to swab32 2022-10-26 13:25:42 +02:00
marvell crypto: marvell/octeontx - prevent integer overflows 2022-10-26 13:25:43 +02:00
mediatek
nx powerpc/powernv/vas: Assign real address to rx_fifo in vas_rx_win_attr 2022-06-09 10:20:58 +02:00
qat crypto: qat - fix DMA transfer direction 2022-10-26 13:25:42 +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 - fix reference leak in stm32_crc_remove 2022-05-25 09:17:53 +02:00
ux500 crypto: ux500 - Fix error return code in hash_hw_final() 2021-07-14 16:56:03 +02:00
virtio
vmx crypto: vmx - add missing dependencies 2022-04-08 14:40:01 +02:00
xilinx
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-01-14 10:15:53 +01:00
ixp4xx_crypto.c
Kconfig crypto: rockchip - rework by using crypto_engine 2023-01-14 10:15:48 +01:00
Makefile
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
omap-aes.c crypto: omap-aes - Fix broken pm_runtime_and_get() usage 2022-01-27 10:54:24 +01:00
omap-aes.h
omap-crypto.c
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
padlock-sha.c
picoxcell_crypto.c
picoxcell_crypto_regs.h
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 - Fix pm_runtime enable in sa_ul_probe() 2021-07-14 16:56:04 +02:00
sa2ul.h
sahara.c crypto: sahara - don't sleep when in softirq 2022-10-26 13:25:41 +02:00
talitos.c
talitos.h