154
submitted 2 weeks ago* (last edited 2 weeks ago) by dan@literature.cafe to c/linuxmemes@lemmy.world
all 50 comments
sorted by: hot top new old
[-] HotsauceHurricane@lemmy.world 102 points 2 weeks ago

Selinux is both a pillar of security & a pain in my ass.

[-] GottaHaveFaith@fedia.io 78 points 2 weeks ago
[-] Sxan@piefed.zip 19 points 2 weeks ago

Without lubricant that is

[-] iusemybrain@sh.itjust.works 1 points 1 week ago

There's what in my ass now?

[-] FlexibleToast@lemmy.world 17 points 2 weeks ago

Yeah, that's how just about everything in security goes. I find policyd to be far more annoying.

[-] frankenswine@lemmy.world 7 points 2 weeks ago

is this the thread where we add "in the ass" to common knowledge?

[-] HotsauceHurricane@lemmy.world 4 points 2 weeks ago

Only of you want to. my comment is open source.

  • under MIT licence.
[-] RustyNova@lemmy.world 28 points 2 weeks ago
[-] slazer2au@lemmy.world 82 points 2 weeks ago

Because developers are bad at using it. How many times have you seen a installation instructions telling you to turn it off

[-] trojanbark@lemmy.world 18 points 2 weeks ago

More than once, now that I think about it

[-] comador@lemmy.world 47 points 2 weeks ago

selinux relies on the basis of deny all, allow only ideas. On paper that's fine, but when you are troubleshooting issues, installing software or developing applications, it can hinder productivity by preventing the user from doing things.

Selinux CAN work, but it absolutely requires a lot of time investment and maintenance to keep it working well with audit.d and general logging.

[-] SpaceNoodle@lemmy.world 16 points 2 weeks ago
[-] RickyRigatoni@piefed.zip 44 points 2 weeks ago

git: 'gud' is not a git command. See 'git --help'.

The most similar command is

    gui
[-] teslekova@lemmy.ml 9 points 2 weeks ago

I love this. First time seeing it.

[-] exu@feditown.com 14 points 2 weeks ago

I might get down voted for this, but I've honestly found LLMs pretty useful tools for debugging SELinux.

[-] LH0ezVT@sh.itjust.works 1 points 2 weeks ago

Ironically, SELinux might be a pretty good tool to keep LLMs from accidentally getting the answers to their benchmark

[-] nitrolife@hikki.team 10 points 2 weeks ago* (last edited 2 weeks ago)

selinux relies on the basis of deny all, allow only ideas

Only in enforced.

but when you are troubleshooting issues, ,

Just set setenforce 0 for this

installing software or developing applications

for this see policy log and create selinux policy with generator if developer was lazy

it can hinder productivity by preventing the user from doing things

Highter productivicy before someone still all your code (like binance)

[-] AVincentInSpace@pawb.social 9 points 2 weeks ago

So the correct way to use SELinux is to checks notes disable it

[-] Martineski@lemmy.dbzer0.com 4 points 2 weeks ago* (last edited 2 weeks ago)

I wish I could set up SELinux but NixOS doesn't support it... I already do something similar where all files on root are wiped by default (E: on each boot) and I have to opt things into persistence so it's definitely something that I'd like.

[-] FlexibleToast@lemmy.world 10 points 2 weeks ago

Because apparently people are stuck in the mindset of about 10 years ago when people used to get tripped up over it. SELinux is rarely ever a problem for anything these days. This post is dumb.

[-] jj4211@lemmy.world 8 points 2 weeks ago

While the stock policies have been refined to model more of an average user's usage, the facility itself remains a PITA when people do trip over it. File operations that mess up contexts, use cases that don't quite fit the policy, use cases that are well recognized but SELinux blocks it by default anyway until you change an sebool.

By being a security mechanism bolted on after the fact, various operations fail in ways that are mysterious because they can't inject explanatory information into the failure path. Further the audit log that you pretty much always need to consult when something fails for mysterious reasons in case it might be SELinux isn't even readable by the user that got dinged. So I can't even code in a way to check if SELinux was the reason and guide the user, instead I have to provide a diagnostic utility they have to 'sudo' to explain to them, or be vague and say 'check if selinux is somehow involved. So I end up despite doing my damndest to not run with privilege asking users to run something with privilege to check a security mechanism.

The existence and usage of audit2allow is a big sign of problematic design. How to fix something you see in auditlog is hard for people to understand, so they just audit2allow to amend policy, but instead they should have done a chcon because now they have a crap rule allowing something they shouldn't, but SELinux is still enabled so all good!

The whole label based concept is a fun whole other dimension of things for people to worry about. Messed up so often that we have a nice convenient 'restorecon' to basically apply the way AppArmor does things to the filesystem in that moment.

The curve could follow someone's journey with complexity, starting out with the prejudice that SELinux is bad, then letting SELinux happen and noticing no issues, and then moving on to realms where they actually have to touch the goop of SELinux instead of the canned distro SELinux setup covering their use case.

[-] Seralth@piefed.seralth.com 4 points 2 weeks ago

Over the last year I have done this entire. Went from app armor to SEL and now I'm back on app armor.

You couldn't pay me enough to try SEL again.

[-] jj4211@lemmy.world 2 points 2 weeks ago

