Skip to content

Confine SELinux Users To Roles That Conform To Least Privilege

An XCCDF Rule

Description

Configure the operating system to confine SELinux users to roles that conform to least privilege. Use the following command to map the "staff_u" SELinux user to the "staff_r" and "sysadm_r" roles:

$ sudo semanage user -m staff_u -R staff_r -R sysadm_r


Use the following command to map the "user_u" SELinux user to the "user_r" role:
$ sudo semanage -m user_u -R user_r

Rationale

Preventing non-privileged users from executing privileged functions mitigates the risk that unauthorized individuals or processes may gain unnecessary access to information or privileges.

Privileged functions include, for example, establishing accounts, performing system integrity checks, or administering cryptographic key management activities. Non-privileged users are individuals who do not possess appropriate authorizations. Circumventing intrusion detection and prevention mechanisms or malicious code protection mechanisms are examples of privileged functions that require protection from non-privileged users.

ID
xccdf_org.ssgproject.content_rule_selinux_confine_to_least_privilege
Severity
Medium
References
Updated