Closed shibumi closed 1 year ago
This issue has been automatically marked as inactive because it has not had recent activity.
Dear friendly bot, it may be that just nobody ever answered from cncf, which is sad :smirk_cat:
Deepest apologies on not getting to this sooner. I've got this scheduled for discussion January 27th. @shibumi would you be willing to discuss? This looks related to the #501 discussion as well as some framework automation in #496
Should be more language agnostic, recommend inclusion into our security assessments. @JustinCappos @lumjjb potential for inclusion in automated pipeline checks
Hey @TheFoxAtWork sorry for the late reply. I am a very shy person, so take the issue more as an anonymous input/idea/suggestion for future discussions. It was meant as an idea for future binary distribution and as a possible way how to achieve this via having a look on how Arch Linux is doing this right now. Sorry :S
@shibumi - no reason to be sorry at all!! :) And thanks for the submission.
As this sits in my mind after the sig-security call, the idea's growing on me. If we could maybe do a guidelines doc for the top 3-4 CNCF languages (eg do these 10 things for golang), I bet that'd be super helpful to people...
This issue has been automatically marked as inactive because it has not had recent activity.
Annoyingly this bot forces us to bump threads yet again :cat:
This issue has been automatically marked as inactive because it has not had recent activity.
bump :)
Looks like this issue has a fleeting interest, we will keep it open for now, but I think the next stale cycle, we would have to put it into the suggestion archive.
@lumjjb Good decision. I guess, nobody likes a wall of bump messages :)
haha we also have too many issues and triaging becomes a bit of a pain so closing issues is becoming a bit more of a consideration now
This issue has been automatically marked as inactive because it has not had recent activity.
hey @shibumi and @anthraxx, I'd like to bring your suggestion back to life with a few modifications.
I understand the original goal sought to make compilation flags. That may not be achievable, given that every project makes its own technical choices. In that regard, the CNCF is, in a sense, a federation.
What is doable is we can have you formulate a recommendation targeted at all projects, which we can help publish and disseminate. In it, compelling arguments as to why applicable projects should follow it by presenting defensible arguments, including the tradeoffs. The first step would be to convert what you wrote in your original post into a document, and we can then merge that into this repo and then broadcast it in the CNCF mailer list and on cncf.io/blog.
If this is still something of interest to you, I'd be happy to see it through. Let me know what you think.
Closing this issue due to inactivity. Should you be interested in pursuing the idea down the line again with possibily broadening the audience to all foundations in The LF by aiming to publish the guidance LF-wide, feel free to comment/reopen the issue.
Description: What's your idea?
Quite a while ago, Arch Linux has turned on many binary security features via compilation flags (2016)1 or turned off options that are known to help exploit software (debugging symbols, RPATH). Now we have 2020 and Arch Linux made good experience with the additional security options.
I would like to suggest, that the CNCF considers making certain security related compilation flags default for every project.
We made good experience on Arch Linux with the following flags so far:
Some of these flags are known to have effects on performance. A 'call for assistance'8 in 2016 tried to measure these effects via running different operations with binaries that have above flags enabled. The project9 delivered good results10 and we decided to enable these flags.
For validating EFI binaries we use the tool checksec.sh. The follows snippet shows the example output of
check-sec --file=/usr/bin/kubectl
with kubectl version 1.19.2-1 on Arch Linux:We achieved a fully hardened kubectl binary via the following methods:
These flags are:
Explanation for each flag:
Our full Go package guidelines can be found in our Wiki12.
Impact: Describe your hopes for how this would reduce risk for the cloud native ecosystem. Who will this help? How will it help them?
The impact would be enhanced security for all compiled binaries. This approach would make it remote and local attackers more difficult to exploit known security vulnerabilities.
Scope: How much effort will this take? ok to provide a range of options if or "not yet determined"
I see the following challenges:
CGO_ENABLED=1
we will destroy our current static binary distribution process. However, the glibc is ABI stable, thus it should work for most linux distributions (except the linux distribution makes use of dietlibc or other libc implementations).Additional info:
1 https://lists.archlinux.org/pipermail/arch-dev-public/2016-October/028405.html 2 https://www.redhat.com/en/blog/hardening-elf-binaries-using-relocation-read-only-relro 3 https://en.wikipedia.org/wiki/Stack_buffer_overflow#Stack_canaries 4 https://en.wikipedia.org/wiki/NX_bit 5 https://en.wikipedia.org/wiki/Position-independent_code 6 https://en.wikipedia.org/wiki/Rpath 7 https://access.redhat.com/blogs/766093/posts/1976213 8 https://www.archlinux.org/news/test-sec-flags-call-for-assistance/ 9 https://github.com/pid1/test-sec-flags 10 https://github.com/pid1/test-sec-flags/wiki 11 https://github.com/slimm609/checksec.sh 12 https://wiki.archlinux.org/index.php/Go_package_guidelines#Flag_meaning