OSDN Git Service

ext4: add more inode number paranoia checks
authorTheodore Ts'o <tytso@mit.edu>
Sun, 17 Jun 2018 04:41:14 +0000 (00:41 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jul 2018 14:03:49 +0000 (16:03 +0200)
commitff6c96461be35381399466ad58f02b8d78ab480a
tree8f59e7eee7b4a1eb7b27d5c288adc755fcd2bb15
parentb88fc699a023e0ef86f647c3d48a17d7cfff1f2a
ext4: add more inode number paranoia checks

commit c37e9e013469521d9adb932d17a1795c139b36db upstream.

If there is a directory entry pointing to a system inode (such as a
journal inode), complain and declare the file system to be corrupted.

Also, if the superblock's first inode number field is too small,
refuse to mount the file system.

This addresses CVE-2018-10882.

https://bugzilla.kernel.org/show_bug.cgi?id=200069

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/super.c