Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into HEAD
- Loading branch information
Showing
150 changed files
with
8,826 additions
and
4,006 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# A profile with most (vanilla) hardening options enabled by default, | ||
# potentially at the cost of features and performance. | ||
|
||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
{ | ||
security.hideProcessInformation = mkDefault true; | ||
|
||
security.apparmor.enable = mkDefault true; | ||
|
||
# Restrict ptrace() usage to processes with a pre-defined relationship | ||
# (e.g., parent/child) | ||
boot.kernel.sysctl."kernel.yama.ptrace_scope" = mkOverride 500 1; | ||
|
||
# Prevent replacing the running kernel image w/o reboot | ||
boot.kernel.sysctl."kernel.kexec_load_disabled" = mkDefault true; | ||
|
||
# Restrict access to kernel ring buffer (information leaks) | ||
boot.kernel.sysctl."kernel.dmesg_restrict" = mkDefault true; | ||
|
||
# Hide kptrs even for processes with CAP_SYSLOG | ||
boot.kernel.sysctl."kernel.kptr_restrict" = mkOverride 500 2; | ||
|
||
# Unprivileged access to bpf() has been used for privilege escalation in | ||
# the past | ||
boot.kernel.sysctl."kernel.unprivileged_bpf_disabled" = mkDefault true; | ||
|
||
# Disable bpf() JIT (to eliminate spray attacks) | ||
boot.kernel.sysctl."net.core.bpf_jit_enable" = mkDefault false; | ||
|
||
# ... or at least apply some hardening to it | ||
boot.kernel.sysctl."net.core.bpf_jit_harden" = mkDefault true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.