Skip to content

Disable KDump Kernel Crash Analyzer (kdump)

An XCCDF Rule

Description

The kdump 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 service can be disabled with the following command:
$ sudo systemctl mask --now kdump.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 Templates

A Kubernetes Patch

apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
  config:
    ignition:
      version: 3.1.0

Anaconda Pre-Install Instructions

kdump --disable

OS Build Blueprint

[customizations.services]
disabled = ["kdump"]

A Puppet Snippet

include disable_kdump
class disable_kdump {
  service {'kdump':
    enable => false,
    ensure => 'stopped',
  }
}

A Shell Script

# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'kdump.service'
"$SYSTEMCTL_EXEC" disable 'kdump.service'
"$SYSTEMCTL_EXEC" mask 'kdump.service'

An Ansible Snippet

- name: Block Disable service kdump
  block:
  - name: Disable service kdump
    block:

    - name: Disable service kdump