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)
committerSasha Levin <alexander.levin@verizon.com>
Mon, 12 Sep 2016 13:28:49 +0000 (09:28 -0400)
commit0a6f7979199e0b976f39726feb0bbd96e9c04240
treed74ce8c0c2bc2a37afef2c700095a70ff78ceaa0
parent469a242127b181656cb0a07de4584215bd4494fb
ext4: validate that metadata blocks do not overlap superblock

[ Upstream commit 829fa70dddadf9dd041d62b82cd7cea63943899d ]

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.

Cc: stable@vger.kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
fs/ext4/super.c