FPII-2974 :[Part 1]Elevation of privilege vulnerability in kernel file system CVE-2016-7097 A-32458736
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.
Change-Id: I951bde052791c196f84f568531c494fec33559fb
References: CVE-2016-7097
14 files changed