|
|
Log in / Subscribe / Register

SELinux and containers are complementary

SELinux and containers are complementary

Posted Nov 7, 2025 9:13 UTC (Fri) by emmi3 (subscriber, #62443)
In reply to: SELinux and containers are complementary by Cyberax
Parent article: A security model for systemd

> So pretty much every complex Linux installation ends up with disabled SELinux, some vendors don't even bother with it.

I must object this claim. In my experience RedHat, CentOS and Fedora come with extensive and very usable SELinux policies.

None of our ~20 RH/COS servers has any of it disabled. Sure, if you deploy your own software, it takes some time to get everything right and it can at times be very frustrating to debug (especially if you forget about the 'dontaudit' thing). But in the end the docs are very good and we got every single service running and secured: Overleaf, Collabora, Dokuwiki, Openproject, NFS, Samba. SELinux is one of the main reasons why we choose RH/COS over Debian for our internet facing servers (the other being more stable Ceph support).

On the desktop I only had to fiddle once with SELinux on Fedora on our convertible laptop: After an upgrade the DE could not access the orientation/tilt sensor any more to rotate the screen as needed. This was easy to discover and fix.

But as always: YMMV. Using SELinux in unusual environments requires some work (possibly from an already overworked admin). But I still think it's worth it.


to post comments

SELinux and containers are complementary

Posted Nov 7, 2025 19:37 UTC (Fri) by marcH (subscriber, #57642) [Link] (1 responses)

> In my experience RedHat, CentOS and Fedora come with extensive and very usable SELinux policies. None of our ~20 RH/COS servers has any of it disabled.

Just "usable" or actually adding security? Has some corresponding penetration testing been performed, are the reports available somewhere? Is there any other evidence that threats were blocked? Are you reviewing all policy changes for errors, malicious or not? That must be a lot of work!

> Sure, if you deploy your own software, it takes some time to get everything right and it can at times be very frustrating to debug (especially if you forget about the 'dontaudit' thing).

Which means 100 times more work for your entire Linux distribution than for just your own apps. So do you know who did that huge amount of work, who maintains it and how and how much you can trust them? Don't get me wrong: you need to trust your Linux distribution anyway. But was SELinux really the best use of their limited security time?

> But in the end the docs are very good and we got every single service running and secured

SELinux: check!

Too bad security is not just a collection of checkboxes. It requires actually looking at what's behind the checkboxes. So how did your SELinux penetration testing go? What is your change review process? What is the ratio between the SELinux security value you get (hard to measure, I know) and the effort you put there and how does that ratio compare to other security measures you take?

SELinux and containers are complementary

Posted Nov 7, 2025 21:05 UTC (Fri) by ballombe (subscriber, #9523) [Link]

Now there is a library to adapt selinux policy...
<https://arstechnica.com/gadgets/2025/11/commercial-spywar...>

SELinux and containers are complementary

Posted Nov 7, 2025 21:29 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

> I must object this claim. In my experience RedHat, CentOS and Fedora come with extensive and very usable SELinux policies.

For the default installation. They also don't _always_ work, and then you're stuck debugging the label hell. So people just give up and disable SELinux.

I claim that at this point SELinux doesn't provide more in practice than just using namespaces (containers) after dropping extra privileges.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds