]> 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 18:51:38 +0000 (19:51 +0100)
commit6676034aa753aa448beb30dbd75630927ba7cd96
treefc93f1f227ef7aa0d70f65b7803ebad4d68ece05
parent823d573f5450ca6be80b36f54d1902ac7cd23fb9
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