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
d3c6af4a
Commit
d3c6af4a
authored
Apr 09, 2022
by
Alexander Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need in BPF_UNPRIV_DEFAULT_OFF if BPF_SYSCALL is disabled
parent
416f4a96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
__init__.py
kconfig_hardened_check/__init__.py
+4
-2
No files found.
kconfig_hardened_check/__init__.py
View file @
d3c6af4a
...
@@ -314,6 +314,7 @@ def add_kconfig_checks(l, arch):
...
@@ -314,6 +314,7 @@ def add_kconfig_checks(l, arch):
modules_not_set
=
KconfigCheck
(
'cut_attack_surface'
,
'kspp'
,
'MODULES'
,
'is not set'
)
modules_not_set
=
KconfigCheck
(
'cut_attack_surface'
,
'kspp'
,
'MODULES'
,
'is not set'
)
devmem_not_set
=
KconfigCheck
(
'cut_attack_surface'
,
'kspp'
,
'DEVMEM'
,
'is not set'
)
# refers to LOCKDOWN
devmem_not_set
=
KconfigCheck
(
'cut_attack_surface'
,
'kspp'
,
'DEVMEM'
,
'is not set'
)
# refers to LOCKDOWN
bpf_syscall_not_set
=
KconfigCheck
(
'cut_attack_surface'
,
'lockdown'
,
'BPF_SYSCALL'
,
'is not set'
)
# refers to LOCKDOWN
efi_not_set
=
KconfigCheck
(
'cut_attack_surface'
,
'my'
,
'EFI'
,
'is not set'
)
efi_not_set
=
KconfigCheck
(
'cut_attack_surface'
,
'my'
,
'EFI'
,
'is not set'
)
# 'self_protection', 'defconfig'
# 'self_protection', 'defconfig'
...
@@ -494,7 +495,8 @@ def add_kconfig_checks(l, arch):
...
@@ -494,7 +495,8 @@ def add_kconfig_checks(l, arch):
loadpin_is_set
)]
loadpin_is_set
)]
# 'cut_attack_surface', 'defconfig'
# 'cut_attack_surface', 'defconfig'
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'defconfig'
,
'BPF_UNPRIV_DEFAULT_OFF'
,
'y'
)]
# see unprivileged_bpf_disabled
l
+=
[
OR
(
KconfigCheck
(
'cut_attack_surface'
,
'defconfig'
,
'BPF_UNPRIV_DEFAULT_OFF'
,
'y'
),
bpf_syscall_not_set
)]
# see unprivileged_bpf_disabled
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'defconfig'
,
'SECCOMP'
,
'y'
)]
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'defconfig'
,
'SECCOMP'
,
'y'
)]
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'defconfig'
,
'SECCOMP_FILTER'
,
'y'
)]
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'defconfig'
,
'SECCOMP_FILTER'
,
'y'
)]
if
arch
in
(
'X86_64'
,
'ARM64'
,
'X86_32'
):
if
arch
in
(
'X86_64'
,
'ARM64'
,
'X86_32'
):
...
@@ -596,8 +598,8 @@ def add_kconfig_checks(l, arch):
...
@@ -596,8 +598,8 @@ def add_kconfig_checks(l, arch):
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'clipos'
,
'X86_INTEL_TSX_MODE_OFF'
,
'y'
)]
# tsx=off
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'clipos'
,
'X86_INTEL_TSX_MODE_OFF'
,
'y'
)]
# tsx=off
# 'cut_attack_surface', 'lockdown'
# 'cut_attack_surface', 'lockdown'
l
+=
[
bpf_syscall_not_set
]
# refers to LOCKDOWN
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'lockdown'
,
'EFI_TEST'
,
'is not set'
)]
# refers to LOCKDOWN
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'lockdown'
,
'EFI_TEST'
,
'is not set'
)]
# refers to LOCKDOWN
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'lockdown'
,
'BPF_SYSCALL'
,
'is not set'
)]
# refers to LOCKDOWN
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'lockdown'
,
'MMIOTRACE_TEST'
,
'is not set'
)]
# refers to LOCKDOWN
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'lockdown'
,
'MMIOTRACE_TEST'
,
'is not set'
)]
# refers to LOCKDOWN
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'lockdown'
,
'KPROBES'
,
'is not set'
)]
# refers to LOCKDOWN
l
+=
[
KconfigCheck
(
'cut_attack_surface'
,
'lockdown'
,
'KPROBES'
,
'is not set'
)]
# refers to LOCKDOWN
...
...
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