fs: jfs: fix shift-out-of-bounds in dbDiscardAG
authorHoi Pok Wu <wuhoipok@gmail.com>
Tue, 25 Oct 2022 15:20:45 +0000 (23:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:57 +0000 (13:32 +0100)
commit3d340b684dcec5e34efc470227cd1c7d2df121ad
tree83f6f24b1e346e14717355b95d926a87db967344
parentccb6bdf0b7b64beb8c0808cef0bcf9e893504830
fs: jfs: fix shift-out-of-bounds in dbDiscardAG

[ Upstream commit 25e70c6162f207828dd405b432d8f2a98dbf7082 ]

This should be applied to most URSAN bugs found recently by syzbot,
by guarding the dbMount. As syzbot feeding rubbish into the bmap
descriptor.

Signed-off-by: Hoi Pok Wu <wuhoipok@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/jfs/jfs_dmap.c