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>
Loading
-
mentioned in commit 497de07d
-
mentioned in commit 8ba35875
-
mentioned in commit 6883cd7f
-
mentioned in commit a992f2d3
-
mentioned in commit 84969465
-
mentioned in commit c925dc16
-
mentioned in commit 9bcf66c7
-
mentioned in commit 19ec8e48
-
mentioned in commit a3bb2d55
-
mentioned in commit b5accbb0
-
mentioned in commit e39e773a
Please register or sign in to comment