All reports
Medium

kernel: Setting a POSIX ACL via setxattr doesn't clear the setgid bit

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2016-7097

Probability of exploitation in the next 30 days: 0.39%

FIRST EPSS · 2026-11-19

Description

The filesystem implementation in the Linux kernel through 4.8.2 preserves the setgid bit during a setxattr call, which allows local users to gain group privileges by leveraging the existence of a setgid program with restrictions on execute permissions.

It was found that when file permissions were modified via chmod and the user modifying them was not in the owning group or capable of CAP_FSETID, the setgid bit would be cleared. Setting a POSIX ACL via setxattr sets the file permissions as well as the new ACL, but doesn't clear the setgid bit in a similar way. This could allow a local user to gain group privileges via certain setgid applications.