android_kernel_motorola_sm6375/fs/ext4
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Theodore Ts'o 5a016c053f ext4: don't BUG if someone dirty pages without asking ext4 first
[ Upstream commit cc5095747edfb054ca2068d01af20be3fcc3634f ]

[un]pin_user_pages_remote is dirtying pages without properly warning
the file system in advance.  A related race was noted by Jan Kara in
2018[1]; however, more recently instead of it being a very hard-to-hit
race, it could be reliably triggered by process_vm_writev(2) which was
discovered by Syzbot[2].

This is technically a bug in mm/gup.c, but arguably ext4 is fragile in
that if some other kernel subsystem dirty pages without properly
notifying the file system using page_mkwrite(), ext4 will BUG, while
other file systems will not BUG (although data will still be lost).

So instead of crashing with a BUG, issue a warning (since there may be
potential data loss) and just mark the page as clean to avoid
unprivileged denial of service attacks until the problem can be
properly fixed.  More discussion and background can be found in the
thread starting at [2].

[1] https://lore.kernel.org/linux-mm/20180103100430.GE4911@quack2.suse.cz
[2] https://lore.kernel.org/r/Yg0m6IjcNmfaSokM@google.com

Reported-by: syzbot+d59332e2db681cf18f0318a06e994ebbb529a8db@syzkaller.appspotmail.com
Reported-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/YiDS9wVfq4mM2jGK@mit.edu
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-15 14:18:23 +02:00
..
acl.c
acl.h
balloc.c ext4: shrink race window in ext4_should_retry_alloc() 2021-04-07 14:47:38 +02:00
bitmap.c
block_validity.c
dir.c ext4: fix potential infinite loop in ext4_dx_readdir() 2021-10-06 15:42:37 +02:00
ext4.h ext4: fix EXT4_MAX_LOGICAL_BLOCK macro 2021-08-26 08:36:11 -04:00
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
extents.c ext4: prevent partial update of the extent blocks 2022-02-23 11:59:57 +01:00
extents_status.c ext4: remove check for zero nr_to_scan in ext4_es_scan() 2021-07-14 16:53:03 +02:00
extents_status.h
file.c ext4: don't leak old mountpoint samples 2021-01-19 18:26:13 +01:00
fsmap.c ext4: limit entries returned when counting fsmap records 2020-10-29 09:57:55 +01:00
fsmap.h
fsync.c
hash.c
ialloc.c ext4: fix avefreec in find_group_orlov 2021-07-14 16:53:03 +02:00
indirect.c
inline.c ext4: fix error handling in ext4_restore_inline_data() 2022-02-08 18:24:34 +01:00
inode.c ext4: don't BUG if someone dirty pages without asking ext4 first 2022-04-15 14:18:23 +02:00
ioctl.c ext4: avoid trim error on fs with small groups 2022-01-27 09:19:37 +01:00
Kconfig
Makefile
mballoc.c ext4: avoid trim error on fs with small groups 2022-01-27 09:19:37 +01:00
mballoc.h
migrate.c ext4: don't use the orphan list when migrating an inode 2022-01-27 09:19:51 +01:00
mmp.c
move_extent.c
namei.c ext4: fix potential htree corruption when growing large_dir directories 2021-08-12 13:21:02 +02:00
page-io.c
readpage.c
resize.c ext4: add check to prevent attempting to resize an fs with sparse_super2 2022-03-16 13:21:48 +01:00
super.c ext4: Fix BUG_ON in ext4_bread when write quota data 2022-01-27 09:19:51 +01:00
symlink.c ext4: report correct st_size for encrypted symlinks 2021-09-12 08:56:38 +02:00
sysfs.c ext4: shrink race window in ext4_should_retry_alloc() 2021-04-07 14:47:38 +02:00
truncate.h
verity.c ext4: fix error handling in ext4_end_enable_verity() 2021-05-26 12:05:21 +02:00
xattr.c ext4: add reclaim checks to xattr code 2021-03-30 14:35:29 +02:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c