nixpkgs/nixos/modules
Emily ad9bfe2254 nixos/hardened: enable user namespaces for root
linux-hardened sets kernel.unprivileged_userns_clone=0 by default; see
anthraxx/linux-hardened@104f44058f.

This allows the Nix sandbox to function while reducing the attack
surface posed by user namespaces, which allow unprivileged code to
exercise lots of root-only code paths and have lead to privilege
escalation vulnerabilities in the past.

We can safely leave user namespaces on for privileged users, as root
already has root privileges, but if you're not running builds on your
machine and really want to minimize the kernel attack surface then you
can set security.allowUserNamespaces to false.

Note that Chrome's sandbox requires either unprivileged CLONE_NEWUSER or
setuid, and Firefox's silently reduces the security level if it isn't
allowed (see about:support), so desktop users may want to set:

    boot.kernel.sysctl."kernel.unprivileged_userns_clone" = true;
2020-04-17 16:13:39 +01:00
..
config Merge master into staging-next 2020-04-03 21:54:40 +02:00
hardware treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
i18n/input-method nixos/ibus: fix evaluation 2020-04-05 02:23:38 +02:00
installer nixos/build-vms: propagate file location 2020-04-13 17:50:13 +02:00
misc treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
profiles nixos/hardened: enable user namespaces for root 2020-04-17 16:13:39 +01:00
programs Merge pull request #82339 from Ma27/captive-browser-xdg 2020-04-16 00:06:12 +02:00
security Revert "nixos/acme: Fix allowKeysForGroup not applying immediately" 2020-04-16 10:37:04 +02:00
services nixos/k3s: add initial k3s service 2020-04-17 16:39:54 +02:00
system Merge pull request #85004 from emilazy/add-initrd-secrets-path-assertion 2020-04-16 17:42:40 +03:00
tasks nixos/networking: move network-link-${i.name} to scripted networking 2020-04-13 22:03:35 +02:00
testing nixos/service-runner.nix: Allow quotes in commands + test 2020-02-28 14:26:29 +01:00
virtualisation Merge pull request #83930 from xtruder/nixos/virtualisation/hyperv-image 2020-04-14 03:27:22 +00:00
module-list.nix nixos/k3s: add initial k3s service 2020-04-17 16:39:54 +02:00
rename.nix nixos: fix module paths in rename.nix 2020-03-11 15:59:22 +01:00