linux/fs/fat
OGAWA Hirofumi b1b65750b8 fat: don't allow to mount if the FAT length == 0
If FAT length == 0, the image doesn't have any data. And it can be the
cause of overlapping the root dir and FAT entries.

Also Windows treats it as invalid format.

Reported-by: syzbot+6f1624f937d9d6911e2d@syzkaller.appspotmail.com
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Marco Elver <elver@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Link: http://lkml.kernel.org/r/87r1wz8mrd.fsf@mail.parknet.co.jp
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-04 19:06:25 -07:00
..
cache.c fat: new inline functions to determine the FAT variant (32, 16 or 12) 2019-01-04 13:13:47 -08:00
dir.c fat_dir_ioctl(): hadn't needed that access_ok() for more than a decade... 2020-05-09 15:57:04 -04:00
fat.h fat: new inline functions to determine the FAT variant (32, 16 or 12) 2019-01-04 13:13:47 -08:00
fatent.c fat: work around race with userspace's read via blockdev while mounting 2019-09-24 15:54:06 -07:00
file.c block: remove the error_sector argument to blkdev_issue_flush 2020-05-22 08:45:46 -06:00
inode.c fat: don't allow to mount if the FAT length == 0 2020-06-04 19:06:25 -07:00
Kconfig docs: fix broken references to text files 2020-04-20 15:35:59 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
misc.c fs: fat: Eliminate timespec64_trunc() usage 2019-12-08 19:10:51 -05:00
namei_msdos.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
namei_vfat.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
nfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00