-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
linux_*_hardened: use linux-hardened patch set #84522
Commits on Apr 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 10dd3f3 - Browse repository at this point
Copy the full SHA 10dd3f3View commit details -
linux: explicitly enable SYSVIPC
The linux-hardened patch set removes this default, probably because of its original focus on Android kernel hardening.
Configuration menu - View commit details
-
Copy full SHA for 3d01e80 - Browse repository at this point
Copy the full SHA 3d01e80View commit details -
linux_*_hardened: use linux-hardened patch set
This is an updated version of the former upstream, https://github.com/AndroidHardeningArchive/linux-hardened, and provides a minimal set of additional hardening patches on top of upstream. The patch already incorporates many of our hardened profile defaults, and releases are timely (Linux 5.5.15 and 5.6.2 were released on 2020-04-02; linux-hardened patches for them came out on 2020-04-03 and 2020-04-04 respectively).
Configuration menu - View commit details
-
Copy full SHA for 0d4f35e - Browse repository at this point
Copy the full SHA 0d4f35eView commit details -
linux_*_hardened: don't set X86_X32
As far as I can tell, this has never defaulted to on upstream, and our common kernel configuration doesn't turn it on, so the attack surface reduction here is somewhat homeopathic.
Configuration menu - View commit details
-
Copy full SHA for 7d5352d - Browse repository at this point
Copy the full SHA 7d5352dView commit details -
linux_*_hardened: don't set VMAP_STACK
This has been on by default upstream for as long as it's been an option.
Configuration menu - View commit details
-
Copy full SHA for 3d4c8ae - Browse repository at this point
Copy the full SHA 3d4c8aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8efe83c - Browse repository at this point
Copy the full SHA 8efe83cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c68055 - Browse repository at this point
Copy the full SHA 8c68055View commit details -
linux_*_hardened: don't set RANDOMIZE_{BASE,MEMORY}
These are on by default for x86 in upstream linux-5.6.2, and turned on for arm64 by anthraxx/linux-hardened@90f9670.
Configuration menu - View commit details
-
Copy full SHA for 130f681 - Browse repository at this point
Copy the full SHA 130f681View commit details -
Configuration menu - View commit details
-
Copy full SHA for db6b327 - Browse repository at this point
Copy the full SHA db6b327View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33b94e5 - Browse repository at this point
Copy the full SHA 33b94e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 303bb60 - Browse repository at this point
Copy the full SHA 303bb60View commit details -
linux_*_hardened: don't set {,IO_}STRICT_DEVMEM
STRICT_DEVMEM is on by default in upstream 5.6.2; IO_STRICT_DEVMEM is turned on by anthraxx/linux-hardened@103d23c. Note that anthraxx/linux-hardened@db1d27e disables DEVMEM by default, so this is only relevant if that default is overridden to turn it back on.
Configuration menu - View commit details
-
Copy full SHA for 0611462 - Browse repository at this point
Copy the full SHA 0611462View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3eeb524 - Browse repository at this point
Copy the full SHA 3eeb524View commit details -
linux_*_hardened: don't set HARDENED_USERCOPY_FALLBACK
Upstreamed in anthraxx/linux-hardened@c1fe7a6, anthraxx/linux-hardened@2c553a2.
Configuration menu - View commit details
-
Copy full SHA for 4fb796e - Browse repository at this point
Copy the full SHA 4fb796eView commit details -
linux_*_hardened: don't set SLAB_FREELIST_{RANDOM,HARDENED}
Upstreamed in anthraxx/linux-hardened@786126f, anthraxx/linux-hardened@44822eb.
Configuration menu - View commit details
-
Copy full SHA for 0d5f169 - Browse repository at this point
Copy the full SHA 0d5f169View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed89b5b - Browse repository at this point
Copy the full SHA ed89b5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7fdfe53 - Browse repository at this point
Copy the full SHA 7fdfe53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b32cd2 - Browse repository at this point
Copy the full SHA 3b32cd2View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf1bce6 - Browse repository at this point
Copy the full SHA cf1bce6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9da578a - Browse repository at this point
Copy the full SHA 9da578aView commit details -
nixos/hardened: don't set kernel.unprivileged_bpf_disabled
Upstreamed in anthraxx/linux-hardened@1a3e0c2.
Configuration menu - View commit details
-
Copy full SHA for 71bbd87 - Browse repository at this point
Copy the full SHA 71bbd87View commit details -
Configuration menu - View commit details
-
Copy full SHA for af4f57b - Browse repository at this point
Copy the full SHA af4f57bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 46d12cc - Browse repository at this point
Copy the full SHA 46d12ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for cc28d51 - Browse repository at this point
Copy the full SHA cc28d51View commit details -
nixos/hardened: don't set vm.unprivileged_userfaultfd
Upstreamed in anthraxx/linux-hardened@a712392.
Configuration menu - View commit details
-
Copy full SHA for 84f258b - Browse repository at this point
Copy the full SHA 84f258bView commit details -
nixos/hardened: enable user namespaces for root
linux-hardened sets kernel.unprivileged_userns_clone=0 by default; see anthraxx/linux-hardened@104f440. 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;
Configuration menu - View commit details
-
Copy full SHA for ad9bfe2 - Browse repository at this point
Copy the full SHA ad9bfe2View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0d5032 - Browse repository at this point
Copy the full SHA b0d5032View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe031d0 - Browse repository at this point
Copy the full SHA fe031d0View commit details -
nixos/release-{small,combined}: add latestKernel.login
Seems like a good idea to ensure that you can always use the latest stable upstream kernel.
Configuration menu - View commit details
-
Copy full SHA for e133e39 - Browse repository at this point
Copy the full SHA e133e39View commit details -
nixos/release-combined: add {,latestKernel.}hardened
These now depend on an external patch set; add them to the release tests to ensure that the build doesn't break silently as new kernel updates are merged.
Configuration menu - View commit details
-
Copy full SHA for 2e31fb4 - Browse repository at this point
Copy the full SHA 2e31fb4View commit details