]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
jfs: fix shift-out-of-bounds in dbSplit
authorGhanshyam Agrawal <ghanshyam1898@gmail.com>
Mon, 30 Sep 2024 08:12:18 +0000 (13:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:52 +0000 (20:03 +0100)
commit52756a57e978e2706543a254f88f266cc6702f36
treeea320f610f365a30e7de4d1ec9b6bf49ecfa2d05
parent22dcbf7661c6ffc3247978c254dc40b833a0d429
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@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=b5ca8a249162c4b9a7d0
Signed-off-by: Ghanshyam Agrawal <ghanshyam1898@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/jfs/jfs_dmap.c