linux-brain/fs/ext4
Theodore Ts'o 08e4a31243 ext4: validate the debug_want_extra_isize mount option at parse time
commit 9803387c55f7d2ce69aa64340c5fdc6b3027dbc8 upstream.

Instead of setting s_want_extra_size and then making sure that it is a
valid value afterwards, validate the field before we set it.  This
avoids races and other problems when remounting the file system.

Link: https://lore.kernel.org/r/20191215063020.GA11512@mit.edu
Cc: stable@kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reported-and-tested-by: syzbot+4a39a025912b265cacef@syzkaller.appspotmail.com
Signed-off-by: Zubin Mithra <zsm@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-05 14:18:13 +00:00
..
acl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
balloc.c ext4: check for allocation block validity with block group locked 2018-08-03 07:50:43 +02:00
bitmap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
block_validity.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dir.c ext4: check for directory entries too close to block end 2019-12-31 12:38:00 +01:00
ext4_extents.h ext4: verify the depth of extent tree in ext4_find_extent() 2018-07-11 16:29:17 +02:00
ext4_jbd2.c ext4: shutdown should not prevent get_write_access 2018-04-24 09:36:30 +02:00
ext4_jbd2.h ext4: use jbd2_inode dirty range scoping 2019-07-31 07:28:47 +02:00
ext4.h ext4: add mask of ext4 flags to swap 2019-03-23 14:35:22 +01:00
extents_status.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
extents_status.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
extents.c ext4: fix warning inside ext4_convert_unwritten_extents_endio 2019-10-05 12:48:11 +02:00
file.c ext4: enforce the immutable flag on open files 2019-07-31 07:28:47 +02:00
fsmap.c ext4: fix off-by-one fsmap error on 1k block filesystems 2017-06-23 00:58:57 -04:00
fsmap.h ext4: support GETFSMAP ioctls 2017-04-30 00:36:53 -04:00
fsync.c Revert "ext4: use ext4_write_inode() when fsyncing w/o a journal" 2019-02-15 08:09:13 +01:00
hash.c ext4: remove useless test and assignment in strtohash functions 2017-08-24 15:11:34 -04:00
ialloc.c ext4: fix check to prevent initializing reserved inodes 2018-08-03 07:50:43 +02:00
indirect.c ext4: cleanup bh release code in ext4_ind_remove_space() 2019-04-05 22:31:24 +02:00
inline.c ext4: set error return correctly when ext4_htree_store_dirent fails 2020-01-27 14:46:42 +01:00
inode.c ext4: update direct I/O read lock pattern for IOCB_NOWAIT 2020-01-04 13:59:40 +01:00
ioctl.c ext4: don't allow any modifications to an immutable file 2019-07-31 07:28:47 +02:00
Kconfig dax: fix build warnings with FS_DAX and !FS_IOMAP 2017-01-24 16:26:14 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mballoc.c ext4: make sanity check in mballoc more strict 2019-05-21 18:50:18 +02:00
mballoc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
migrate.c ext4: add ext4_sb_bread() to disambiguate ENOMEM cases 2019-01-09 17:14:49 +01:00
mmp.c ext4: don't mark mmp buffer head dirty 2018-09-29 03:06:06 -07:00
move_extent.c ext4: use jbd2_inode dirty range scoping 2019-07-31 07:28:47 +02:00
namei.c ext4: fix ext4_empty_dir() for directories with holes 2019-12-31 12:37:59 +01:00
page-io.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
readpage.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
resize.c ext4: avoid drop reference to iloc.bh twice 2019-05-21 18:50:18 +02:00
super.c ext4: validate the debug_want_extra_isize mount option at parse time 2020-02-05 14:18:13 +00:00
symlink.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysfs.c ext4: sysfs: print ext4_super_block fields as little-endian 2018-09-05 09:26:36 +02:00
truncate.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr_security.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr_trusted.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr_user.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr.c ext4: ignore e_value_offs for xattrs with value-in-ea-inode 2019-05-21 18:50:18 +02:00
xattr.h ext4: add extra checks to ext4_xattr_block_get() 2018-04-24 09:36:31 +02:00