Jan Kara 073931017b posix_acl: Clear SGID bit when setting file permissions
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>
2016-09-22 10:55:32 +02:00
..
2016-07-28 02:55:38 +02:00
2016-06-01 10:31:50 +02:00
2016-07-28 03:00:45 +02:00
2016-06-24 23:49:03 -04:00
2016-08-02 19:39:09 -04:00
2016-07-28 02:55:39 +02:00
2012-05-16 14:28:27 -05:00
2013-12-31 20:32:01 +02:00
2013-12-31 20:32:01 +02:00
2016-08-02 19:39:09 -04:00
2016-05-26 01:15:31 +02:00
2016-07-28 03:00:44 +02:00
2015-04-22 18:33:41 +03:00
2016-07-28 03:00:45 +02:00
2016-07-28 02:55:38 +02:00