git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/hardened profile: disable legacy virtual syscalls

This eliminates a theoretical risk of ASLR bypass due to the fixed address mapping used by the legacy vsyscall mechanism. Modern glibc use vdso(7) instead so there is no loss of functionality, but some programs may fail to run in this configuration. Programs that fail to run because vsyscall has been disabled will be logged to dmesg. For background on virtual syscalls see https://lwn.net/Articles/446528/ Closes https://github.com/NixOS/nixpkgs/pull/25289

commit63433537ce3f52f9bc460961b2b73e40db027447 authorJoachim Fasting <joachifm@fastmail.fm> dateSat 29 Apr 2017, 17:27 (10 years ago) parentf1c7d5a
1 file changed+5
nixos/modules/profiles/hardened.nix+5
nixos/modules/profiles/hardened.nix+5
@@ -10,6 +10,11 @@ with lib;
1010
1111 security.apparmor.enable = mkDefault true;
1212
13+ boot.kernelParams = [
14+ # Disable legacy virtual syscalls
15+ "vsyscall=none"
16+ ];
17+
1318 # Restrict ptrace() usage to processes with a pre-defined relationship
1419 # (e.g., parent/child)
1520 boot.kernel.sysctl."kernel.yama.ptrace_scope" = mkOverride 500 1;