1.5.4 Ensure core dumps are restricted
Audit#
Run the following commands and verify output matches:
# grep -Es '^(\*|\s).*hard.*core.*(\s+#.*)?$' /etc/security/limits.conf /etc/security/limits.d/*
* hard core 0
# sysctl fs.suid_dumpable
fs.suid_dumpable = 0
# grep "fs.suid_dumpable" /etc/sysctl.conf /etc/sysctl.d/*
fs.suid_dumpable = 0
Run the following command to check if systemd-coredump is installed:
If enabled, masked, or disabled is returned systemd-coredump is installed
Remediation#
Add the following line to /etc/security/limits.conf or a /etc/security/limits.d/* file:
Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file:
Run the following command to set the active kernel parameter:
IF systemd-coredump is installed:
edit /etc/systemd/coredump.conf and add/modify the following lines:
Run the command: