AlmaLinux OS 9 must disable core dumps for all users.

STIG ID: ALMA-09-011240  |  SRG: SRG-OS-000480-GPOS-00227 |  Severity: medium |  CCI: CCI-000366 |  Vulnerability Id: V-269178

Vulnerability Discussion

A core dump includes a memory image taken at the time the operating system terminates an application. The memory image could contain sensitive data and is generally useful only for developers or system operators trying to debug problems.

Enabling core dumps on production systems is not recommended; however, there may be overriding operational requirements to enable advanced debugging. Permitting temporary enablement of core dumps during such situations must be reviewed through local needs and policy.

Check

Verify AlmaLinux OS 9 disables core dumps for all users by issuing the following command:

$ grep -s core /etc/security/limits.conf /etc/security/limits.d/*.conf

/etc/security/limits.conf:# - core - limits the core file size (KB)
/etc/security/limits.conf:#* soft core 0

This can be set as a global domain (with the * wildcard) but may be set differently for multiple domains.

If the "core" item is missing, commented out, or the value is anything other than "0" and the need for core dumps is not documented with the information system security officer (ISSO) as an operational requirement for all domains that have the "core" item assigned, this is a finding.

Fix

Configure the operating system to disable core dumps for all users.

Create a *.conf file in /etc/security/limits.d/ with the following content:

* hard core 0