android_kernel_oneplus_msm8998/fs/jfs
Jan Kara 57c9cfdb61 posix_acl: Clear SGID bit when setting file permissions
commit 073931017b49d9458aa351605b43a7e34598caef upstream.

When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok().  Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't clear the setgid bit in
a similar way; this allows to bypass the check in chmod(2).  Fix that.

References: CVE-2016-7097
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-31 04:13:58 -06:00
..
acl.c posix_acl: Clear SGID bit when setting file permissions 2016-10-31 04:13:58 -06:00
file.c jfs: Handle error from dquot_initialize() 2015-07-23 20:59:39 +02:00
inode.c A couple trivial fixes and an error path fix 2015-07-16 16:28:28 -07:00
ioctl.c ioctl_compat: handle FITRIM 2015-07-09 11:42:21 -07:00
jfs_acl.h
jfs_btree.h
jfs_debug.c
jfs_debug.h
jfs_dinode.h
jfs_discard.c
jfs_discard.h
jfs_dmap.c
jfs_dmap.h
jfs_dtree.c
jfs_dtree.h
jfs_extent.c
jfs_extent.h
jfs_filsys.h
jfs_imap.c
jfs_imap.h
jfs_incore.h fs: cleanup slight list_entry abuse 2015-06-23 18:01:59 -04:00
jfs_inode.c jfs: Handle error from dquot_initialize() 2015-07-23 20:59:39 +02:00
jfs_inode.h
jfs_lock.h
jfs_logmgr.c fs: use helper bio_add_page() instead of open coding on bi_io_vec 2015-08-13 12:32:00 -06:00
jfs_logmgr.h
jfs_metapage.c block: add a bi_error field to struct bio 2015-07-29 08:55:15 -06:00
jfs_metapage.h fs, jfs: remove slab object constructor 2015-04-15 16:35:18 -07:00
jfs_mount.c
jfs_superblock.h
jfs_txnmgr.c
jfs_txnmgr.h
jfs_types.h
jfs_umount.c
jfs_unicode.c
jfs_unicode.h
jfs_uniupr.c
jfs_xattr.h
jfs_xtree.c
jfs_xtree.h
Kconfig
Makefile
namei.c fs/jfs: remove unnecessary new_valid_dev() checks 2015-11-09 15:11:24 -08:00
resize.c
super.c fs/jfs: remove unnecessary new_valid_dev() checks 2015-11-09 15:11:24 -08:00
symlink.c jfs: switch to simple_follow_link() 2015-05-10 22:18:26 -04:00
xattr.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00