Pavel Skripkin 34e6552a44
fs/ntfs3: Fix OOB read in ntfs_init_from_boot
Syzbot was able to create a device which has the last sector of size
512.

After failing to boot from initial sector, reading from boot info from
offset 511 causes OOB read.

To prevent such reports add sanity check to validate if size of buffer_head
if big enough to hold ntfs3 bootinfo

Fixes: 6a4cd3ea7d77 ("fs/ntfs3: Alternative boot if primary boot is corrupted")
Reported-by: syzbot+53ce40c8c0322c06aea5@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2023-09-28 15:04:05 +03:00
..
2022-11-14 19:50:42 +03:00
2023-09-28 15:04:01 +03:00
2023-07-03 00:21:27 +04:00
2023-07-03 00:21:27 +04:00
2023-09-28 15:04:01 +03:00
2023-08-02 09:13:09 -06:00
2023-07-03 00:21:27 +04:00
2023-09-28 15:04:01 +03:00
2023-09-28 15:04:01 +03:00
2023-09-28 15:04:01 +03:00
2023-09-28 15:04:01 +03:00
2023-07-03 00:21:27 +04:00
2022-09-30 17:39:47 +03:00