android_kernel_oneplus_msm8998/fs
Theodore Ts'o 3d05e69b4e ext4: always verify the magic number in xattr blocks
commit 513f86d73855ce556ea9522b6bfd79f87356dc3a upstream.

If there an inode points to a block which is also some other type of
metadata block (such as a block allocation bitmap), the
buffer_verified flag can be set when it was validated as that other
metadata block type; however, it would make a really terrible external
attribute block.  The reason why we use the verified flag is to avoid
constantly reverifying the block.  However, it doesn't take much
overhead to make sure the magic number of the xattr block is correct,
and this will avoid potential crashes.

This addresses CVE-2018-10879.

https://bugzilla.kernel.org/show_bug.cgi?id=200001

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
[Backported to 4.4: adjust context]
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Change-Id: I06728150aefd0fffbdb6bd7cbce0858221ff6f74
(cherry picked from commit 62a28a64d87fbdce5c0a988b440a4ae6dd37b41e)
2019-03-30 07:59:30 +01:00
..
9p
adfs
affs affs_lookup(): close a race with affs_remove_link() 2018-05-30 07:48:51 +02:00
afs
autofs4 autofs: mount point create should honour passed in mode 2018-04-24 09:32:11 +02:00
befs
bfs
btrfs Merge android-4.4.146 (13962260) into msm-4.4 2018-08-07 15:36:56 +05:30
cachefiles
ceph Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.4.y' into android-4.4 2018-07-30 17:25:04 -07:00
cifs cifs: Fix infinite loop when using hard mount option 2018-07-11 16:03:48 +02:00
coda
configfs
cramfs
crypto fscrypt: log the crypto algorithm implementations 2018-06-28 14:24:29 -07:00
debugfs
devpts
dlm
ecryptfs Revert "do d_instantiate/unlock_new_inode combinations safely" 2018-07-03 16:23:54 -07:00
efivarfs
efs
exfat Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
exofs
exportfs
ext2 Revert "do d_instantiate/unlock_new_inode combinations safely" 2018-07-03 16:23:54 -07:00
ext4 ext4: always verify the magic number in xattr blocks 2019-03-30 07:59:30 +01:00
f2fs f2fs: fix to account IO correctly 2019-01-18 14:54:15 +05:30
fat Merge android-4.4.144 (4b2d6ba) into msm-4.4 2018-08-03 17:05:13 +05:30
freevxfs
fscache fscache: Fix hanging wait on page discarded by writeback 2018-05-30 07:49:08 +02:00
fuse Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
gfs2 Merge android-4.4.142 (8ec9fd8) into msm-4.4 2018-08-03 16:59:20 +05:30
hfs
hfsplus hfsplus: stop workqueue when fill_super() failed 2018-05-26 08:49:01 +02:00
hostfs
hpfs
hugetlbfs
isofs isofs: fix timestamps beyond 2027 2017-11-30 08:37:20 +00:00
jbd2 jbd2: don't mark block as modified if the handle is out of credits 2018-07-11 16:03:48 +02:00
jffs2 Revert "do d_instantiate/unlock_new_inode combinations safely" 2018-07-03 16:23:54 -07:00
jfs Merge android-4.4.148 (f057ff9) into msm-4.4 2018-08-24 00:07:01 +05:30
kernfs kernfs: fix regression in kernfs_fop_write caused by wrong type 2018-02-16 20:09:42 +01:00
lockd lockd: lost rollback of set_grace_period() in lockd_down_net() 2018-05-26 08:48:50 +02:00
logfs
minix
ncpfs staging: ncpfs: memory corruption in ncp_read_kernel() 2018-03-28 18:40:15 +02:00
nfs NFSv4: Fix possible 1-byte stack overflow in nfs_idmap_read_and_verify_message 2018-07-03 11:21:34 +02:00
nfs_common
nfsd nfsd: fix potential use-after-free in nfsd4_decode_getdeviceinfo 2018-08-06 16:24:30 +02:00
nilfs2 Merge android-4.4.142 (8ec9fd8) into msm-4.4 2018-08-03 16:59:20 +05:30
nls
notify This is the 4.4.129 stable release 2018-04-24 10:42:34 +02:00
ntfs
ocfs2 ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent 2018-07-22 14:25:52 +02:00
omfs
openpromfs
overlayfs ovl: warn instead of error if d_type is not supported 2018-08-28 07:23:43 +02:00
proc Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
pstore Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
qnx4
qnx6
quota
ramfs
reiserfs Merge android-4.4.153 (5e24b4e) into msm-4.4 2018-08-28 17:28:39 +05:30
romfs
sdcardfs ANDROID: sdcardfs: Change current->fs under lock 2018-12-26 08:00:06 +01:00
squashfs This is the 4.4.146 stable release 2018-08-06 19:12:19 +02:00
sysfs
sysv
tracefs
ubifs Merge android-4.4.139 (7ba5557) into msm-4.4 2018-07-03 12:24:56 -07:00
udf Merge "Merge android-4.4.139 (7ba5557) into msm-4.4" 2018-07-10 22:43:57 -07:00
ufs Revert "do d_instantiate/unlock_new_inode combinations safely" 2018-07-03 16:23:54 -07:00
xfs Merge android-4.4.137 (a2e2217) into msm-4.4 2018-06-27 14:45:25 +05:30
aio.c aio: hold an extra file reference over AIO read/write operations 2018-09-10 08:29:21 -07:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c fs/binfmt_misc.c: do not allow offset overflow 2018-07-03 11:21:26 +02:00
binfmt_script.c
block_dev.c
buffer.c
char_dev.c
compat.c
compat_binfmt_elf.c binfmt_elf: compat: avoid unused function warning 2018-02-25 11:03:51 +01:00
compat_ioctl.c Merge android-4.4.127 (d6bbe8b) into msm-4.4 2018-04-20 12:27:57 +05:30
coredump.c
dax.c
dcache.c Merge android-4.4.148 (f057ff9) into msm-4.4 2018-08-24 00:07:01 +05:30
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c kernel: Only expose su when daemon is running 2018-12-26 08:21:02 +01:00
fcntl.c
fhandle.c
file.c Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
file_table.c
filesystems.c
fs-writeback.c This is the 4.4.132 stable release 2018-05-16 11:32:47 +02:00
fs_pin.c
fs_struct.c
inode.c Merge android-4.4.141 (b1bad9e) into msm-4.4 2018-07-24 12:10:47 +05:30
internal.h
ioctl.c
Kconfig Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
Kconfig.binfmt
libfs.c
locks.c locks: don't check for race with close when setting OFD lock 2018-01-17 09:35:27 +01:00
Makefile Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
mbcache.c
mbcache2.c
mount.h
mpage.c
namei.c kernel: Fix potential refcount leak in su check 2018-12-26 08:21:02 +01:00
namespace.c Merge android-4.4.148 (f057ff9) into msm-4.4 2018-08-24 00:07:01 +05:30
no-block.c
nsfs.c nsfs: mark dentry with DCACHE_RCUACCESS 2018-02-16 20:09:43 +01:00
open.c
pipe.c pipe: cap initial pipe capacity according to pipe-max-size limit 2018-05-26 08:48:51 +02:00
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c kernel: Only expose su when daemon is running 2018-12-26 08:21:02 +01:00
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c Merge android-4.4.120 (d63fdf6) into msm-4.4 2018-03-08 17:53:30 +05:30
sync.c
timerfd.c Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
userfaultfd.c
utimes.c
xattr.c