Disable core dump backtraces
An XCCDF Rule
Description
The ProcessSizeMax
option in [Coredump]
section
of /etc/systemd/coredump.conf
specifies the maximum size in bytes of a core which will be processed.
Core dumps exceeding this size may be stored, but the backtrace will not
be generated.
warning alert: Warning
/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_backtraces
- Severity
- Medium
- Updated
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- CCE-85745-8
- 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"