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:14:40 +0000 (13:14 +0100)
commit10b87da8fae79c7daf5eda6a9e4f1d31b85b4d92
tree82a5c631eb962a72ae06ed6269ebde718e9c3ab5
parent5059ea84a8a83c51f1a52cc4d5c6192b50fdbb8b
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