X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=kconfig-hardened-check.py;h=fd7c50c7283659a0513697436e6c7abe30d63434;hb=8289cd8c32c408f6bb954ccff531f34e94045204;hp=3f75c884bc6b7567da821b313767d7ca6e9a6abc;hpb=2665d04c056fed609358b1e6da1eab93eb475c46;p=kconfig-hardened-check.git diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index 3f75c88..fd7c50c 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -20,6 +20,8 @@ # N.B. Hardening sysctl's: # net.core.bpf_jit_harden # +# +# TODO: add hardening preferences for ARM import sys from argparse import ArgumentParser @@ -108,6 +110,8 @@ def construct_checklist(): checklist.append(OptCheck('PAGE_TABLE_ISOLATION', 'y', 'ubuntu18', 'self_protection')) checklist.append(OptCheck('RETPOLINE', 'y', 'ubuntu18', 'self_protection')) checklist.append(OptCheck('X86_64', 'y', 'ubuntu18', 'self_protection')) + checklist.append(OptCheck('X86_SMAP', 'y', 'ubuntu18', 'self_protection')) + checklist.append(OptCheck('X86_INTEL_UMIP', 'y', 'ubuntu18', 'self_protection')) checklist.append(OR(OptCheck('STRICT_KERNEL_RWX', 'y', 'ubuntu18', 'self_protection'), \ OptCheck('DEBUG_RODATA', 'y', 'before_v4.11', 'self_protection'))) checklist.append(OptCheck('DEBUG_WX', 'y', 'ubuntu18', 'self_protection')) @@ -155,8 +159,10 @@ def construct_checklist(): checklist.append(OptCheck('SLUB_DEBUG_ON', 'y', 'my', 'self_protection')) checklist.append(OptCheck('SECURITY_DMESG_RESTRICT', 'y', 'my', 'self_protection')) checklist.append(OptCheck('STATIC_USERMODEHELPER', 'y', 'my', 'self_protection')) # breaks systemd? + checklist.append(OptCheck('SECURITY_LOADPIN', 'y', 'my', 'self_protection')) checklist.append(OptCheck('PAGE_POISONING_NO_SANITY', 'is not set', 'my', 'self_protection')) checklist.append(OptCheck('PAGE_POISONING_ZERO', 'is not set', 'my', 'self_protection')) + checklist.append(OptCheck('SLAB_MERGE_DEFAULT', 'is not set', 'my', 'self_protection')) # slab_nomerge checklist.append(OptCheck('SECURITY', 'y', 'ubuntu18', 'security_policy')) checklist.append(OptCheck('SECURITY_YAMA', 'y', 'ubuntu18', 'security_policy'))