ext4: fix use-after-free race with debug_want_extra_isize
authorBarret Rhoden <brho@google.com>
Thu, 25 Apr 2019 15:55:50 +0000 (11:55 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 25 Apr 2019 15:55:50 +0000 (11:55 -0400)
commit7bc04c5c2cc467c5b40f2b03ba08da174a0d5fa7
tree4c26d579cd4786eb3db4388078f025233d0beea5
parent8c380ab4b7b59c0c602743810be1b712514eaebc
ext4: fix use-after-free race with debug_want_extra_isize

When remounting with debug_want_extra_isize, we were not performing the
same checks that we do during a normal mount.  That allowed us to set a
value for s_want_extra_isize that reached outside the s_inode_size.

Fixes: e2b911c53584 ("ext4: clean up feature test macros with predicate functions")
Reported-by: syzbot+f584efa0ac7213c226b7@syzkaller.appspotmail.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Barret Rhoden <brho@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
fs/ext4/super.c