X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=kconfig_hardened_check%2F__init__.py;h=3361bde35d7851a8b35f5ccc8001a64686eed3bd;hb=refs%2Fpull%2F60%2Fhead;hp=586658e6432963e2727dee337bdac140e8b63c6b;hpb=f5ba73c39a6f7480a593c92d14e09c8c4acf8746;p=kconfig-hardened-check.git diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index 586658e..3361bde 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -380,6 +380,7 @@ def add_kconfig_checks(l, arch): if arch == 'ARM': l += [KconfigCheck('self_protection', 'defconfig', 'CPU_SW_DOMAIN_PAN', 'y')] l += [KconfigCheck('self_protection', 'defconfig', 'HARDEN_BRANCH_PREDICTOR', 'y')] + l += [KconfigCheck('self_protection', 'defconfig', 'HARDEN_BRANCH_HISTORY', 'y')] # 'self_protection', 'kspp' l += [KconfigCheck('self_protection', 'kspp', 'SECURITY_DMESG_RESTRICT', 'y')] @@ -440,8 +441,9 @@ def add_kconfig_checks(l, arch): # 'self_protection', 'maintainer' ubsan_bounds_is_set = KconfigCheck('self_protection', 'maintainer', 'UBSAN_BOUNDS', 'y') # only array index bounds checking l += [ubsan_bounds_is_set] # recommended by Kees Cook in /issues/53 - l += [AND(KconfigCheck('self_protection', 'maintainer', 'UBSAN_SANITIZE_ALL', 'y'), - ubsan_bounds_is_set)] # recommended by Kees Cook in /issues/53 + if arch in ('X86_64', 'ARM64', 'X86_32'): # ARCH_HAS_UBSAN_SANITIZE_ALL is not enabled for ARM + l += [AND(KconfigCheck('self_protection', 'maintainer', 'UBSAN_SANITIZE_ALL', 'y'), + ubsan_bounds_is_set)] # recommended by Kees Cook in /issues/53 l += [AND(KconfigCheck('self_protection', 'maintainer', 'UBSAN_TRAP', 'y'), ubsan_bounds_is_set)] # recommended by Kees Cook in /issues/53