Skip to content

Commit fadaefd

Browse files
committed
crypto: bcm - Fix pointer arithmetic
jira LE-1907 cve CVE-2024-38579 Rebuild_History Non-Buildable kernel-4.18.0-553.22.1.el8_10 commit-author Aleksandr Mishin <[email protected]> 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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]> (cherry picked from commit 2b3460c) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 272e4bd commit fadaefd

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
@@ -506,7 +506,7 @@ static void spu2_dump_omd(u8 *omd, u16 hash_key_len, u16 ciph_key_len,
506506
if (hash_iv_len) {
507507
packet_log(" Hash IV Length %u bytes\n", hash_iv_len);
508508
packet_dump(" hash IV: ", ptr, hash_iv_len);
509-
ptr += ciph_key_len;
509+
ptr += hash_iv_len;
510510
}
511511

512512
if (ciph_iv_len) {

0 commit comments

Comments
 (0)