From: Alexander Popov Date: Tue, 17 Oct 2023 15:53:32 +0000 (+0300) Subject: Add the 'kernel.yama.ptrace_scope' check X-Git-Tag: v0.6.6~62 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=0ec20f622efdbc8ea33cde1fe96e3fb0b085dfaa;p=kconfig-hardened-check.git Add the 'kernel.yama.ptrace_scope' check --- diff --git a/kernel_hardening_checker/checks.py b/kernel_hardening_checker/checks.py index 56d2f74..b7f2db5 100644 --- a/kernel_hardening_checker/checks.py +++ b/kernel_hardening_checker/checks.py @@ -578,7 +578,6 @@ def normalize_cmdline_options(option, value): # TODO: draft of security hardening sysctls: -# kernel.yama.ptrace_scope=3 # what about bpf_jit_enable? # vm.unprivileged_userfaultfd=0 # (at first, it disabled unprivileged userfaultfd, @@ -615,3 +614,4 @@ def add_sysctl_checks(l, arch): l += [SysctlCheck('cut_attack_surface', 'kspp', 'dev.tty.ldisc_autoload', '0')] l += [SysctlCheck('cut_attack_surface', 'kspp', 'kernel.unprivileged_bpf_disabled', '1')] l += [SysctlCheck('cut_attack_surface', 'kspp', 'kernel.kptr_restrict', '2')] + l += [SysctlCheck('cut_attack_surface', 'kspp', 'kernel.yama.ptrace_scope', '3')]