-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
ntp: hardening with Canary, PIE, Full RELRO and FORTIFY_SOURCE #7212
Conversation
arno01
commented
Apr 6, 2015
How are those changes going to affect platforms other than Linux? |
Yes, it doesn't have any check for the other platform :-/ feel free to fix or close it then. Supported platforms/known issues #7214 (comment) |
These changes shouldn't go in until they're fixed for non-Linux. But, doing this in every security-critical expression is quite unscalable anyway. What would be better is instead if there was a component of Ideally such a flag would actually be the default and you would have to flick them off for particular expressions (perhaps speed sensitive ones, GCC itself for example probably wouldn't need it and only be slowed down), but that's a huge discussion waiting to happen. |
Doesn't Gentoo's "hardened" profile enable those features globally through gcc's spec file? That seems like a feasible approach. Passing special flags to the build is hard because no two package accept additional flags through the same mechanism. Maybe we could use NIX_CLAGS to pass them, though. |
Right, I was thinking of NIX_CFLAGS via Either way, I think this is The Right Way to go for hardening these programs and in general hardening a larger portion of the NixOS installation quickly, because adding these flags into every expression will quickly become untenable, obviously. |
@thoughtpolice yeah, I've been thinking on the same global-wide switch actually. |
+1 to have those flags global and enabled by default for linux. I think we should have a discussion about each flag and the impact it has on compiled programs. |
thinking even further, we could have NixOS Hardened to pass the SCAP compliance checker (XCCDF+OVAL) |
There are a few dimensions to something like a 'Hardened NixOS':
This component addresses 1. We should really address all of them. I'll create a ticket for this as a sort of meta-issue, thanks. |
@thoughtpolice Thank you for the #7220 , it's pretty comprehensive ! :) I understand that there is a performance drop, but personally I'd place security over performance as a default. And folks who prefer performance can simply drop the security or find a compromise =) |
@arno01 can we close these PRs and have a more general discussion before we move forward? |
@domenkozar yes, of course. Thank you |
Closing in favor of #12895. |