Patch "jfs: fix shift-out-of-bounds in dbSplit" has been added to the 5.4-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

    jfs: fix shift-out-of-bounds in dbSplit

to the 5.4-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:
     jfs-fix-shift-out-of-bounds-in-dbsplit.patch
and it can be found in the queue-5.4 subdirectory.

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



commit b1bb58c14c873b029e75f2dadee37af04740a9fb
Author: Ghanshyam Agrawal <ghanshyam1898@xxxxxxxxx>
Date:   Mon Sep 30 13:42:18 2024 +0530

    jfs: fix shift-out-of-bounds in dbSplit
    
    [ Upstream commit a5f5e4698f8abbb25fe4959814093fb5bfa1aa9d ]
    
    When dmt_budmin is less than zero, it causes errors
    in the later stages. Added a check to return an error beforehand
    in dbAllocCtl itself.
    
    Reported-by: syzbot+b5ca8a249162c4b9a7d0@xxxxxxxxxxxxxxxxxxxxxxxxx
    Closes: https://syzkaller.appspot.com/bug?extid=b5ca8a249162c4b9a7d0
    Signed-off-by: Ghanshyam Agrawal <ghanshyam1898@xxxxxxxxx>
    Signed-off-by: Dave Kleikamp <dave.kleikamp@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index 00258a551334a..d83ac5f5888a4 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -1886,6 +1886,9 @@ dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results)
 			return -EIO;
 		dp = (struct dmap *) mp->data;
 
+		if (dp->tree.budmin < 0)
+			return -EIO;
+
 		/* try to allocate the blocks.
 		 */
 		rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results);




[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