X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=kconfig_hardened_check%2Fchecks.py;h=e8e89b9898813c901add423ab0fb253ecde094d3;hb=a6732ba512e963eba7ab3f8af494508a49c92613;hp=c087bbc5d229b7e3e451f2dc418b432473022d56;hpb=f19835dbf0afafdb446567d950de3000f0c0c4ad;p=kconfig-hardened-check.git diff --git a/kconfig_hardened_check/checks.py b/kconfig_hardened_check/checks.py index c087bbc..e8e89b9 100644 --- a/kconfig_hardened_check/checks.py +++ b/kconfig_hardened_check/checks.py @@ -390,14 +390,11 @@ def add_kconfig_checks(l, arch): l += [KconfigCheck('cut_attack_surface', 'my', 'INPUT_EVBUG', 'is not set')] # Can be used as a keylogger l += [KconfigCheck('cut_attack_surface', 'my', 'KGDB', 'is not set')] l += [KconfigCheck('cut_attack_surface', 'my', 'AIO', 'is not set')] + l += [KconfigCheck('cut_attack_surface', 'my', 'CORESIGHT', 'is not set')] l += [OR(KconfigCheck('cut_attack_surface', 'my', 'TRIM_UNUSED_KSYMS', 'y'), modules_not_set)] # 'harden_userspace' - if arch in ('X86_64', 'ARM64', 'X86_32'): - l += [KconfigCheck('harden_userspace', 'defconfig', 'INTEGRITY', 'y')] - if arch == 'ARM': - l += [KconfigCheck('harden_userspace', 'my', 'INTEGRITY', 'y')] if arch == 'ARM64': l += [KconfigCheck('harden_userspace', 'defconfig', 'ARM64_PTR_AUTH', 'y')] l += [KconfigCheck('harden_userspace', 'defconfig', 'ARM64_BTI', 'y')] @@ -548,6 +545,9 @@ def add_cmdline_checks(l, arch): # 'cut_attack_surface', 'my' l += [CmdlineCheck('cut_attack_surface', 'my', 'sysrq_always_enabled', 'is not set')] + # 'harden_userspace' + l += [CmdlineCheck('harden_userspace', 'defconfig', 'norandmaps', 'is not set')] + no_kstrtobool_options = [ 'debugfs', # See debugfs_kernel() in fs/debugfs/inode.c