From 7235769c9c0c94cfb6fb864c714b3ccaa6872b9b Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sat, 30 Dec 2023 23:41:01 +0300 Subject: [PATCH] Fix the order in the vdso32 check --- kernel_hardening_checker/checks.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel_hardening_checker/checks.py b/kernel_hardening_checker/checks.py index 1c05b43..50dea2b 100644 --- a/kernel_hardening_checker/checks.py +++ b/kernel_hardening_checker/checks.py @@ -544,14 +544,14 @@ def add_cmdline_checks(l, arch): KconfigCheck('cut_attack_surface', 'kspp', 'X86_VSYSCALL_EMULATION', 'is not set'), AND(KconfigCheck('cut_attack_surface', 'kspp', 'LEGACY_VSYSCALL_NONE', 'y'), CmdlineCheck('cut_attack_surface', 'kspp', 'vsyscall', 'is not set')))] - l += [OR(CmdlineCheck('cut_attack_surface', 'my', 'vdso32', '1'), - CmdlineCheck('cut_attack_surface', 'kspp', 'vdso32', '0'), + l += [OR(CmdlineCheck('cut_attack_surface', 'kspp', 'vdso32', '0'), + CmdlineCheck('cut_attack_surface', 'my', 'vdso32', '1'), AND(KconfigCheck('cut_attack_surface', 'kspp', 'COMPAT_VDSO', 'is not set'), CmdlineCheck('cut_attack_surface', 'my', 'vdso32', 'is not set')))] # the vdso32 parameter must not be 2 if arch == 'X86_32': - l += [OR(CmdlineCheck('cut_attack_surface', 'my', 'vdso32', '1'), - CmdlineCheck('cut_attack_surface', 'my', 'vdso', '1'), - CmdlineCheck('cut_attack_surface', 'kspp', 'vdso32', '0'), + l += [OR(CmdlineCheck('cut_attack_surface', 'kspp', 'vdso32', '0'), + CmdlineCheck('cut_attack_surface', 'my', 'vdso', '0'), + CmdlineCheck('cut_attack_surface', 'my', 'vdso32', '1'), CmdlineCheck('cut_attack_surface', 'my', 'vdso', '0'), AND(KconfigCheck('cut_attack_surface', 'kspp', 'COMPAT_VDSO', 'is not set'), CmdlineCheck('cut_attack_surface', 'my', 'vdso32', 'is not set'), -- 2.31.1