Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kernel-hardening-checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
kernel-hardening-checker
Commits
039c8700
Commit
039c8700
authored
Oct 16, 2023
by
Alexander Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disabling X86_VSYSCALL_EMULATION is now recommended by KSPP
parent
5f9e0ea2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
checks.py
kernel_hardening_checker/checks.py
+6
-6
No files found.
kernel_hardening_checker/checks.py
View file @
039c8700
...
...
@@ -275,6 +275,11 @@ def add_kconfig_checks(l, arch):
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'kspp'
,
'COMPAT_VDSO'
,
'is not set'
)]
# CONFIG_COMPAT_VDSO disabled ASLR of vDSO only on X86_64 and X86_32;
# on ARM64 this option has different meaning
if
arch
==
'X86_64'
:
l
+=
[
OR
(
KconfigCheck
(
'cut_attack_surface'
,
'kspp'
,
'X86_VSYSCALL_EMULATION'
,
'is not set'
),
KconfigCheck
(
'cut_attack_surface'
,
'kspp'
,
'LEGACY_VSYSCALL_NONE'
,
'y'
))]
# disabling X86_VSYSCALL_EMULATION turns vsyscall off completely,
# and LEGACY_VSYSCALL_NONE can be changed at boot time via the cmdline parameter
if
arch
==
'ARM'
:
l
+=
[
OR
(
KconfigCheck
(
'cut_attack_surface'
,
'kspp'
,
'STRICT_DEVMEM'
,
'y'
),
devmem_not_set
)]
# refers to LOCKDOWN
...
...
@@ -342,11 +347,6 @@ def add_kconfig_checks(l, arch):
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'clipos'
,
'EFI_CUSTOM_SSDT_OVERLAYS'
,
'is not set'
)]
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'clipos'
,
'COREDUMP'
,
'is not set'
)]
# cut userspace attack surface
# l += [KconfigCheck('cut_attack_surface', 'clipos', 'IKCONFIG', 'is not set')] # no, IKCONFIG is needed for this check :)
if
arch
==
'X86_64'
:
l
+=
[
OR
(
KconfigCheck
(
'cut_attack_surface'
,
'clipos'
,
'X86_VSYSCALL_EMULATION'
,
'is not set'
),
KconfigCheck
(
'cut_attack_surface'
,
'kspp'
,
'LEGACY_VSYSCALL_NONE'
,
'y'
))]
# disabling X86_VSYSCALL_EMULATION turns vsyscall off completely,
# and LEGACY_VSYSCALL_NONE can be changed at boot time via the cmdline parameter
# 'cut_attack_surface', 'lockdown'
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'lockdown'
,
'EFI_TEST'
,
'is not set'
)]
# refers to LOCKDOWN
...
...
@@ -510,7 +510,7 @@ def add_cmdline_checks(l, arch):
# 'cut_attack_surface', 'kspp'
if
arch
==
'X86_64'
:
l
+=
[
OR
(
CmdlineCheck
(
'cut_attack_surface'
,
'kspp'
,
'vsyscall'
,
'none'
),
KconfigCheck
(
'cut_attack_surface'
,
'
clipos
'
,
'X86_VSYSCALL_EMULATION'
,
'is not set'
),
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'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment