From d995dd6eab4d14d8400abe16bbf14c3364f99fb6 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 16 Jun 2024 07:24:56 +0300 Subject: [PATCH] Add the "MAGIC_SYSRQ_SERIAL" check Thanks to @thestinger. Refers to #104. --- kernel_hardening_checker/checks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel_hardening_checker/checks.py b/kernel_hardening_checker/checks.py index 0d6d703..42d9407 100755 --- a/kernel_hardening_checker/checks.py +++ b/kernel_hardening_checker/checks.py @@ -421,6 +421,8 @@ def add_kconfig_checks(l: List[ChecklistObjType], arch: str) -> None: l += [KconfigCheck('cut_attack_surface', 'a13xp0p0v', 'BLK_DEV_WRITE_MOUNTED', 'is not set')] l += [OR(KconfigCheck('cut_attack_surface', 'a13xp0p0v', 'TRIM_UNUSED_KSYMS', 'y'), modules_not_set)] + l += [OR(KconfigCheck('cut_attack_surface', 'a13xp0p0v', 'MAGIC_SYSRQ_SERIAL', 'is not set'), + KconfigCheck('cut_attack_surface', 'a13xp0p0v', 'MAGIC_SYSRQ_DEFAULT_ENABLE', '0x0'))] # 'harden_userspace' -- 2.31.1