From af98bba81db36b241e88036ad0de268a42d72cc6 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Thu, 2 May 2024 15:09:46 +0300 Subject: [PATCH] Fix the reason and decision of the KEXEC_CORE check KSPP doesn't recommend to disable it. Refers to #125 --- kernel_hardening_checker/checks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel_hardening_checker/checks.py b/kernel_hardening_checker/checks.py index a1fb941..56efe25 100644 --- a/kernel_hardening_checker/checks.py +++ b/kernel_hardening_checker/checks.py @@ -673,7 +673,7 @@ def add_sysctl_checks(l, _arch): l += [SysctlCheck('cut_attack_surface', 'kspp', 'kernel.dmesg_restrict', '1')] l += [SysctlCheck('cut_attack_surface', 'kspp', 'kernel.perf_event_paranoid', '3')] # with a custom patch, see https://lwn.net/Articles/696216/ l += [OR(SysctlCheck('cut_attack_surface', 'kspp', 'kernel.kexec_load_disabled', '1'), - AND(KconfigCheck('cut_attack_surfice', 'kspp', 'KEXEC_CORE', 'is not set'), + AND(KconfigCheck('-', '-', 'KEXEC_CORE', 'is not set'), have_config_file))] l += [SysctlCheck('cut_attack_surface', 'kspp', 'user.max_user_namespaces', '0')] # may break the upower daemon in Ubuntu l += [SysctlCheck('cut_attack_surface', 'kspp', 'dev.tty.ldisc_autoload', '0')] -- 2.31.1