WSL2-Linux-Kernel/drivers/crypto/hisilicon
Kees Cook bcb03f2be9 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-10 09:39:49 +01:00
..
hpre crypto: hisilicon/hpre - fix resource leak in remove process 2022-12-31 13:14:43 +01:00
sec crypto: hisilicon - Kunpeng916 crypto driver don't sleep when in softirq 2022-08-17 14:23:28 +02:00
sec2 crypto: hisilicon/sec - fix auth key size error 2022-08-17 14:23:35 +02:00
trng crypto: hisilicon/trng - add version to adapt new algorithm 2021-04-16 21:16:31 +10:00
zip crypto: hisilicon/zip - fix mismatch in get/set sgl_sge_nr 2022-10-26 12:35:24 +02:00
Kconfig crypto: hisilicon/hpre - fix Kconfig 2021-03-26 20:15:57 +11:00
Makefile crypto: hisilicon/trng - add HiSilicon TRNG driver support 2020-11-27 17:13:43 +11:00
qm.c crypto: hisilicon/qm - fix missing destroy qp_idr 2022-12-31 13:14:21 +01:00
qm.h crypto: hisilicon/qm - add missing pci_dev_put() in q_num_set() 2022-12-31 13:14:23 +01:00
sgl.c crypto: hisilicon: Wipe entire pool on error 2023-03-10 09:39:49 +01:00