Skip to content

Commit 9e03dd2

Browse files
committed
crypto: bcm - Fix pointer arithmetic
jira LE-1907 cve CVE-2024-38579 Rebuild_History Non-Buildable kernel-5.14.0-427.33.1.el9_4 commit-author Aleksandr Mishin <amishin@t-argos.ru> commit 2b3460c 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: 9d12ba8 ("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> (cherry picked from commit 2b3460c) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent b2e3d3c commit 9e03dd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/crypto/bcm/spu2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ static void spu2_dump_omd(u8 *omd, u16 hash_key_len, u16 ciph_key_len,
495495
if (hash_iv_len) {
496496
packet_log(" Hash IV Length %u bytes\n", hash_iv_len);
497497
packet_dump(" hash IV: ", ptr, hash_iv_len);
498-
ptr += ciph_key_len;
498+
ptr += hash_iv_len;
499499
}
500500

501501
if (ciph_iv_len) {

0 commit comments

Comments
 (0)