]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
jfs: upper bound check of tree index in dbAllocAG
authorArnaud Lecomte <contact@arnaud-lcm.com>
Wed, 23 Apr 2025 22:13:51 +0000 (00:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:26 +0000 (16:28 +0200)
commit173cfd741ad7073640bfb7e2344c2a0ee005e769
tree24478c4846ac492dc51c00d3669bcb24bea6b65e
parent78989af5bbf55a0cf1165b0fa73921bc02f1543b
jfs: upper bound check of tree index in dbAllocAG

[ Upstream commit c214006856ff52a8ff17ed8da52d50601d54f9ce ]

When computing the tree index in dbAllocAG, we never check if we are
out of bounds realative to the size of the stree.
This could happen in a scenario where the filesystem metadata are
corrupted.

Reported-by: syzbot+cffd18309153948f3c3e@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=cffd18309153948f3c3e
Tested-by: syzbot+cffd18309153948f3c3e@syzkaller.appspotmail.com
Signed-off-by: Arnaud Lecomte <contact@arnaud-lcm.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/jfs/jfs_dmap.c