ext4: validate that metadata blocks do not overlap superblock
authorTheodore Ts'o <tytso@mit.edu>
Mon, 1 Aug 2016 04:51:02 +0000 (00:51 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:27:50 +0000 (08:27 +0200)
commitdfa0a22733804636fb8ac7963bd24e7ce6dbaa45
tree0bc6d965cd0f555830ed5b0b97ef39d55beb4f6b
parent6af4737361aa55ac90ecb9b41915cd8fd5cade77
ext4: validate that metadata blocks do not overlap superblock

commit 829fa70dddadf9dd041d62b82cd7cea63943899d upstream.

A number of fuzzing failures seem to be caused by allocation bitmaps
or other metadata blocks being pointed at the superblock.

This can cause kernel BUG or WARNings once the superblock is
overwritten, so validate the group descriptor blocks to make sure this
doesn't happen.

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