5 ms·
Daniel Micay who works on security with Arch Linux explains why GRSecurity hasn't been upstreamed here: http://article.gmane.org/gmane.comp.security.oss.general
by dmix 12y ago
Daniel Micay who works on security with Arch Linux explains why GRSecurity hasn't been upstreamed here:
http://article.gmane.org/gmane.comp.security.oss.general/15054 http://article.gmane.org/gmane.comp.security.oss.general/150...
And you can see Greg K H (a linux core dev) snarky reply here:
http://article.gmane.org/gmane.comp.security.oss.general/15056 http://article.gmane.org/gmane.comp.security.oss.general/150...
Basically a few people have tried in the past but Linux core devs are against large patches. And if you look at old threads [1] where people have attempted to break it up into small patches the core devs have been disinterested.
Just to be clear we're talking about many 2003-era exploit mitigation techniques not being adopted into the kernel. And as a side effect every year there are countless vulnerabilities that come out - for which proactive mitigations with up-to-date PoC's have existed for years.
Greg KH basically said in that thread that it would need to be broken up into tons of small patches. Then each patch will have to be submitted and go through the massive politics of getting it upstreamed. This would require a full-time paid team of people doing it, since Linux foundation or similar organizations don't seem to think it's worth paying for a team of security experts themselves to do similar work hardening the kernel.
Additionally, a long time ago (before grsec I believe) the person (or team) behind PaX, whose code is now a significant percentage of GRSecurity, is anonymous and the Linux core refused to accept patches from anonymous developers.
Also for a more meta-discussion on how security is handled by the core devs see Spenders summary here in "KASLR: An Exercise in Cargo Cult Security"
https://forums.grsecurity.net/viewtopic.php?f=7&t=3367 https://forums.grsecurity.net/viewtopic.php?f=7&t=3367
[1] Spender links to old threads here where people tried breaking it up and submitting small patches:
https://twitter.com/grsecurity/status/541797486479028225 https://twitter.com/grsecurity/status/541797486479028225
https://twitter.com/grsecurity/status/541797673419145217 https://twitter.com/grsecurity/status/541797673419145217
https://twitter.com/grsecurity/status/541797780482977792 https://twitter.com/grsecurity/status/541797780482977792
- mburns 12y ago"I'm glad to help out with this if you can point me at specific examples of things that should be changed." Doesn't sound the least bit snarky. Submitting small patches isn't unreasonable, and GRSecurity-inclined people would do well to play nice with the kernel dev process.
- deleted 12y ago[deleted]
- someengineer 12y agoTotally agree. His reply is an overly polite response to a rather snarky rant on why the Linux devs should just shut up and accept the author's massive merge. Giant projects like the Linux kernel just don't work that way.
- dmix 12y agoNo one in that thread is recommending the Linux devs take the monolithic GRSecurity patches flat out. If you read the originally linked thread Daniel explains why it can't be accepted this way nor does he propose it should. Rather attempts to submit it in smaller patches have been met with disinterest. As well as the fact security in general has the appearance of being sidelined by the core developers - which has created a large disincentive for developers interested in getting GRSecurity upstreamed from even trying (again).
- nodata 12y agoMaybe the grsec people should better communicate the advantage. I suggest taking each CVE and listing whether it would have been mitigated by running a grsec kernel, and compare it to something else (selinux or whatever)
- dmix 12y agoIf there is a kernel privilege escalation then SELinux can be disabled as Spender loves to demonstrate https://www.youtube.com/watch?v=WI0FXZUsLuI https://www.youtube.com/watch?v=WI0FXZUsLuI GRSec does includes it's own MAC system as an alternative to SELinux but that is only a small part. PaX/grsec is in a different class of mitigation. I don't really know any competitors besides other implementations of small subsets by different operating systems or hardware manufacturers. To your other point, I don't think anyone who has been following Linux security for any amount of time thinks that Spender or PaX are in need of proving themselves.
- click170 12y agoI think its entirely reasonable for Linux devs to not accept patches from anonymous developers. I value my privacy more than most. But when you are contributing code to a public project used all over the world by millions of people, you should at least be willing to identify yourself, or have very good reasons for not doing so. And that's before we get to the nontrivial copyright issues.
- dmix 12y agoEven if that is the case for whatever legal reason just because they don't accept patches from PaX directly doesn't mean they can't provide their own implementations. For example, PaX was the first person to implement ASLR for Linux... and that was adopted into the Linux Kernel many years later (as well as by Windows, OSX, and other BSDs). https://en.wikipedia.org/wiki/Address_space_layout_randomization#History https://en.wikipedia.org/wiki/Address_space_layout_randomiza...
- zaroth 12y agoI don't think anyone should have to identify themselves in order to contribute to open source, but I will grant you the copyright issues. The person or entity submitting the code should be irrelevant. Exacting code review and testing establish the code as trustworthy or compromised, not the identity of the author.
- pakled_engineer 12y agoDoes systemd even work w/patched grsec kernel? Last I heard Spender was considering writing a security module to get deep hooks into the kernel to handle systemd, so I assumed systemd killed off any hope of more grsec/pax patches making it upstream.
- deleted 12y ago[deleted]
- strcat 12y agoIt works fine with PaX / grsecurity.
- zanny 12y agoI've tried running the grsec kernel on Arch a few times, and I've never gotten it to boot once, it usually just panics immediately. In the same way openSSL was a base of nobody wanting to invest in covering your own ass, there is no interest in having a legitimately secure kernel the way grsec proposes, and even in Arch there are only a few people working on it and while it is in the official repos it really should be in the stock kernel if they wanted to send a message.
- richwhiteguy 12y agoI think the fact that these patches aren't incorporated into any mainline Linux distros -- while a lot of other useless stuff is (ie. systemd) -- says far more about the Linux mindset than the merits of GRSecurity (even if the GRSecurity implementation sucked horribly...FIX IT and then incorporate it! Sheesh!) What's different about OpenBSD is that the features like stack smash protection and W^X are in the base system, on all possible platforms (and a few that didn't seem possible at first!), always on, and there's no easy "off-switch", so crapplications HAVE to be improved in order to work. I can't prove this (and I doubt anyone could), but I suspect that OpenBSD has resulted in more improvements to programs commonly used on Linux than GRSecurity has. A lot of people like to say "OpenBSD doesn't matter because few uses it", if that's true, then I think it is safe to say that "GRSecurity matters even less". I don't think either statement is fair, but I would like to see the code protection tools of GRSecurity in Redhat and Debian and other major Linux distros and without an SELinux-style off-switch. See...the problem is, you can't implement code quality features if your code has poor quality. OpenBSD didn't embrace "tricks" like W^X or stack protection until AFTER they were pretty confident about the code in the base system. Auditing existing code is completely thankless work. You spend a lot of time, make a bunch of changes to the code base ... and no one notices a thing. You get far more praise making features like SELinux or GRSecurity that are not actually USED, and CAN'T be used until someone commits to making the code to be run suck a lot less.
- asveikau 12y agoI don't think these links speak well for the patches you are talking about. I see a number of instances where the patches are being rejected for legitimate quality issues. It is pointed out that for PowerPC one piece doesn't compile with -Werror, and a bunch of configuration ifdefs no longer build. For ptmx_fops it is pointed out that the old code is better encapsulated and more maintainable if the ops structure gets new members. I did not see this answered. A lot of the diffs insert the "const" keyword in kind of unusual and unconventional places without much explanation, and without looking too deeply I kind of doubt it's the only place it can go to achieve the desired effect. This seems to be confusing reviewers on the thread because they are unused to the pattern. (It's much less of a wtf to see the whole vtable declared const than the individual function pointers, for example.) Then to get all smug about it and call politics on people for doing a code review, rather than fix the patches or communicate their importance better... They could be doing good work but I don't think they come off well in these threads.
- peterwwillis 12y ago> Linux core devs are against large patches Really I think it comes down to territoriality. If there was no 'grsecurity' or 'PaX' name or team or whatever, and it was just a random dev submitting a simple feature, they would accept it. But when this other entity comes trying to improve upon their flawed system, suddenly ego gets involved. I don't mean to rag too hard on the core devs, but many of their decisions are based on gut instinct, which is very frequently misguided or wrong (heuristics are evolved for reacting quickly to emergencies, not making logical decisions). Grsec should have been introduced into the mainline years ago. The Linux kernel's security track record is embarrassing. https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=linux+kernel https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=linux+kerne...