OpenCloudOS-Kernel/drivers/crypto/bcm
Aleksandr Mishin d0f14ae223 crypto: bcm - Fix pointer arithmetic
[ Upstream commit 2b3460cbf454c6b03d7429e9ffc4fe09322eb1a9 ]

In spu2_dump_omd() value of ptr is increased by ciph_key_len
instead of hash_iv_len which could lead to going beyond the
buffer boundaries.
Fix this bug by changing ciph_key_len to hash_iv_len.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 9d12ba86f8 ("crypto: brcm - Add Broadcom SPU driver")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-12 11:11:31 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cipher.c crypto: drivers - Explicitly include correct DT includes 2023-08-23 11:04:23 +08:00
cipher.h crypto: bcm - Use subrequest for fallback 2023-01-27 18:58:09 +08:00
spu.c crypto: bcm - Fix a whole host of kernel-doc misdemeanours 2021-03-26 20:02:35 +11:00
spu.h crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
spu2.c crypto: bcm - Fix pointer arithmetic 2024-06-12 11:11:31 +02:00
spu2.h crypto: bcm - Fix sparse warnings 2021-01-22 14:58:01 +11:00
spum.h crypto: bcm - Fix sparse warnings 2021-01-22 14:58:01 +11:00
util.c crypto: bcm - Fix a whole host of kernel-doc misdemeanours 2021-03-26 20:02:35 +11:00
util.h crypto: bcm - Fix sparse warnings 2021-01-22 14:58:01 +11:00