1.5.4 Ensure core dump storage is disabled

Information

A core dump is the memory of an executable program. It is generally used to determine why a program aborted. It can also be used to glean confidential information from a core file.

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 trying to debug problems.

Solution

Create or edit the file /etc/systemd/coredump.conf or a file in the /etc/systemd/coredump.conf.d directory ending inconf

Edit or add the following line in the [Coredump] section:

Storage=none

Example:

#!/usr/bin/env bash

{
[ ! -d /etc/systemd/coredump.conf.d/ ] && mkdir /etc/systemd/coredump.conf.d/
if grep -Psq -- '^h*[Coredump]' /etc/systemd/coredump.conf.d/60-coredump.conf; then
printf '%s
' "Storage=none" >> /etc/systemd/coredump.conf.d/60-coredump.conf
else
printf '%s
' "[Coredump]" "Storage=none" >> /etc/systemd/coredump.conf.d/60-coredump.conf
fi
}

See Also

https://workbench.cisecurity.org/benchmarks/18209

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-7b.

Plugin: Unix

Control ID: 3fdf0086cd00ac28862022714d400d030cf53626e76042d49c6e4bf5917853b1