]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
jfs: check if leafidx greater than num leaves per dmap tree
authorEdward Adam Davis <eadavis@qq.com>
Sat, 24 Aug 2024 01:25:23 +0000 (09:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:00:31 +0000 (12:00 +0200)
commitcb0eb10558802764f07de1dc439c4609e27cb4f0
tree479c3a29484a3aa0162c4411db1297e46724e7ae
parenta9603a6f75df2fd8125cd208c98cfaa0fe3f7505
jfs: check if leafidx greater than num leaves per dmap tree

[ Upstream commit d64ff0d2306713ff084d4b09f84ed1a8c75ecc32 ]

syzbot report a out of bounds in dbSplit, it because dmt_leafidx greater
than num leaves per dmap tree, add a checking for dmt_leafidx in dbFindLeaf.

Shaggy:
Modified sanity check to apply to control pages as well as leaf pages.

Reported-and-tested-by: syzbot+dca05492eff41f604890@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=dca05492eff41f604890
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/jfs/jfs_dmap.c