Check: RHEL-07-020023
Red Hat Enterprise Linux 7 STIG:
RHEL-07-020023
(in versions v3 r12 through v3 r8)
Title
The Red Hat Enterprise Linux operating system must elevate the SELinux context when an administrator calls the sudo command. (Cat II impact)
Discussion
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.
Check Content
Verify the operating system elevates the SELinux context when an administrator calls the sudo command with the following command: This command must be ran as root: # grep -r sysadm_r /etc/sudoers /etc/sudoers.d %wheel ALL=(ALL) TYPE=sysadm_t ROLE=sysadm_r ALL If conflicting results are returned, this is a finding. If a designated sudoers administrator group or account(s) is not configured to elevate the SELinux type and role to "sysadm_t" and "sysadm_r" with the use of the sudo command, this is a finding.
Fix Text
Configure the operating system to elevate the SELinux context when an administrator calls the sudo command. Edit a file in the /etc/sudoers.d directory with the following command: $ sudo visudo -f /etc/sudoers.d/<customfile> Use the following example to build the <customfile> in the /etc/sudoers.d directory to allow any administrator belonging to a designated sudoers admin group to elevate their SELinux context with the use of the sudo command: %wheel ALL=(ALL) TYPE=sysadm_t ROLE=sysadm_r ALL Remove any configurations that conflict with the above from the following locations: /etc/sudoers /etc/sudoers.d/
Additional Identifiers
Rule ID: SV-250314r877392_rule
Vulnerability ID: V-250314
Group Title: SRG-OS-000324-GPOS-00125
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-002165 |
The information system enforces organization-defined discretionary access control policies over defined subjects and objects. |
CCI-002235 |
The information system prevents non-privileged users from executing privileged functions to include disabling, circumventing, or altering implemented security safeguards/countermeasures. |