ext4: don't allow r/w mounts if metadata blocks overlap the superblock
authorTheodore Ts'o <tytso@mit.edu>
Fri, 30 Mar 2018 02:10:35 +0000 (22:10 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:36:30 +0000 (09:36 +0200)
commitb2623d8166563a19bee0cc8292e4ec951a42a6da
tree4eec50ac0db6d649d0c3b41c39eb4437568d66a7
parent26dbb30c58ffb85bc015bd5e58831483d50f7d18
ext4: don't allow r/w mounts if metadata blocks overlap the superblock

commit 18db4b4e6fc31eda838dd1c1296d67dbcb3dc957 upstream.

If some metadata block, such as an allocation bitmap, overlaps the
superblock, it's very likely that if the file system is mounted
read/write, the results will not be pretty.  So disallow r/w mounts
for file systems corrupted in this particular way.

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/super.c