hardened-config: build with fortify source
commitdd170cd5df832a7f1d70aba69fee7c41d012b34a
authorJoachim Fasting <joachifm@fastmail.fm>
dateSat 16 Sep 2017, 00:20 (9 years ago)
parent9a763f8
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
106106# Use -fstack-protector-strong (gcc 4.9+) for best stack canary coverage.
107107CC_STACKPROTECTOR_REGULAR n
108108CC_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+''}
109114''