]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
jfs: add sanity check for agwidth in dbMount
authorEdward Adam Davis <eadavis@qq.com>
Thu, 20 Feb 2025 11:24:19 +0000 (19:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:39:10 +0000 (07:39 +0200)
commita065cec230aa807c18828a3eee82f1c8592c2adf
treef7bc79b653ed3cb341097a51efdc64e07786701e
parent5b2f26d3fba4e9aac314f8bc0963b3fc28c0e456
jfs: add sanity check for agwidth in dbMount

[ Upstream commit ddf2846f22e8575d6b4b6a66f2100f168b8cd73d ]

The width in dmapctl of the AG is zero, it trigger a divide error when
calculating the control page level in dbAllocAG.

To avoid this issue, add a check for agwidth in dbAllocAG.

Reported-and-tested-by: syzbot+7c808908291a569281a9@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=7c808908291a569281a9
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