]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2019 16:50:19 +0000 (18:50 +0200)
commit8b83db418206f7428346e060ef7c94a2a93fdbea
tree0fc9bff8416e1c9d00166ad9fbabce8ed023324d
parentc738ffb58c21cc46b4b6dd83a55868fb59ac4083
ext4: fix use-after-free race with debug_want_extra_isize

commit 7bc04c5c2cc467c5b40f2b03ba08da174a0d5fa7 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/super.c