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
- References
- Updated
Remediation - Kubernetes Patch
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
config:
ignition:
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- CCE-83984-5
- DISA-STIG-RHEL-09-213085
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q systemd; then
if [ -e "/etc/systemd/coredump.conf" ] ; then
LC_ALL=C sed -i "/^\s*ProcessSizeMax\s*=\s*/Id" "/etc/systemd/coredump.conf"