Yeah, AppArmor is a lot more straightforward. I could buy an argument that technically the SELinux approach is more flexible, but it's hard to imagine someone needing that much flexibility in the general use case.

I can understand why something like Android could get more mileage out of SELinux' model, but most scenarios are very capably modeled by AppArmor approach and much easier and less fragile functionality wise.

[-] BlueKey@fedia.io 1 points 2 weeks ago

In some usecases SELinux is less flexible:

You have two applications installed which bring their own labels and rules, lets say app_a_t and app_b_t. Now you want to give AppA read access to only one specific directory of AppB data (which is labeled app_b_t).

How to do that? Writing a rule allowing acces between the labels would give AppA access to all of AppB data. Creating a new label for this specific dir would break AppB as it relies on the rules for app_b_t.

My biggest issue with SELinux is that files and applications can not have multiple types at once (like with a role based model).

[-] WhyJiffie@sh.itjust.works 1 points 2 weeks ago

Further the audit log that you pretty much always need to consult when something fails for mysterious reasons in case it might be SELinux isn't even readable by the user that got dinged. So I can't even code in a way to check if SELinux was the reason and guide the user, instead I have to provide a diagnostic utility they have to 'sudo' to explain to them, or be vague and say 'check if selinux is somehow involved. So I end up despite doing my damndest to not run with privilege asking users to run something with privilege to check a security mechanism.

fedora preinstalls a tool that warns users if they have tripped up in selinux, and provides dome details

alerts are shown to the user in desktop notifications, and there's a gui tool with some actions

[-] Seralth@piefed.seralth.com -2 points 2 weeks ago

It assumes the user is an idiot. And it assumes the user should not own their own device.

That is the core tenant of how it works.

Aka deny all base line.

[-] eleijeep@piefed.social 2 points 2 weeks ago
[-] WhyJiffie@sh.itjust.works 1 points 2 weeks ago

no, not really. you wouldn't be allowed to disable it then.

[-] gnuplusmatt@reddthat.com 18 points 2 weeks ago

Things can be 2 things

[-] halvar@lemy.lol 17 points 2 weeks ago

It's both. If you have a deployment where everything works and you didn't have to disable it or restrict it a lot then obviously it's very good to have. The problem is with reaching this state where everything works and selinux is also enabled.

[-] themaninblack@lemmy.world 4 points 2 weeks ago

Precisely. SE Linux is good for a handful of extremely strict environments

[-] massive_bereavement@fedia.io 15 points 2 weeks ago

Skill issue

[-] phoenixz@lemmy.ca 13 points 2 weeks ago

I'm. amuxh bigger fan of apparmor. Easier to configure, easier to debug, easier to fix, and as far as I know it gives the same level of security

[-] Turret3857@infosec.pub 9 points 2 weeks ago

android uses selinux and android is used as the base for one of the most secure OSes in the world.

[-] muusemuuse@sh.itjust.works 10 points 2 weeks ago

Android is not, and never was, secure. Selinux is a bandaid.

[-] possiblylinux127@lemmy.zip 1 points 2 weeks ago

SELinux is a critical part of the least privilege model of a Android system. It is why Android hasn't been impacted by almost all Linux CVEs. Unlike desktop Linux, Android was created after modern security threats were around. Overtime the system has been partitioned so that a compromise in ome area doesn't impact others. It isn't flawless but it does a pretty good job.

[-] AVincentInSpace@pawb.social 8 points 2 weeks ago

if you mean GrapheneOS, you can't not know that GrapheneOS's security is thanks almost in no part to SELinux

[-] khanh@lemmy.zip 5 points 2 weeks ago

selinux has, is, and will always be a fucking pain in the ass for us custom rommers

[-] possiblylinux127@lemmy.zip 5 points 2 weeks ago* (last edited 2 weeks ago)

Don't disable SELinux

It breaks the entire Android security model. Your device will become highly vulnerable as apps will have full access to everything. All it takes is a browser exploit and you are cooked.

[-] possiblylinux127@lemmy.zip 2 points 2 weeks ago

Android itself is pretty secure due to it being created after model security threats.

[-] SaltyIceteaMaker@lemmy.ml 8 points 2 weeks ago

i have never bothered learning what se linux even is

[-] esc@piefed.social 8 points 2 weeks ago

Selinux is the pillar of security.

[-] AcornTickler@sh.itjust.works 6 points 2 weeks ago

I am still near the middle πŸ‘€

[-] socsa@piefed.social 5 points 2 weeks ago

SELinux glows in the dark

[-] BlueKey@fedia.io 4 points 2 weeks ago

A hill to die on: AppAmor is better for most user setups.

[-] Seralth@piefed.seralth.com 4 points 2 weeks ago

I have come to the general understanding that unless you have a million dollars on the line and a million more dollars to give to one person to manage it.

Just use app armor

[-] korthrun@lemmy.sdf.org 4 points 2 weeks ago

Dealing with selinux policies makes me miss grsec and pax.

[-] possiblylinux127@lemmy.zip 3 points 2 weeks ago

SELinux is really important for security

this post was submitted on 03 Nov 2026
154 points (90.1% liked)

linuxmemes

33506 readers
1107 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry of any kind will not be tolerated. This is an LGBTQ+-friendly community -- if that is a problem for you, you should leave.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don't come looking for advice, this is not the right community.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves / tolerates / hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 3 years ago
    MODERATORS