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 is not configured to acquire, save, or process core dumps with the following command:
$ systemctl status systemd-coredump.socket
systemd-coredump.socket
Loaded: masked (Reason: Unit systemd-coredump.socket is masked.)
Active: inactive (dead) since Mon 2024-02-26 13:31:02 UTC; 26s ago
Duration: 3h 13min 22.428s
If the "systemd-coredump.socket" is loaded and not masked and the need for core dumps is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Fix
Configure the system to disable the systemd-coredump.socket with the following command:
$ systemctl mask --now systemd-coredump.socket
Create symlink /etc/systemd/system/systemd-coredump.socket -> /dev/null
Reload the daemon for this change to take effect.
$ systemctl daemon-reload