From: Alexander Popov Date: Mon, 19 Aug 2024 14:22:00 +0000 (+0300) Subject: Introduce the ARM_PTDUMP_DEBUGFS check X-Git-Tag: v0.6.10~19^2~5 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=b2df9903b190bdcfa65c3373a47c45cf77499283;p=kconfig-hardened-check.git Introduce the ARM_PTDUMP_DEBUGFS check `X86_PTDUMP` is the old name of `PTDUMP_DEBUGFS`, see the upstream kernel commit 2ae27137b2db89365f623a7694786cf6d1acb6c7. `ARM_PTDUMP` is the old name of `ARM_PTDUMP_DEBUGFS`, see the upstream kernel commit 4fb69cc4566f175839615cc4ef8828ae4d5341d9. --- diff --git a/kernel_hardening_checker/checks.py b/kernel_hardening_checker/checks.py index 11cf397..dea6e0b 100755 --- a/kernel_hardening_checker/checks.py +++ b/kernel_hardening_checker/checks.py @@ -393,8 +393,6 @@ def add_kconfig_checks(l: List[ChecklistObjType], arch: str) -> None: l += [KconfigCheck('cut_attack_surface', 'grsec', 'SUNRPC_DEBUG', 'is not set')] l += [AND(KconfigCheck('cut_attack_surface', 'grsec', 'PTDUMP_DEBUGFS', 'is not set'), KconfigCheck('cut_attack_surface', 'grsec', 'X86_PTDUMP', 'is not set'))] - l += [AND(KconfigCheck('cut_attack_surface', 'grsec', 'PTDUMP_DEBUGFS', 'is not set'), - KconfigCheck('cut_attack_surface', 'grsec', 'ARM_PTDUMP', 'is not set'))] l += [KconfigCheck('cut_attack_surface', 'grsec', 'X86_16BIT', 'is not set')] l += [KconfigCheck('cut_attack_surface', 'grsec', 'BLK_DEV_UBLK', 'is not set')] l += [KconfigCheck('cut_attack_surface', 'grsec', 'VCAP_KUNIT_TEST', 'is not set')] @@ -452,6 +450,8 @@ def add_kconfig_checks(l: List[ChecklistObjType], arch: str) -> None: # dangerous, only for debugging the kernel hardening features! l += [OR(KconfigCheck('cut_attack_surface', 'a13xp0p0v', 'TRIM_UNUSED_KSYMS', 'y'), modules_not_set)] + l += [AND(KconfigCheck('cut_attack_surface', 'a13xp0p0v', 'ARM_PTDUMP_DEBUGFS', 'is not set'), + KconfigCheck('cut_attack_surface', 'a13xp0p0v', 'ARM_PTDUMP', 'is not set'))] # 'harden_userspace' if arch == 'ARM64':