Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Google's kernelctf attack surface reduction #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The security hardening recommendations are based on:
- Last public [grsecurity][3] patch (options which they disable)
- [SECURITY_LOCKDOWN_LSM][5] patchset
- [Direct feedback from the Linux kernel maintainers][23]
- Googles [kernelctf][25]

I also created the [__Linux Kernel Defence Map__][4], which is a graphical representation of the
relationships between security hardening features and the corresponding vulnerability classes
Expand Down Expand Up @@ -506,3 +507,4 @@ try to install `gcc-7-plugin-dev` package, it should help.
[22]: https://github.com/a13xp0p0v/kernel-hardening-checker/issues/56
[23]: https://github.com/a13xp0p0v/kernel-hardening-checker/issues?q=label%3Akernel_maintainer_feedback
[24]: https://github.com/a13xp0p0v/kernel-hardening-checker#motivation
[25]: https://google.github.io/security-research/kernelctf/rules.html
5 changes: 4 additions & 1 deletion kernel_hardening_checker/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ def add_kconfig_checks(l: List[ChecklistObjType], arch: str) -> None:
l += [KconfigCheck('cut_attack_surface', 'grsec', 'DVB_C8SECTPFE', 'is not set')]
l += [KconfigCheck('cut_attack_surface', 'grsec', 'MTD_SLRAM', 'is not set')]
l += [KconfigCheck('cut_attack_surface', 'grsec', 'MTD_PHRAM', 'is not set')]
l += [KconfigCheck('cut_attack_surface', 'grsec', 'IO_URING', 'is not set')]
l += [KconfigCheck('cut_attack_surface', 'grsec', 'KCMP', 'is not set')]
l += [KconfigCheck('cut_attack_surface', 'grsec', 'RSEQ', 'is not set')]
l += [KconfigCheck('cut_attack_surface', 'grsec', 'LATENCYTOP', 'is not set')]
Expand All @@ -386,6 +385,10 @@ def add_kconfig_checks(l: List[ChecklistObjType], arch: str) -> None:
l += [KconfigCheck('cut_attack_surface', 'maintainer', 'NOUVEAU_LEGACY_CTX_SUPPORT', 'is not set')]
# recommended by Dave Airlie in kernel commit b30a43ac7132cdda

# 'cut_attack_surface', 'kernelctf'
l += [KconfigCheck('cut_attack_surface', 'kernelctf', 'IO_URING', 'is not set')]
l += [KconfigCheck('cut_attack_surface', 'kernelctf', 'NF_TABLES', 'is not set')]

# 'cut_attack_surface', 'clipos'
l += [KconfigCheck('cut_attack_surface', 'clipos', 'STAGING', 'is not set')]
l += [KconfigCheck('cut_attack_surface', 'clipos', 'KSM', 'is not set')] # to prevent FLUSH+RELOAD attack
Expand Down