Patch "crypto: bcm - Fix pointer arithmetic" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    crypto: bcm - Fix pointer arithmetic

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     crypto-bcm-fix-pointer-arithmetic.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8a1be21b9363ea3a3207af543f5a0a05b6e06ded
Author: Aleksandr Mishin <amishin@xxxxxxxxxx>
Date:   Fri Mar 22 23:59:15 2024 +0300

    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: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver")
    Signed-off-by: Aleksandr Mishin <amishin@xxxxxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/crypto/bcm/spu2.c b/drivers/crypto/bcm/spu2.c
index c860ffb0b4c38..670d439f204c5 100644
--- a/drivers/crypto/bcm/spu2.c
+++ b/drivers/crypto/bcm/spu2.c
@@ -495,7 +495,7 @@ static void spu2_dump_omd(u8 *omd, u16 hash_key_len, u16 ciph_key_len,
 	if (hash_iv_len) {
 		packet_log("  Hash IV Length %u bytes\n", hash_iv_len);
 		packet_dump("  hash IV: ", ptr, hash_iv_len);
-		ptr += ciph_key_len;
+		ptr += hash_iv_len;
 	}
 
 	if (ciph_iv_len) {




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux