Files
rockchip-kernel/fs
Jan Kara 0c452d7fdc BACKPORT: posix_acl: Clear SGID bit when setting file permissions
(cherry pick from commit 073931017b)

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
2017-04-05 security patch level
Change-Id: I19591ad452cc825ac282b3cfd2daaa72aa9a1ac1
2017-05-23 14:27:33 +08:00
..
2016-10-07 21:31:52 +08:00
2017-03-13 10:31:42 +08:00
2016-03-03 15:06:23 -08:00
2013-11-08 21:34:05 +08:00
2013-11-08 21:34:05 +08:00
2016-10-07 21:31:52 +08:00
2013-11-08 21:33:42 +08:00
2013-11-08 21:34:05 +08:00
2016-10-07 21:31:52 +08:00
2016-10-07 21:31:52 +08:00
2017-01-09 10:10:02 +08:00
2013-04-29 15:40:23 -04:00
2013-10-05 07:13:09 -07:00
2015-03-04 11:19:34 -08:00
2015-07-03 19:48:08 -07:00
2015-07-03 19:48:08 -07:00
2016-03-21 21:00:08 -07:00
2016-03-21 21:00:08 -07:00
2015-07-03 19:48:08 -07:00
2013-05-31 15:16:33 -04:00
2015-03-04 11:19:34 -08:00
2013-07-01 15:45:28 -07:00
2013-11-08 21:34:05 +08:00