]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ext4: fail ext4_iget for root directory if unallocated
authorTheodore Ts'o <tytso@mit.edu>
Mon, 14 May 2018 05:41:00 +0000 (07:41 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 23 May 2018 07:08:44 +0000 (09:08 +0200)
commit0e07362e1ad97d03cea758a51b86669b9b98b7d7
tree0da6bbde42a796e147d67d1eb7b2398e9cbcb0fc
parent4105f1af6c9b1bb930d852b75735b2b7bec0db29
ext4: fail ext4_iget for root directory if unallocated

CVE-2018-1092

If the root directory has an i_links_count of zero, then when the file
system is mounted, then when ext4_fill_super() notices the problem and
tries to call iput() the root directory in the error return path,
ext4_evict_inode() will try to free the inode on disk, before all of
the file system structures are set up, and this will result in an OOPS
caused by a NULL pointer dereference.

This issue has been assigned CVE-2018-1092.

https://bugzilla.kernel.org/show_bug.cgi?id=199179
https://bugzilla.redhat.com/show_bug.cgi?id=1560777

Reported-by: Wen Xu <wen.xu@gatech.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
(cherry-picked from 8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44)
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/ext4/inode.c