acrn-kernel/drivers/crypto/hisilicon
Kees Cook 94b28dc12f 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:33:50 +01:00
..
hpre crypto: hisilicon/hpre - fix resource leak in remove process 2022-12-31 13:33:05 +01:00
sec crypto: hisilicon - Kunpeng916 crypto driver don't sleep when in softirq 2022-07-08 15:21:16 +08:00
sec2 crypto: hisilicon - support get algs by the capability register 2022-09-16 18:29:46 +08:00
trng crypto: hisilicon/trng - fix local variable type 2022-06-17 17:19:20 +08:00
zip crypto: hisilicon - support get algs by the capability register 2022-09-16 18:29:46 +08:00
Kconfig crypto: ccree,hisilicon - Fix dependencies to correct algorithm 2023-01-07 11:11:52 +01:00
Makefile crypto: hisilicon/trng - add HiSilicon TRNG driver support 2020-11-27 17:13:43 +11:00
qm.c crypto: hisilicon/qm - increase the memory of local variables 2022-12-31 13:33:05 +01:00
sgl.c crypto: hisilicon: Wipe entire pool on error 2023-03-10 09:33:50 +01:00