this post was submitted on 28 May 2026
39 points (95.3% liked)

Linux

65504 readers
440 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS
 

Title.

top 43 comments
sorted by: hot top controversial new old
  1. It's extraordinarily complex.

The reality is that security is not just technical implementation, but also actually getting people to use the solutions. "Stop disabling SELinux" is not a real answer to when people disable it, like we have one person in this thread.

Another problem with complex security solutions is they are hard to get right. Even if you enable them and configure them, without being an expert, it's possible you left a gap here or there, and holes and gaps in these solutions.*

  1. Like so many other complex linux security solutions, it is lacking effectiveness due to still sharing the same kernel.

There is a good, but bit dated writeup here about the problems with Linux security, from an architecturual perspective: https://madaidans-insecurities.github.io/linux.html . But, the short version is that the Linux kernel is large and complex, and has a lot of attack surface. And it's a frequent source of vulnerabilities because attackers can hit it as long as they access to the kernel, even if they are in a container/sandbox. Like, copyfail and dirtyfrag would punch through containers, but also punch through SELinux.

For example, just earlier on lemmy someone dropped a zero day that punches through SELinux: https://programming.dev/post/51103657

Now, SELinux can be used to restrict what a root shell could do after escalating... but that's further complexity you have to learn to configure, and configure it correctly as well.

Ultimately, none of the Linux security solutions come anywhere near the isolation of simply running something in a virtual machine. Which, also happens to be a lot simpler and actually possible to get people to use.

*(putting this at the bottom because it veers off topic) I have a greater argument and problem with mentalities like this. I have noticed a pattern, where many of the more effortfull and toil intensive security solutions are recommended by people who have the time, energy, and skills to execute them. They have a bias/blindspot to the realities, which is that not everyone is in the same situation as them.

For example, updating/patching software. Linux distros like RHEL or Debian, have a policy where they only do security updates, and don't do feature updates or bugfixes. This enables them to ship automatic updates, so that security issues are automatically handled.

On the other hand software like Windows, likes to bundle in breaking changes along with security updates. So automatic updates get disabled because "They might break something". And then, people don't update them, and environments get horrifically out of date, because not enough money/time/people is put into regular IT people who are in charge of maintaining them.

But some environments, have heroes, people who go around patching everything and keeping everything up to date and secure. And when they see these environments that don't have everything patched, they usually give the advice of "You should patch everything" (while simultaneously advising against auto updates), not understanding that these environments are lacking a key ingredient: Themselves.

Sure, I could be a hero. I could "patch" everything manually. I could deploy SELinux. But that would only last until I get burnt out, or leave. Once I'm gone, SELinux, the patches, any similar security solutions are gone. I've met so many people, even in cybersecurity, that are apathetic about security, even though they might have cared once upon a time.

[–] uuj8za@piefed.social 1 points 1 hour ago

It made it harder for me to install Guix.

[–] psycotica0@lemmy.ca 21 points 6 hours ago (1 children)

I've encountered it very little, but when I encounter it it's because I try to do something and it doesn't work. So I check the permissions with ls -l, and it all seems reasonable. Huh, this should work. Try again, nope. Hmm. 20 minutes of trying random variations, strange results. Oh fuck, is this SELinux? Shit. Where do those configs exist again? How do I configure that? Google "SELinux cheat sheet" hmmm, I don't have enough context to use that, Google "SELinux getting started". Read tutorial, try to skim just enough to figure out what's going wrong for me.

So I don't hate it, I just haven't ever had a use for it, but it has surprised me in a bad way before and cost me a lot of time and confusion, but I've never spent the time getting familiar because I've never had a use for it. And it comes up rarely enough I never remember anything about it by the time it bites me. I can't even recall now what I was trying to do the last time I bumped into it.

[–] corsicanguppy@lemmy.ca 3 points 3 hours ago* (last edited 3 hours ago)

Absolutely this.

33 years in Linux, 30+ professionally, Unix+Linux security background in a past life at a fucking distro.

When I first install a new distro version, I do something very simple; maybe I configure a simple web page, for instance.

Usually the web server refuses to start, or something equally "so dumb it should have been seen in early testing and doesn't even get to the challenge I set before it" stupid. If the distro can't test something so basic, then I know they're not prepared to consider selinux implications while maintaining or debugging the distro. I don't need to blaze a trail the distro can't be arsed to.

Then I mod away the config in my template and hope the distro can pull out their proverbial head in 5 years.

The easiest path needs to be the safest path

[–] atzanteol@sh.itjust.works 10 points 6 hours ago

It's awesome, but very complicated to use and overkill for most homegamer setups.

The first interaction most people have with it is when it stops something they want to do from working and it's not obvious why. Then the first selinux command they learn is how to disable it.

