Disable storing core dump
An XCCDF Rule
Description
The Storage
option in [Coredump]
section
of /etc/systemd/coredump.conf
or /etc/systemd/coredump.conf.d/*.conf
can be set to none
to disable storing core dumps permanently.
warning alert: Warning
If the
/etc/systemd/coredump.conf
file
does not already contain the [Coredump]
section,
the value will not be configured correctly.Rationale
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 debuging. Permitting temporary enablement of core dumps during such situations should be reviewed through local needs and policy.
- ID
- xccdf_org.ssgproject.content_rule_coredump_disable_storage
- Severity
- Medium
- Updated
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- CCE-85746-6
- NIST-800-53-CM-6
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q systemd; then
mkdir -p /etc/systemd/coredump.conf.d/
if [ ! -f "/etc/systemd/coredump.conf.d/oscap-autoremedy.conf" ]; then
echo "[Coredump]" > "/etc/systemd/coredump.conf.d/oscap-autoremedy.conf"