by dredmorbius · 9y ago · 0 comments
1. The package has only one maintainer.
2. The package requires heavy maintainer intervention.
3. Shit's on fire, yo.
All suggest that whatever it is that SELinux is meant to be a solution to, it's not a particularly good, or compelling, solution.
Stuff that needs custom wiring for every single package (and at last count Debian was in the 50-60k packages range, though a fair number of those are extra, source, and documentation packages) suggests ... issues.
Well, yes. Enforcing that surgeons wash their hands and wear protective clothing in the OR also isn't a compelling solution to surgeons, because it limits their response time. But the behaviour is forced upon them anyway (by either employment policy or insurance), because it is better for the patient. Selinux does the same thing: it requires security-aware behaviour from developers (by requiring the package to enumerate its expected behaviour beforehand) not out of convenience for the developer, but to improve the security for the user.
And that explains why Debian does not use it while Red Hat does: Red Hat can enforce selinux compliance by company policy, while Debian has to rely on every individual developer's judgement about the effort/benefit ratio. And just as with hygiene in medicine, the effort is internal while the benefit is external. That's why I said it would take a release goal (or general resolution) to effect that change in Debian.
Protective rules are not meant to be a compelling solution for those who have to abide by it. I don't see why we should expect selinux to be any different.
There's also this little thing that Debian has an order of magnitude more tools and programs included in its official repository, and two or three orders more packages. This alone pretty much explains why Debian cannot just put SELinux into use, while Red Hat somewhat can.
You hear it over and over again that blacklisting will always fail, and whitelisting is what needs to be done. Well, when you finally do go from default-allow to default-deny, you're going to have to fix every single package to keep things working.
Debian has accumulated a load of technical debt and has to pay all of it off before it can flip the switch on SELinux and see any benefit. It's understandable (if undesirable) that they feel that way. That doesn't invalidate the fact that they'll have to do the same for any whitelist.
What do you mean?
But the point is really - this is a distro issue and SELinux is a building block. If your distro is using SELinux and it's causing you no end of headaches consider that it may be your distro that's the problem...
Then expand to "negative" behavioral tests (from letting httpd write to /var/log/access.log to checking that it can't write to auth.log etc)?
Perhaps static analysis to see which library functions are linked in the package (require symbols in all binaries) and then having a set of default policies per-package based on those (including like you said, "this program never calls X, is not in category Y, therefore it doesn't need to be able to write to /path/to/Z" and so on)..
I dunno. Ideas