[–] mech@feddit.org 2 points 4 hours ago* (last edited 4 hours ago) (1 children)

I'm a sysadmin and I don't understand it, so I just set it to permissive so it doesn't interfere.
The machine is behind a firewall anyway so it's safe.

[–] boredsquirrel@slrpnk.net 2 points 1 hour ago (1 children)

Thats not exactly how this works, is it?

[–] mech@feddit.org 1 points 44 minutes ago

It is if you're a shitty sysadmin.

[–] Soot@hexbear.net 13 points 7 hours ago* (last edited 7 hours ago) (1 children)

Linux permissions are obvious, straightforward, and very easy to change - They rule.

SELinux permissions are impossible to see, seemingly pointlessly more complex, and I don't know how to check them or change them i.e. They drool.

As a power user who is constantly changing system stuff, installing weird stuff, running weird servers, disabling SELinux is like, step 2 of installing Linux for me (and honestly, even if you're not a power user, I can assure you at least ONE issue you've faced was actually caused by SELinux under the hood). I have wasted whole days working out just that SELinux is causing my fucking issue, and then days more on how to fix the permissions, and then days more doing those again when those permissions RESET as it is wont to do and days more trying to make my needed changes permanent. And let's not even get started on how to transplant an SELinux permissions structure from one disk to another. So instead of a week's worth of frustrating work every year, I can spend one minute disabling SELinux.

Its implementation feels contradictory to the most basic principles of understandable and workable systems. It's like the NSA wanted to make software that was the diametric opposite of the Zen of Python. It's ugly, it's implicit, it's complicated, nested, dense, unreadable, full of special cases, and silent errors, it constantly guesses in the face of ambiguity (which is why I have to constantly correct it).

Basically, I have wasted too much of my life faffing with an opaque and ludicrously complex permissions layer that seems to be there solely as a 'just in case' my already existing permissions aren't good enough.

[–] formlessoedon@lemmy.ml 2 points 4 hours ago

Honestly I am kind of afraid of Linux still. I hide inside Emacs. These eorts of tips are really helpful.

[–] chgxvjh@hexbear.net 1 points 4 hours ago

Always seemed way too enterprisy for my taste.

[–] ISolox@lemmy.world 5 points 6 hours ago

After switching between distros for 8+ years and settling on Fedora KDE, I don't think I've ever had SELinux get in my way for anything.

[–] fartsparkles@lemmy.world 14 points 10 hours ago

If you’re mandated or regulated to MLS or MAC etc, SELinux is a security control that enables you to comply through expanded and expressive policy controls.

When I hear dislike for it, it’s usually because people are using SELinux as a “make my personal computer safer” tool rather than the “we’ve hundreds of thousands of differently classified sensitive documents and thousands of employees with different clearances”.

MAC/DAC/MLS isn’t designed for personal computing and if you think SELinux is the solution you personally need, you might need to reevaluate your threat model (as any external actor will seek to bypass kernel controls entirely e.g. CVE-2025-0078).

[–] kureta@lemmy.ml 28 points 11 hours ago (2 children)

It's an unnecessary layer of complexity. I am the only user of my personal laptop. I don't need fine-grained permissions. Linux users and groups are enough for any permission needs I might have, like docker group, audio and video groups, etc. I don't have any "classified" documents on my computer. My home directory and root are on different disks. I can easily format and reinstall my system if something goes wrong and keep all my personal data.

[–] papercut@lemmy.ml 6 points 8 hours ago (2 children)

Having your home directory on a different disk is something that could've saved me a lot of headache. Can't believe I didn't think of that.

[–] caseyweederman@lemmy.ca 2 points 4 hours ago

I think it's becoming default on more and more Linux installers

[–] Soot@hexbear.net 4 points 7 hours ago* (last edited 7 hours ago)

In a lot of distros at least, you can just reinstall in place, which has the same effect. But a different place for /home does feel a potentially more reliable method.

[–] custard_swollower@lemmy.world 7 points 9 hours ago (2 children)

You don’t have classified documents, but you probably use bank in your browser running as your user. Maybe you use local mail program to send emails, also running as your user. A simple malware could add emails to be send asking your family to send you some money through online service.

And that’s easily done because the only isolation layer is user and group.

[–] nyan@sh.itjust.works 1 points 1 hour ago

Not everyone does online banking (I don't), and it's possible to warn your family about scams. If the information isn't there, you don't need to lock it down. Of course, that just moves both the security and the accompanying inconvenience off the computer and into the real world.

[–] kureta@lemmy.ml 0 points 5 hours ago (2 children)

I really don't see how anyone can install malware on my computer. I know my way around computers enough to not do anything dumb. Of course if someone wanted, they would be able to hack my device, probably. But I am not a high value target and it would be a waste of their time and effort. In short, that's a risk I am willing to take :)

