OGAWA Hirofumi 0fd0bb0dfe fat: don't allow to mount if the FAT length == 0
commit b1b65750b8db67834482f758fc385bfa7560d228 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-20 10:25:05 +02:00
..
2020-04-02 16:34:33 +02:00
2019-08-06 19:05:23 +02:00
2019-12-17 20:38:33 +01:00
2019-12-17 20:38:44 +01:00
2019-12-17 20:38:15 +01:00
2018-12-21 14:13:04 +01:00
2017-09-04 19:05:15 -04:00
2020-03-11 18:02:43 +01:00
2020-04-02 16:34:21 +02:00