Shigeru Yoshida 4b51f27d44 fs/ntfs3: Avoid UBSAN error on true_sectors_per_clst()
[ Upstream commit caad9dd8792a2622737b7273cb34835fd9536cd2 ]

syzbot reported UBSAN error as below:

[   76.901829][ T6677] ================================================================================
[   76.903908][ T6677] UBSAN: shift-out-of-bounds in fs/ntfs3/super.c:675:13
[   76.905363][ T6677] shift exponent -247 is negative

This patch avoid this error.

Link: https://syzkaller.appspot.com/bug?id=b0299c09a14aababf0f1c862dd4ebc8ab9eb0179
Fixes: a3b774342fa7 (fs/ntfs3: validate BOOT sectors_per_clusters)
Cc: Author: Randy Dunlap <rdunlap@infradead.org>
Reported-by: syzbot+35b87c668935bb55e666@syzkaller.appspotmail.com
Signed-off-by: Shigeru Yoshida <syoshida@redhat.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:14:33 +01:00
..
2022-08-17 14:24:07 +02:00
2021-08-19 09:02:55 +09:00
2022-07-02 16:41:14 +02:00
2022-11-26 09:24:51 +01:00
2022-12-31 13:14:05 +01:00
2021-08-26 22:28:02 +02:00
2022-06-09 10:22:55 +02:00
2021-12-29 12:28:59 +01:00
2021-09-03 15:33:47 -07:00
2021-08-16 10:50:32 -06:00
2021-08-19 09:02:55 +09:00
2022-12-14 11:37:31 +01:00
2022-07-02 16:41:17 +02:00
2022-07-12 16:35:08 +02:00
2021-12-14 10:57:15 +01:00
2021-08-10 17:57:22 +02:00