android_kernel_samsung_msm8976/fs
Andy Lutomirski 4f80c6c182 fs,userns: Change inode_capable to capable_wrt_inode_uidgid
commit 23adbe12ef7d3d4195e80800ab36b37bee28cd03 upstream.

The kernel has no concept of capabilities with respect to inodes; inodes
exist independently of namespaces.  For example, inode_capable(inode,
CAP_LINUX_IMMUTABLE) would be nonsense.

This patch changes inode_capable to check for uid and gid mappings and
renames it to capable_wrt_inode_uidgid, which should make it more
obvious what it does.

Fixes CVE-2014-4014.

Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Serge Hallyn <serge.hallyn@ubuntu.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-16 13:42:52 -07:00
..
9p
adfs
affs
afs
autofs4
befs
bfs
btrfs Btrfs: skip submitting barrier for missing device 2014-04-26 17:15:35 -07:00
cachefiles
ceph ceph: allow sync_read/write return partial successed size of read/write. 2014-01-09 12:24:25 -08:00
cifs CIFS: Fix too big maxBuf size for SMB3 mounts 2014-03-06 21:30:02 -08:00
coda
configfs configfs: fix race between dentry put and lookup 2013-11-29 11:11:53 -08:00
cramfs
debugfs
devpts devpts: plug the memory leak in kill_sb 2013-12-04 10:55:49 -08:00
dlm
ecryptfs ecryptfs: Fix memory leakage in keystore.c 2013-11-13 12:05:31 +09:00
efivarfs
efs
exofs ore: Fix wrong math in allocation of per device BIO 2014-02-13 13:48:00 -08:00
exportfs
ext2
ext3
ext4 ext4: use i_size_read in ext4_unaligned_aio() 2014-05-06 07:55:32 -07:00
f2fs
fat
freevxfs
fscache
fuse fuse: fix pipe_buf_operations 2014-02-13 13:47:59 -08:00
gfs2 GFS2: Increase i_writecount during gfs2_setattr_chown 2014-01-25 08:27:11 -08:00
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs cope with potentially long ->d_dname() output for shmem/hugetlb 2013-10-18 07:45:45 -07:00
isofs
jbd
jbd2 jbd2: don't BUG but return ENOSPC if a handle runs out of space 2014-01-09 12:24:24 -08:00
jffs2 jffs2: remove from wait queue after schedule() 2014-04-26 17:15:36 -07:00
jfs jfs: fix error path in ialloc 2013-11-13 12:05:31 +09:00
lockd lockd: ensure we tear down any live sockets when socket creation fails during lockd_up 2014-05-13 13:59:46 +02:00
logfs
minix
ncpfs
nfs NFSv4: nfs4_stateid_is_current should return 'true' for an invalid stateid 2014-03-23 21:38:17 -07:00
nfs_common
nfsd nfsd4: remove lockowner when removing lock stateid 2014-06-07 13:25:37 -07:00
nilfs2 nilfs2: fix segctor bug that causes file system corruption 2014-01-25 08:27:12 -08:00
nls
notify compat: fix sys_fanotify_mark 2014-02-13 13:48:00 -08:00
ntfs
ocfs2 ocfs2: do not put bh when buffer_uptodate failed 2014-05-06 07:55:32 -07:00
omfs
openpromfs
proc mm: close PageTail race 2014-04-03 12:01:05 -07:00
pstore
qnx4
qnx6
quota quota: Fix race between dqput() and dquot_scan_active() 2014-03-06 21:30:12 -08:00
ramfs
reiserfs reiserfs: fix race in readdir 2014-05-06 07:55:30 -07:00
romfs
squashfs
sysfs
sysv sysv: Add forgotten superblock lock init for v7 fs 2013-10-05 07:13:09 -07:00
ubifs
udf udf: Refuse RW mount of the filesystem instead of making it RO 2013-10-01 09:17:48 -07:00
ufs
xfs xfs: fix directory hash ordering bug 2014-05-06 07:55:28 -07:00
aio.c aio: restore locking of ioctx list on removal 2013-12-08 07:29:27 -08:00
anon_inodes.c
attr.c fs,userns: Change inode_capable to capable_wrt_inode_uidgid 2014-06-16 13:42:52 -07:00
bad_inode.c
binfmt_aout.c
binfmt_elf.c fs/binfmt_elf.c: prevent a coredump with a large vm_map_count from Oopsing 2013-10-13 16:08:31 -07:00
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c bio-integrity: Fix bio_integrity_verify segment start bug 2014-03-23 21:38:21 -07:00
bio.c block: Fix bio_copy_data() 2013-10-05 07:13:09 -07:00
block_dev.c
buffer.c mm: __set_page_dirty uses spin_lock_irqsave instead of spin_lock_irq 2014-02-20 11:06:11 -08:00
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c
coredump.c
coredump.h
dcache.c vfs: In d_path don't call d_dname on a mount point 2014-01-25 08:27:11 -08:00
dcookies.c fs/compat: fix lookup_dcookie() parameter handling 2014-02-13 13:48:00 -08:00
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c metag: Reduce maximum stack size to 256MB 2014-06-07 13:25:38 -07:00
fcntl.c
fhandle.c
file.c fs/file.c:fdtable: avoid triggering OOMs from alloc_fdmem 2014-02-22 12:41:25 -08:00
file_table.c don't bother with {get,put}_write_access() on non-regular files 2014-05-30 21:52:12 -07:00
filesystems.c
fs-writeback.c bdi: avoid oops on device removal 2014-04-26 17:15:35 -07:00
fs_struct.c
generic_acl.c
inode.c fs,userns: Change inode_capable to capable_wrt_inode_uidgid 2014-06-16 13:42:52 -07:00
internal.h
ioctl.c
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c locks: allow __break_lease to sleep even when break_time is 0 2014-05-13 13:59:44 +02:00
Makefile
mbcache.c
mount.h vfs: Is mounted should be testing mnt_ns for NULL or error. 2014-02-06 11:08:16 -08:00
mpage.c
namei.c fs,userns: Change inode_capable to capable_wrt_inode_uidgid 2014-06-16 13:42:52 -07:00
namespace.c
no-block.c
open.c don't bother with {get,put}_write_access() on non-regular files 2014-05-30 21:52:12 -07:00
pipe.c vfs: fix subtle use-after-free of pipe_inode_info 2013-12-11 22:36:26 -08:00
pnode.c
pnode.h
posix_acl.c posix_acl: handle NULL ACL in posix_acl_equiv_mode 2014-06-07 13:25:33 -07:00
proc_namespace.c
read_write.c fs/compat: fix parameter handling for compat readv/writev syscalls 2014-02-13 13:48:00 -08:00
readdir.c
select.c
seq_file.c seq_file: always update file->f_pos in seq_lseek() 2013-11-13 12:05:34 +09:00
signalfd.c
splice.c fuse: fix pipe_buf_operations 2014-02-13 13:47:59 -08:00
stack.c
stat.c
statfs.c vfs: allow O_PATH file descriptors for fstatfs() 2013-10-18 07:45:44 -07:00
super.c
sync.c
timerfd.c
utimes.c
xattr.c
xattr_acl.c