1
0
Fork 0
alistair23-linux/fs/fat
OGAWA Hirofumi e0544273b7 fat: don't allow to mount if the FAT length == 0
commit b1b65750b8 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-17 16:40:36 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01: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: delete an unnecessary check before brelse() 2019-09-25 17:51:40 -07: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 treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
inode.c fat: don't allow to mount if the FAT length == 0 2020-06-17 16:40:36 +02:00
misc.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02: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