android_kernel_oneplus_msm8998/fs/coda
Jan Harkes 7b7a1c39e8 coda: fix 'kernel memory exposure attempt' in fsync
commit d337b66a4c52c7b04eec661d86c2ef6e168965a2 upstream.

When an application called fsync on a file in Coda a small request with
just the file identifier was allocated, but the declared length was set
to the size of union of all possible upcall requests.

This bug has been around for a very long time and is now caught by the
extra checking in usercopy that was introduced in Linux-4.8.

The exposure happens when the Coda cache manager process reads the fsync
upcall request at which point it is killed. As a result there is nobody
servicing any further upcalls, trapping any processes that try to access
the mounted Coda filesystem.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-24 08:32:25 +01:00
..
cache.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
cnode.c fs/coda: use __func__ 2014-06-06 16:08:09 -07:00
coda_cache.h take coda-private headers out of include/linux 2011-01-12 20:02:48 -05:00
coda_fs_i.h coda: Cache permisions in struct coda_inode_info in a kuid_t. 2013-02-13 06:00:54 -08:00
coda_int.h fs/coda/inode.c: add __init to init_inodecache() 2014-04-03 16:21:25 -07:00
coda_linux.c new helper: is_root_inode() 2014-10-31 17:48:54 -04:00
coda_linux.h fs: cleanup slight list_entry abuse 2015-06-23 18:01:59 -04:00
dir.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
file.c make new_sync_{read,write}() static 2015-04-11 22:29:40 -04:00
inode.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
Kconfig fs/Kconfig: move coda out 2009-01-22 13:16:01 +03:00
Makefile fs: change to new flag variable 2011-03-17 14:02:57 +01:00
pioctl.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
psdev.c fs/coda: use linux/uaccess.h 2014-08-08 15:57:20 -07:00
symlink.c take coda-private headers out of include/linux 2011-01-12 20:02:48 -05:00
sysctl.c coda: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:16 -07:00
upcall.c coda: fix 'kernel memory exposure attempt' in fsync 2017-11-24 08:32:25 +01:00