Performance impact
Performance impact
Posted Aug 5, 2022 1:28 UTC (Fri) by Cyberax (✭ supporter ✭, #52523)In reply to: Performance impact by cschaufler
Parent article: Security requirements for new kernel features
And it's pretty much used in these situations now. SELinux is useful if you are a giant corp with a huge development staff that is OK with torturing themselves by writing SELinux policies.
> Today the system that doesn't use security modules is an odd duck indeed.
Like, pretty much all classic desktops? I've yet to see a developer with "serious" LSMs like SELinux turned on.
I think, some serious soul-searching on the side of LSM developers is in order.
Posted Aug 5, 2022 8:47 UTC (Fri)
by Wol (subscriber, #4433)
[Link] (1 responses)
The OP said that Android comes with SELinux switched on.
I think you're forgetting that (a) your "classic desktop" is actually a niche use case for Linux, and (b) even then, all of the "big boys" - RH, Ubuntu, SUSE - probably do have SELinux switched on. It's just not that visible ...
My system is gentoo - of course I haven't enabled it. But as Linux goes, gentoo and stuff like that is very much the minority ...
Cheers,
Posted Aug 9, 2022 12:58 UTC (Tue)
by anton (subscriber, #25547)
[Link]
Posted Aug 5, 2022 9:03 UTC (Fri)
by mw_skieske (guest, #144003)
[Link] (1 responses)
Hi there!
Do you know every Fedora Desktop has, in fact SELinux in enforcing mode?
❯ getenforce
kind regards
People who don't do SELinux are just lazy.
Posted Aug 5, 2022 12:39 UTC (Fri)
by corbet (editor, #1)
[Link]
Posted Aug 5, 2022 13:33 UTC (Fri)
by pizza (subscriber, #46)
[Link]
Fedora and RHEL, at least, have SELinux on out of the box.
All but one of my Linux installations have SELinux enabled (the exception is a heavily-used snowflake shell server whose install predates this SELinux stuff), including my two daily-use desktops (and several others I am responsible for).
Additionally, nearly every Android device out there relies on SELinux to enforce app isolation.
Posted Aug 8, 2022 22:43 UTC (Mon)
by cschaufler (subscriber, #126555)
[Link] (10 responses)
Posted Aug 8, 2022 22:57 UTC (Mon)
by Cyberax (✭ supporter ✭, #52523)
[Link] (9 responses)
AppArmor in Ubuntu is a bit more sane, because it doesn't require crazy labelling and impenetrable policies.
> And there's every cloud provider
Not every. And I know how one large provider works internally (a couple of years outdated, but I doubt it has changed much).
Heck, here's what EC2 offers for their own supported in-house distribution:
> [ec2-user@ip-172-31-0-166 ~]$ getenforce
> When we search our souls it's not about whether we should do a better job of getting out of the way, it's about how we can provide more of the features developers are screaming for and still maintain performance.
How long did it take to build stackable LSMs? For a decade the inability to run multiple LSMs made anything but SELinux/AppArmor impractical.
Sorry. But right now LSMs are just an impediment that most people try to wave away so it won't bother them. Large companies like Google have time and money to invest in getting it into shape, sure. But that's a far cry from being a useful and productive feature. Unlike cgroups or namespaces that are widely accepted by developers.
Posted Aug 9, 2022 16:16 UTC (Tue)
by cschaufler (subscriber, #126555)
[Link] (7 responses)
Posted Aug 9, 2022 20:15 UTC (Tue)
by Cyberax (✭ supporter ✭, #52523)
[Link] (6 responses)
It's not that it's not useful, additional mitigations are great. It's that the amount of effort that needs to be expended to make use of SELinux is just not comparable with the amount of protection it provides. I long ago tried to make sense of policies and to create my own toy policies, but failed miserably. TOMOYO is rigorously undocumented and I haven't touched Smack because it doesn't even look in any way "simplified".
AppArmor is a bit better, since it at least doesn't require labelling across all of the filesystem which is nothing but security theater compared to just using paths. Its policies are also easier to understand.
One feature that I really personally would have liked is an ability to use LSMs to _grant_ permissions instead of taking them away.
Posted Aug 9, 2022 20:24 UTC (Tue)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Posted Aug 9, 2022 20:29 UTC (Tue)
by corbet (editor, #1)
[Link] (4 responses)
Posted Aug 10, 2022 21:39 UTC (Wed)
by cschaufler (subscriber, #126555)
[Link] (3 responses)
Posted Aug 11, 2022 0:09 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link] (2 responses)
Various systems (like IAM policies in AWS or ACLs in Windows) typically consider "Deny" to be a veto on any allowing ACLs/policies.
Posted Aug 11, 2022 17:50 UTC (Thu)
by cschaufler (subscriber, #126555)
[Link] (1 responses)
Posted Aug 11, 2022 18:50 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link]
That would actually help and make time investment into SELinux be worthwhile, as it will open up _new_ possibilities. Performance impact is another question, and it'd be interesting to see if removing the DAC entirely in favor of MAC would help.
Posted Aug 23, 2022 7:26 UTC (Tue)
by daenzer (subscriber, #7050)
[Link]
I've been working on the graphics stack (mostly between Mesa / mutter / Xwayland) as part of the Red Hat desktop group for 3 years. In this time, I've never had to disable SELinux on Fedora. AFAIK my colleagues are leaving it enabled as well.
There can sometimes be minor SELinux related issues when upgrading to a new beta release, but those are usually quickly fixed.
It seems to me what you think you know about this is hearsay and/or outdated.
Performance impact
Wol
All I could find says that Ubuntu does not have SELinux enabled by default. You apparently don't count Debian among the big boys, but it does not have SELinux enabled by default, either.
Performance impact
Performance impact
Enforcing
That last line could really have been done without; there is no need to insult people you disagree with on something like this. Please don't do that here.
Performance impact
Performance impact
Performance impact
Performance impact
> Disabled
Performance impact
Performance impact
Performance impact
It seems you have one point of agreement with Casey, anyway: at one point, at least, he too wanted authoritative hooks in the LSM subsystem.
Authoritative hooks
Authoritative hooks
Authoritative hooks
Authoritative hooks
Authoritative hooks
Performance impact