## Motivation
-There are plenty of Linux kernel hardening config options. A lot of them are
+There are plenty of security hardening options in the Linux kernel. A lot of them are
not enabled by the major distros. We have to enable these options ourselves to
make our systems more secure.
But nobody likes checking configs manually. So let the computers do their job!
__kconfig-hardened-check.py__ helps me to check the Linux kernel Kconfig option list
-against my hardening preferences, which are based on the
+against my security hardening preferences, which are based on the
- [KSPP recommended settings][1],
- [CLIP OS kernel configuration][2],
- direct feedback from Linux kernel maintainers (Daniel Vetter in [issue #38][6]).
I also created [__Linux Kernel Defence Map__][4] that is a graphical representation of the
-relationships between these hardening features and the corresponding vulnerability classes
+relationships between security hardening features and the corresponding vulnerability classes
or exploitation techniques.
## Supported microarchitectures
[-c CONFIG]
[-m {verbose,json,show_ok,show_fail}]
-Checks the hardening options in the Linux kernel config
+A tool for checking the security hardening options of the Linux kernel
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-p {X86_64,X86_32,ARM64,ARM}, --print {X86_64,X86_32,ARM64,ARM}
- print hardening preferences for selected architecture
+ print security hardening preferences for the selected architecture
-c CONFIG, --config CONFIG
check the kernel config file against these preferences
-m {verbose,json,show_ok,show_fail}, --mode {verbose,json,show_ok,show_fail}
## kconfig-hardened-check versioning
-I usually update the kernel hardening recommendations after each Linux kernel release.
+I usually update the kernel security hardening recommendations after each Linux kernel release.
So the version of `kconfig-hardened-check` is associated with the corresponding version of the kernel.
<br />
-__Q:__ What about performance impact of these kernel 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].
#
# This tool helps me to check the Linux kernel Kconfig option list
-# against my hardening preferences for X86_64, ARM64, X86_32, and ARM.
+# against my security hardening preferences for X86_64, ARM64, X86_32, and ARM.
# Let the computers do their job!
#
# Author: Alexander Popov <alex.popov@linux.com>
report_modes = ['verbose', 'json', 'show_ok', 'show_fail']
supported_archs = ['X86_64', 'X86_32', 'ARM64', 'ARM']
parser = ArgumentParser(prog='kconfig-hardened-check',
- description='Checks the hardening options in the Linux kernel config')
+ description='A tool for checking the security hardening options of the Linux kernel')
parser.add_argument('--version', action='version', version='%(prog)s ' + __version__)
parser.add_argument('-p', '--print', choices=supported_archs,
- help='print hardening preferences for selected architecture')
+ help='print security hardening preferences for the selected architecture')
parser.add_argument('-c', '--config',
help='check the kernel config file against these preferences')
parser.add_argument('-m', '--mode', choices=report_modes,
arch = args.print
construct_checklist(config_checklist, arch)
if mode != 'json':
- print('[+] Printing kernel hardening preferences for {}...'.format(arch))
+ print('[+] Printing kernel security hardening preferences for {}...'.format(arch))
print_checklist(mode, config_checklist, False)
sys.exit(0)