[–] Neptr@lemmy.blahaj.zone 6 points 4 hours ago (1 children)

Plain and simple, with a supply chain attack.

[–] kureta@lemmy.ml 1 points 1 hour ago

Yes. That's fair. It's an actual, realistic threat. But personally, I don't provide any services to anyone and my data is periodically backed up to my NAS and cloud. But that's me. I can imagine other scenarios that would definitely require SELinux.

[–] Yoddel_Hickory@piefed.ca 6 points 4 hours ago (1 children)

So you think NONE of the software you use will ever get an exploit? "Not do anything dumb" only covers some threats, not all.

[–] kureta@lemmy.ml 1 points 1 hour ago

No. I mean why wouild anyone target me? I am behind my home router most of the time, without any exposed ports. I am not saying "SELinux is unnecessary". The post asked for my reasons to dislike.

[–] CallMeAl@piefed.zip 15 points 10 hours ago (1 children)

I no reasons for disliking it. SELinux is an incredibly powerful security tool.

[–] boredsquirrel@slrpnk.net 1 points 1 hour ago

Yo AI whats up?

[–] ChristchurchAsshole@lemmy.ml 5 points 8 hours ago

It's a pain in the ass when you want to run a web server on your PC. You have to disable SELINUX else the damn thing won't let me modify html pages and show the updates. Everything is just frozen from making any changes. That said, it's probably easier to do web development another way, my method is nearly two decades obsolete. SELINUX really pissed me off though. I wanted to test forum software on my PC once, and SELINUX was blocking me and I couldn't figure it out for ages.

[–] AcornTickler@sh.itjust.works 5 points 9 hours ago

Who said that? I really like it.

[–] fozid@feddit.uk 11 points 11 hours ago

I don't dislike it. I have no opinion on it. It's something I have never looked into heavily enough as it has never been a potential solution to a problem I may have encountered. There are no security or hardening areas that I currently class as gaps that need plugging in any of my systems where I would consider looking into selinux.

[–] dwt@feddit.org 5 points 9 hours ago

I Like the idea, But the Implantation ist complicated enough, that it Acts as a high Barrier to entry

[–] hendrik@palaver.p3x.de 10 points 11 hours ago

Uh. I guess people have random opinions and blast them on the internet. I can see how someone would misconfigure their computer and then blame it on the software. Or use software they don't need, which just adds unnecessary complexity and more issues. Other than that, I don't think there's anything wrong with SELinux.

[–] DanceMomsSavedMe@lemmy.zip -2 points 5 hours ago (1 children)

It was made by the NSA so that's already minus 5 points right there.

I'm not kidding. Look it up on DDG.

[–] zwekihoyy@lemmy.ml 5 points 2 hours ago (1 children)

the code is right there guy

[–] chgxvjh@hexbear.net 1 points 2 hours ago (1 children)

Have you read it? Do you trust it unread?

[–] Lemmert@reddthat.com 1 points 1 hour ago (1 children)

Don't tell you you actually read through the millions of lines of driver code in the Linux kernel

[–] chgxvjh@hexbear.net 1 points 1 hour ago

Some of it. I also don't assume that it's secure.

[–] Thordros@hexbear.net 3 points 10 hours ago

Why do people security- and privacy-focused people distrust NSALinux? Well boy howdy, that's a tough question that isn't answered by looking at the project's origins.

[–] juipeltje@lemmy.world -2 points 8 hours ago (1 children)

Never used it, but i think that's also because it doesn't work on distros without systemd. So i guess that's a reason to dislike it?

[–] atzanteol@sh.itjust.works 4 points 6 hours ago (1 children)
[–] juipeltje@lemmy.world 1 points 3 hours ago (2 children)

So it does work fully on distros without systemd? The distros i've tried so far either have no support or limited support, so i assumed it to have something to do with lack of systemd. They usually rely on apparmor instead.

[–] nyan@sh.itjust.works 2 points 1 hour ago

Gentoo doesn't indicate there would be any issue with installing SELinux on an OpenRC system, and I can't see anything anywhere that suggests the requirements differ by init system.

[–] atzanteol@sh.itjust.works 2 points 3 hours ago (1 children)

It's a kernel feature with some user-space utilities.

It also seems to be a "RedHat" thing primarily - Debian systems tend to prefer apparmor. You may have been noticing that instead?

[–] juipeltje@lemmy.world 1 points 46 minutes ago

That must be it then, in that case i was talking out of my ass lol. From what i remember Void linux doesn't mention selinux at all in the handbook. Now i'm using Guix and decided to check the documentation, they do support it but it has limitations it seems. Never bothered to look into selinux when i was still on systemd distros, so i mistakenly assumed it had something to do with that.