git.iko.soy/typeable/nixpkgs
on master help sign in
hardened-config: build with fortify source
dd170cdJoachim Fasting
pkgs/os-specific/linux/kernel/hardened-config.nix+5
@@ -106,4 +106,9 @@ INET_DIAG n # Has been used for heap based attacks in the past
106# Use -fstack-protector-strong (gcc 4.9+) for best stack canary coverage.
106# Use -fstack-protector-strong (gcc 4.9+) for best stack canary coverage.
107CC_STACKPROTECTOR_REGULAR n
107CC_STACKPROTECTOR_REGULAR n
108CC_STACKPROTECTOR_STRONG y
108CC_STACKPROTECTOR_STRONG y
109+
110+# Enable compile/run-time buffer overflow detection ala glibc's _FORTIFY_SOURCE
111+${optionalString (versionAtLeast version "4.13") ''
112+ FORTIFY_SOURCE y
113+''}
109''
114''