]> 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, 17 Oct 2024 13:11:30 +0000 (15:11 +0200)
commit25d2a3ff02f22e215ce53355619df10cc5faa7ab
tree75cd647fe4aaacd92a2ce48e3848dfa70b7a8e1d
parente7ae14f7ee76c6ef5a48aebab1a278ad78f42619
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