AlmaLinux OS 9 audit logs must be owned by root to prevent unauthorized read access.

STIG ID: ALMA-09-056010  |  SRG: SRG-OS-000057-GPOS-00027 |  Severity: medium |  CCI: CCI-000162,CCI-000164 |  Vulnerability Id: V-269539

Vulnerability Discussion

Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality.

Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit operating system activity.

Satisfies: SRG-OS-000057-GPOS-00027, SRG-OS-000059-GPOS-00029

Check

Verify the audit logs are owned by the "root" user.

First determine where the audit logs are stored with the following command:

$ grep -w log_file /etc/audit/auditd.conf

log_file = /var/log/audit/audit.log

Then using the location of the audit log file, determine if the audit log is owned by the "root" user using the following command:

$ stat -c "%U" /var/log/audit/audit.log

root

If the audit log is not owned by the "root" user this is a finding.

Fix

Change the audit logs to be owned by the root user:

$ chown root /var/log/audit/*