# Ensure nodev Mount Option is Set on /var/log/audit Partition to Enhance Security

- Source: https://support.icompaas.com/support/solutions/articles/62000234989-ensure-nodev-mount-option-is-set-on-var-log-audit-partition-to-enhance-security
- 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:**  
 The nodev mount option prevents device files from being interpreted on the mounted filesystem. Applying this option to /var/log/audit helps prevent the creation and use of device files that could be exploited for privilege escalation or unauthorized access.

**Rationale:** Setting the nodev option on /var/log/audit reduces the risk of device file abuse, which can lead to compromise of audit logs or unauthorized system access.

**Impact:** Pros:

-   Prevents device file exploitation on /var/log/audit.  
    
-   Enhances overall system security posture.  
    

**Cons:**

-   May interfere with legitimate device file operations if any exist in /var/log/audit (rare).
    

**Default Value:** By default, the nodev option is often not set on /var/log/audit unless explicitly configured.

**Pre-requisites:**

-   Root or sudo privileges to modify /etc/fstab and remount filesystems.
    
-   /var/log/audit must be mounted as a separate partition.
    

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1.  Check current mount options for /var/log/audit:  
    
     mount | grep /var/log/audit
    
2.  Verify if nodev is present in /etc/fstab for /var/log/audit:  
    
     grep /var/log/audit /etc/fstab
    
    Expected output: Mount options for /var/log/audit include nodev.
    

### **Implementation Plan:**

**Using Linux command line:**

1.  Edit /etc/fstab to add nodev to the mount options for /var/log/audit. Example:  
    
    /dev/<partition>  /var/log/audit  ext4  defaults,nodev,nosuid,noexec  0  0
    
2.  Remount /var/log/audit with the new options without reboot:  
    
     mount -o remount,nodev /var/log/audit
    
3.  Verify mount options:  
    
     mount | grep /var/log/audit
    

### **Backout Plan:**

**Using Linux command line:**

1.  Remove nodev from /var/log/audit mount options in /etc/fstab.  
    
2.  Remount /var/log/audit without nodev:  
    
     mount -o remount /var/log/audit
    
      
    
3.  Verify mount options:  
    
     mount | grep /var/log/audit
    

**References:**

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   [NIST SP 800-53 Revision 5 - AU-9  
    ](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final#au-9)

## 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.
