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)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 20 Nov 2016 01:01:30 +0000 (01:01 +0000)
commit02dd82ed5de939add38991dae6386fe91b07d653
tree0402de1c2df53309dbc9a74563ce98f26aa1dab5
parentcd157e9d9c5ef1ba0885cb45a33b140db5744528
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: Ben Hutchings <ben@decadent.org.uk>
fs/ext4/super.c