Don't fail if dev.tty.legacy_tiocsti not found
[kconfig-hardened-check.git] / kernel_hardening_checker / checks.py
index 9f48d5849f6a675a3d560ec0138a2ad8da44e956..0e0f2051ec777ce217fb6e5980a1ad7bf2ecb6be 100644 (file)
@@ -680,7 +680,8 @@ def add_sysctl_checks(l, _arch):
              AND(KconfigCheck('cut_attack_surface', 'lockdown', 'BPF_SYSCALL', 'is not set'),
                  have_config_file))]
     l += [SysctlCheck('cut_attack_surface', 'kspp', 'kernel.kptr_restrict', '2')]
-    l += [SysctlCheck('cut_attack_surface', 'kspp', 'dev.tty.legacy_tiocsti', '0')]
+    l += [OR(SysctlCheck('cut_attack_surface', 'kspp', 'dev.tty.legacy_tiocsti', '0'),
+             SysctlCheck('cut_attack_surface', 'kspp', 'dev.tty.legacy_tiocsti', 'is not set'))]
     l += [SysctlCheck('cut_attack_surface', 'kspp', 'vm.unprivileged_userfaultfd', '0')]
           # At first, it disabled unprivileged userfaultfd,
           # and since v5.11 it enables unprivileged userfaultfd for user-mode only.