# Ensure SELinux is Installed to Enforce Mandatory Access Control

- Source: https://support.icompaas.com/support/solutions/articles/62000235125-ensure-selinux-is-installed-to-enforce-mandatory-access-control
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS Amazon Linux 2 Benchmark v3.0.0](https://support.icompaas.com/support/solutions/62000112696) › [CIS Amazon Linux 2 Benchmarks](https://support.icompaas.com/support/solutions/folders/62000169265)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

**Profile Applicability:** • Level 1

**Description:**  
 Security-Enhanced Linux (SELinux) provides a robust Mandatory Access Control (MAC) framework for Linux systems. Installing SELinux is the foundational step towards implementing fine-grained access controls and enhancing system security.

**Rationale:** Having SELinux installed enables the enforcement of security policies that restrict processes and users, thereby limiting potential damage from compromised accounts or applications.

**Impact:** Pros:

-   Provides enhanced security through MAC policies.  
    
-   Helps prevent unauthorized access and privilege escalation.  
    

Cons:

-   Requires proper configuration and management to avoid access issues.  
    
-   May introduce complexity in system administration.  
    

**Default Value:** SELinux is installed by default on many enterprise Linux distributions such as Red Hat Enterprise Linux and CentOS, but may not be installed on others.

**Pre-requisites:**

-   Root or sudo privileges to verify and install system packages.  
    

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1.  Verify if SELinux packages are installed:  
    

RPM-based systems:  

rpm -q selinux-policy selinux-policy-targeted libselinux

2.  Confirm SELinux modules and policies are present.  
    

Check SELinux status:  

sestatus

### **Implementation Plan:**

**Using Linux command line:**

1\. Install SELinux packages if missing:  

yum install -y selinux-policy selinux-policy-targeted libselinux

2\. Enable and start SELinux enforcing mode by editing /etc/selinux/config:  

SELINUX=enforcing

SELINUXTYPE=targeted

3\. Reboot the system to apply changes.  

4\. Verify SELinux is active and enforcing:  

sestatus

### **Backout Plan:**

**Using Linux command line:**

1.  Disable SELinux temporarily by setting it to permissive or disabled in /etc/selinux/config:  
    
    SELINUX=permissive
    
      
    
2.  Reboot the system.  
    
3.  Uninstall SELinux packages if necessary.  
    

**References:**

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   SELinux Project Documentation  
    
-   Red Hat SELinux Guide

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
