android_kernel_samsung_msm8226/fs/xfs
Jan Kara fb6e6f321a BACKPORT: posix_acl: Clear SGID bit when setting file permissions
[Partially applied during f2fs inclusion, changes now aligned to upstream]

(cherry pick from commit 073931017b49d9458aa351605b43a7e34598caef)

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.

NB: conflicts resolution included extending the change to all visible
    users of the near deprecated function posix_acl_equiv_mode
    replaced with posix_acl_update_mode. We did not resolve the ACL
    leak in this CL, require additional upstream fixes.

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>
Bug: 32458736
[haggertk]: Backport to 3.4/msm8974
  * convert use of capable_wrt_inode_uidgid to capable
Change-Id: I19591ad452cc825ac282b3cfd2daaa72aa9a1ac1
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-06 12:23:27 +02:00
..
Kconfig
Makefile
kmem.c
kmem.h
mrlock.h
time.h
uuid.c
uuid.h
xfs.h
xfs_acl.c BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2019-08-06 12:23:27 +02:00
xfs_acl.h
xfs_ag.h
xfs_alloc.c
xfs_alloc.h
xfs_alloc_btree.c
xfs_alloc_btree.h
xfs_aops.c Merge tag 'v3.4.113' into lineage-16.0 2019-08-05 14:20:47 +02:00
xfs_aops.h
xfs_attr.c
xfs_attr.h
xfs_attr_leaf.c
xfs_attr_leaf.h
xfs_attr_sf.h
xfs_bit.c
xfs_bit.h
xfs_bmap.c
xfs_bmap.h
xfs_bmap_btree.c
xfs_bmap_btree.h
xfs_btree.c
xfs_btree.h
xfs_buf.c Merge tag 'v3.4.113' into lineage-16.0 2019-08-05 14:20:47 +02:00
xfs_buf.h
xfs_buf_item.c
xfs_buf_item.h
xfs_da_btree.c
xfs_da_btree.h
xfs_dfrag.c
xfs_dfrag.h
xfs_dinode.h
xfs_dir2.c
xfs_dir2.h
xfs_dir2_block.c
xfs_dir2_data.c
xfs_dir2_format.h
xfs_dir2_leaf.c
xfs_dir2_node.c
xfs_dir2_priv.h
xfs_dir2_sf.c
xfs_discard.c
xfs_discard.h
xfs_dquot.c
xfs_dquot.h
xfs_dquot_item.c
xfs_dquot_item.h
xfs_error.c
xfs_error.h
xfs_export.c Merge tag 'v3.4.113' into lineage-16.0 2019-08-05 14:20:47 +02:00
xfs_export.h
xfs_extfree_item.c
xfs_extfree_item.h
xfs_file.c fs: introduce inode operation ->update_time 2019-08-06 10:44:13 +02:00
xfs_filestream.c
xfs_filestream.h
xfs_fs.h
xfs_fs_subr.c
xfs_fsops.c
xfs_fsops.h
xfs_globals.c
xfs_ialloc.c
xfs_ialloc.h
xfs_ialloc_btree.c
xfs_ialloc_btree.h
xfs_iget.c
xfs_inode.c
xfs_inode.h
xfs_inode_item.c
xfs_inode_item.h
xfs_inum.h
xfs_ioctl.c Merge tag 'v3.4.113' into lineage-16.0 2019-08-05 14:20:47 +02:00
xfs_ioctl.h
xfs_ioctl32.c Merge tag 'v3.4.113' into lineage-16.0 2019-08-05 14:20:47 +02:00
xfs_ioctl32.h
xfs_iomap.c
xfs_iomap.h
xfs_iops.c Merge tag 'v3.4.113' into lineage-16.0 2019-08-05 14:20:47 +02:00
xfs_iops.h
xfs_itable.c
xfs_itable.h
xfs_linux.h
xfs_log.c
xfs_log.h
xfs_log_cil.c
xfs_log_priv.h
xfs_log_recover.c Merge tag 'v3.4.113' into lineage-16.0 2019-08-05 14:20:47 +02:00
xfs_log_recover.h
xfs_message.c
xfs_message.h
xfs_mount.c
xfs_mount.h
xfs_mru_cache.c
xfs_mru_cache.h
xfs_qm.c
xfs_qm.h
xfs_qm_bhv.c
xfs_qm_syscalls.c
xfs_quota.h
xfs_quota_priv.h
xfs_quotaops.c
xfs_rename.c
xfs_rtalloc.c
xfs_rtalloc.h
xfs_rw.c
xfs_rw.h
xfs_sb.h
xfs_stats.c
xfs_stats.h
xfs_super.c fs: Limit sys_mount to only request filesystem modules. 2019-08-06 10:44:59 +02:00
xfs_super.h
xfs_sync.c
xfs_sync.h
xfs_sysctl.c
xfs_sysctl.h
xfs_trace.c
xfs_trace.h
xfs_trans.c
xfs_trans.h
xfs_trans_ail.c
xfs_trans_buf.c
xfs_trans_dquot.c
xfs_trans_extfree.c
xfs_trans_inode.c
xfs_trans_priv.h
xfs_trans_space.h
xfs_types.h
xfs_utils.c
xfs_utils.h
xfs_vnode.h
xfs_vnodeops.c
xfs_vnodeops.h
xfs_xattr.c