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
20e1c977
Commit
20e1c977
authored
Oct 12, 2022
by
Alexander Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the README
parent
e5525cb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
16 deletions
+29
-16
README.md
README.md
+29
-16
No files found.
README.md
View file @
20e1c977
...
@@ -27,6 +27,11 @@ I also created the [__Linux Kernel Defence Map__][4], which is a graphical repre
...
@@ -27,6 +27,11 @@ I also created the [__Linux Kernel Defence Map__][4], which is a graphical repre
relationships between security hardening features and the corresponding vulnerability classes
relationships between security hardening features and the corresponding vulnerability classes
or exploitation techniques.
or exploitation techniques.
__Attention!__
Changing Linux kernel security parameters may also affect system performance
and functionality of userspace software. So for choosing these parameters consider
the threat model of your Linux-based information system and perform thorough testing
of its typical workload.
## Supported microarchitectures
## Supported microarchitectures
-
X86_64
-
X86_64
...
@@ -315,6 +320,13 @@ The version format is: __[major_number].[kernel_version].[kernel_patchlevel]__
...
@@ -315,6 +320,13 @@ The version format is: __[major_number].[kernel_version].[kernel_patchlevel]__
## Questions and answers
## Questions and answers
__Q:__
How all these kernel parameters influence the Linux kernel security?
__A:__
To answer this question, you can use the
`kconfig-hardened-check`
[
sources of recommendations
][
24
]
and the
[
Linux Kernel Defence Map
][
4
]
with its references.
<br
/>
__Q:__
How disabling
`CONFIG_USER_NS`
cuts the attack surface? It's needed for containers!
__Q:__
How disabling
`CONFIG_USER_NS`
cuts the attack surface? It's needed for containers!
__A:__
Yes, the
`CONFIG_USER_NS`
option provides some isolation between the userspace programs,
__A:__
Yes, the
`CONFIG_USER_NS`
option provides some isolation between the userspace programs,
...
@@ -330,13 +342,6 @@ The rationale:
...
@@ -330,13 +342,6 @@ The rationale:
<br
/>
<br
/>
__Q:__
Why
`CONFIG_GCC_PLUGINS`
is automatically disabled during the kernel compilation?
__A:__
It means that your gcc doesn't support plugins. For example, if you have
`gcc-7`
on Ubuntu,
try to install
`gcc-7-plugin-dev`
package, it should help.
<br
/>
__Q:__
KSPP and CLIP OS recommend
`CONFIG_PANIC_ON_OOPS=y`
. Why doesn't this tool do the same?
__Q:__
KSPP and CLIP OS recommend
`CONFIG_PANIC_ON_OOPS=y`
. Why doesn't this tool do the same?
__A:__
I personally don't support this recommendation because:
__A:__
I personally don't support this recommendation because:
...
@@ -349,6 +354,16 @@ In other cases, the kernel panics, which is similar to `CONFIG_PANIC_ON_OOPS=y`.
...
@@ -349,6 +354,16 @@ In other cases, the kernel panics, which is similar to `CONFIG_PANIC_ON_OOPS=y`.
<br
/>
<br
/>
__Q:__
Why enabling
`CONFIG_STATIC_USERMODEHELPER`
breaks various things in my GNU/Linux system?
Do I really need that feature?
__A:__
Linux kernel usermode helpers can be used for privilege escalation in kernel exploits
(
[
example 1
][
9
]
,
[
example 2
][
10
]
).
`CONFIG_STATIC_USERMODEHELPER`
prevents that method. But it
requires the corresponding support in the userspace: see the
[
example implementation
][
11
]
by
Tycho Andersen
[
@tych0
][
12
]
.
<br
/>
__Q:__
What about performance impact of these security hardening options?
__Q:__
What about performance impact of these security hardening options?
__A:__
Ike Devolder
[
@BlackIkeEagle
][
7
]
made some performance tests and described the results in
[
this article
][
8
]
.
__A:__
Ike Devolder
[
@BlackIkeEagle
][
7
]
made some performance tests and described the results in
[
this article
][
8
]
.
...
@@ -363,20 +378,17 @@ You can use it for the `mainline` or `stable` tree from [kernel.org][20] or for
...
@@ -363,20 +378,17 @@ You can use it for the `mainline` or `stable` tree from [kernel.org][20] or for
<br
/>
<br
/>
__Q:__
Why enabling
`CONFIG_STATIC_USERMODEHELPER`
breaks various things in my GNU/Linux system?
__Q:__
Does my kernel have all those mitigations of Transient Execution Vulnerabilities in my hardware?
Do I really need that feature?
__A:__
Linux kernel usermode helpers can be used for privilege escalation in kernel exploits
__A:__
Checking the kernel config is not enough to answer this question.
(
[
example 1
][
9
]
,
[
example 2
][
10
]
).
`CONFIG_STATIC_USERMODEHELPER`
prevents that method. But it
I highly recommend using
[
spectre-meltdown-checker
][
13
]
tool maintained by Stéphane Lesimple
[
@speed47
][
14
]
.
requires the corresponding support in the userspace: see the
[
example implementation
][
11
]
by
Tycho Andersen
[
@tych0
][
12
]
.
<br
/>
<br
/>
__Q:__
Does my kernel have all those mitigations of Transient Execution Vulnerabilities in my hardware
?
__Q:__
Why the
`CONFIG_GCC_PLUGINS`
option is automatically disabled during the kernel compilation
?
__A:__
Checking the kernel config is not enough to answer this question.
__A:__
It means that your gcc doesn't support plugins. For example, if you have
`gcc-7`
on Ubuntu,
I highly recommend using
[
spectre-meltdown-checker
][
13
]
tool maintained by Stéphane Lesimple
[
@speed47
][
14
]
.
try to install
`gcc-7-plugin-dev`
package, it should help
.
[
1
]:
http://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project/Recommended_Settings
[
1
]:
http://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project/Recommended_Settings
...
@@ -402,3 +414,4 @@ I highly recommend using [spectre-meltdown-checker][13] tool maintained by Stép
...
@@ -402,3 +414,4 @@ I highly recommend using [spectre-meltdown-checker][13] tool maintained by Stép
[
21
]:
https://github.com/a13xp0p0v/kconfig-hardened-check/issues/66
[
21
]:
https://github.com/a13xp0p0v/kconfig-hardened-check/issues/66
[
22
]:
https://github.com/a13xp0p0v/kconfig-hardened-check/issues/56
[
22
]:
https://github.com/a13xp0p0v/kconfig-hardened-check/issues/56
[
23
]:
https://github.com/a13xp0p0v/kconfig-hardened-check/issues?q=label%3Akernel_maintainer_feedback
[
23
]:
https://github.com/a13xp0p0v/kconfig-hardened-check/issues?q=label%3Akernel_maintainer_feedback
[
24
]:
https://github.com/a13xp0p0v/kconfig-hardened-check#motivation
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