nixpkgs/nixos/modules/security
Joachim Fasting 878ad1ce6e
nixos: add option to lock kernel modules
Adds an option `security.lockKernelModules` that, when enabled, disables
kernel module loading once the system reaches its normal operating state.

The rationale for this over simply setting the sysctl knob is to allow
some legitmate kernel module loading to occur; the naive solution breaks
too much to be useful.

The benefit to the user is to help ensure the integrity of the kernel
runtime: only code loaded as part of normal system initialization will be
available in the kernel for the duration of the boot session.  This helps
prevent injection of malicious code or unexpected loading of legitimate
but normally unused modules that have exploitable bugs (e.g., DCCP use
after free CVE-2017-6074, n_hldc CVE-2017-2636, XFRM framework
CVE-2017-7184, L2TPv3 CVE-2016-10200).

From an aestethic point of view, enabling this option helps make the
configuration more "declarative".

Closes https://github.com/NixOS/nixpkgs/pull/24681
2017-04-30 12:05:37 +02:00
..
wrappers security-wrapper: link old wrapper dir to new one 2017-03-23 15:57:30 +01:00
acme.nix acme: Add "domain" option to separate domain from name 2017-04-11 18:28:05 +02:00
acme.xml nixos docs: update for Nginx + ACME (#21320) 2017-01-09 06:39:10 +01:00
apparmor-suid.nix Getting rid of the var indirection and using a bin path instead 2017-01-29 04:11:01 -06:00
apparmor.nix apparmor: support for lxc profiles 2017-01-10 23:01:03 +01:00
audit.nix audit module: only enable service if kernel has audit (#19569) 2016-10-15 16:03:41 +02:00
ca.nix cacerts: refactor, add blacklist option 2016-10-09 02:00:18 +02:00
chromium-suid-sandbox.nix More derp 2017-01-29 05:33:56 -06:00
dhparams.nix dhparams module: condition on enable option (#23661) 2017-03-17 01:56:13 +01:00
duosec.nix More derp 2017-01-29 05:33:56 -06:00
grsecurity.nix grsecurity: discontinue support 2017-04-28 12:35:15 +02:00
grsecurity.xml grsecurity: discontinue support 2017-04-28 12:35:15 +02:00
hidepid.nix hidepid: polkit and systemd-logind compatibility 2016-12-07 01:12:05 +01:00
hidepid.xml hidepid module: detailed description to external doc 2016-09-15 15:36:03 +02:00
lock-kernel-modules.nix nixos: add option to lock kernel modules 2017-04-30 12:05:37 +02:00
oath.nix config.security.oath: new module 2016-02-25 13:52:45 +00:00
pam_mount.nix pam_mount module: integrate pam_mount into PAM of NixOS 2015-07-04 23:42:31 +02:00
pam_usb.nix More derp 2017-01-29 05:33:56 -06:00
pam.nix Remove top-level kde5 attribute 2017-02-27 11:49:10 -06:00
polkit.nix network-link-*.service: Set stopIfChanged = false 2017-04-04 15:13:49 +02:00
prey.nix nixos: fix some types 2015-09-18 18:48:50 +00:00
rngd.nix rngd: update modalias to match cpu type 2016-09-17 18:36:57 -07:00
rtkit.nix rtkit: Update from 0.10 to 0.11 2014-04-21 23:22:10 +02:00
sudo.nix More derp 2017-01-29 05:33:56 -06:00