Skip to content

Commit

Permalink
Fix the false result of the REFCOUNT_FULL check for kernels > v5.4.208
Browse files Browse the repository at this point in the history
Refers to #88, #89
  • Loading branch information
a13xp0p0v committed Mar 10, 2024
1 parent 839b347 commit 26b6e5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel_hardening_checker/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def add_kconfig_checks(l, arch):
KconfigCheck('self_protection', 'defconfig', 'DEBUG_SET_MODULE_RONX', 'y'),
modules_not_set)] # DEBUG_SET_MODULE_RONX was before v4.11
l += [OR(KconfigCheck('self_protection', 'defconfig', 'REFCOUNT_FULL', 'y'),
VersionCheck((5, 5, 0)))] # REFCOUNT_FULL is enabled by default since v5.5
VersionCheck((5, 4, 208)))]
# REFCOUNT_FULL is enabled by default since v5.5,
# and this is backported to v5.4.208
l += [OR(KconfigCheck('self_protection', 'defconfig', 'INIT_STACK_ALL_ZERO', 'y'),
KconfigCheck('self_protection', 'kspp', 'GCC_PLUGIN_STRUCTLEAK_BYREF_ALL', 'y'))]
if arch in ('X86_64', 'ARM64', 'X86_32'):
Expand Down

0 comments on commit 26b6e5b

Please sign in to comment.