]> 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:26:00 +0000 (16:26 +0200)
commit49ea46d9025aa1914b24ea957636cbe4367a7311
tree99e8c37d5d8d1bd42028d194f6de5ec8b3970056
parent9605cb2ea38ba014d0e704cba0dbbb00593fa9fd
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