ext4: add validity checks for bitmap block numbers
authorTheodore Ts'o <tytso@mit.edu>
Tue, 27 Mar 2018 03:54:10 +0000 (23:54 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 May 2018 19:58:07 +0000 (12:58 -0700)
commitb39430ea068797bb45b72429db3743064280b1be
tree2ca02f47f95be1707923e8dde014b497df5bad60
parent55cc3bb0a6c7da92dd1332cc8e1651dc2be89bfc
ext4: add validity checks for bitmap block numbers

commit 7dac4a1726a9c64a517d595c40e95e2d0d135f6f upstream.

An privileged attacker can cause a crash by mounting a crafted ext4
image which triggers a out-of-bounds read in the function
ext4_valid_block_bitmap() in fs/ext4/balloc.c.

This issue has been assigned CVE-2018-1093.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199181
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1560782
Reported-by: Wen Xu <wen.xu@gatech.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/balloc.c
fs/ext4/ialloc.c