Disable KDump Kernel Crash Analyzer (kdump)
An XCCDF Rule
Description
The kdump-tools
service provides a kernel crash dump analyzer. It uses the kexec
system call to boot a secondary kernel ("capture" kernel) following a system
crash, which can load information from the crashed kernel for analysis.
The kdump-tools
service can be disabled with the following command:
$ sudo systemctl mask --now kdump-tools.service
Rationale
Kernel core dumps may contain the full contents of system memory at the time of the crash. Kernel core dumps consume a considerable amount of disk space and may result in denial of service by exhausting the available space on the target file system partition. Unless the system is used for kernel development or testing, there is little need to run the kdump service.
- ID
- xccdf_org.ssgproject.content_rule_service_kdump_disabled
- Severity
- Medium
- References
- Updated
Remediation - Puppet
include disable_kdump-tools
class disable_kdump-tools {
service {'kdump-tools':
enable => false,
ensure => 'stopped',
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- DISA-STIG-UBTU-20-010413
- NIST-800-53-CM-6(a)
Remediation - Kubernetes Patch
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
config:
ignition:
version: 3.1.0
Remediation - OS Build Blueprint
[customizations.services]
masked = ["kdump-tools"]
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if dpkg-query --show --showformat='${db:Status-Status}
' 'kernel' 2>/dev/null | grep -q installed; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'kdump-tools.service'