-
Notifications
You must be signed in to change notification settings - Fork 349
Add hardening flags #148
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
Add hardening flags #148
Conversation
Use the same hardening flags as the Debian build to enable RELRO, stack protector and hardening. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
|
ping @tianon |
|
I get the "what" here loud and clear, but I think we're missing a lot of context on the "why" -- is there a problem that's caused by not enabling these? Some benefit to doing so? (My own awareness of hardening flags like this is that there are a lot of conflicting opinions about them both for and against.) More directly, is there any recommendation from upstream httpd to enable these? (We do try to stay as faithful to upstream as possible, so explicit "do this" recommendations from upstream usually make it much easier to determine whether we should include something.) |
|
Upstream httpd no longer distribute Linux binaries (just Windows and ahem Netware), so it is hard to get a sense of what they recommend. Their rpm spec file does include All Linux distros that ship There are not any significant use cases for disabling in production that I am aware of; there are some other C analysis tools that need it disabled for static analysis. The vast majority of all CVEs in all software are C memory errors, and it seems to be a bad idea to disable the few hardening mechanisms that exist at present. |
|
Ok, that's fair -- I think in that case I'd rather we invoke I think there's also some useful bits to link to in https://salsa.debian.org/apache-team/apache2/blob/master/debian/rules to help inform where our choices come from, so I'll be pushing a commit to adjust shortly so we can get this in. 👍 |
Also, add links to Debian's apache2 configure bits to make it clear why we add extra flags on top of this.
|
Ah shoot we've got an Alpine variant here too, and |
|
The Alpine build doesn't even include |
|
I am fairly sure that all these flags are defaults in Alpine, including |
|
Ok, well this is a net-positive for the Debian variants -- maybe we can find some documentation to point to for Alpine's defaults that show this is unnecessary? 😕 😞 |
Changes: - docker-library/httpd@338122b: Merge pull request docker-library/httpd#148 from justincormack/harden - docker-library/httpd@8da3138: Query hardening flags directly from Debian
|
Yes, Alpine looks file already, with stack canary, pie etc. |
…r Alpine This is a minor follow-up to #148.
Use the same hardening flags as the Debian build to enable RELRO,
stack protector and hardening.
Signed-off-by: Justin Cormack justin.cormack@docker.com