News for hackers. Stuff that matters.
Re:SELinux is unmanageable; just turn it off if it gets in y... by lazyier on Wednesday April 27, 2022 @09:19AM (#31179496)
> The problem is not so much that selinux is too complicated (it is as complicated as it needs to be), but that we all run software we don't understand.

There are many many problems.

One of the biggest problem with SELinux is that it is trying to graft Mandatory Access Controls on a userland that is not designed for it.

Unix, frankly, is not designed for security. It is designed to get work done by writing a bunch of little buggy C programs that you string together in novel ways.

Security is something that was grafted on it. And it shows.

How many decades of security vulnerabilities have occurred because of a shared /tmp space? 40 years?

How do you graft access controls on a system designed with no access controls and potentially billions of combinations of programs, paths, and various other resources without breaking anything?

The answer is: You don't. You can't.

Were as you have a system designed for security, like Android, and literally hundreds of millions of fully SELinux-enabled fully locked down user-facing Linux devices are out there being used by people who haven't the faintest clue what "audit2allow" is and wouldn't understand it if you tried to explain it to them.

So it's less of an issue of "we all use software that we don't understand". SELinux is complicated enough that you can devote your life to trying to understand it and still fail to craft good rules for other people.

It's more of an issue of "Linux userland follows the basic Unix design from the 1970s which is kinda shit if your goal is security".

It is just bad design. Pure and simple. That is all there really is.

However there is a way out.

The way out is to give each process and each user their own little itty bitty special Unix environment where they can do whatever they want. And then you use strong divisions to keep them mostly unaware of each other. Use a default deny policy and only poke holes in it when required.

Re:SELinux is unmanageable; just turn it off if it gets in y... by freeopinion on Wednesday April 27, 2022 @09:58AM (#31179945)
My android phone came without a calculator app. I recently realized this in a setting where I needed a calculator. I commented out loud about the lack of calculator and got some responses from the group I was in at the time.

"Just download one from the app store," I was told. "But be prepared to grant it network access, file access, contacts access, camera access, and email privileges."

Re:SELinux is unmanageable; just turn it off if it gets in y... by lazyier on Wednesday April 27, 2022 @10:13AM (#31180129)
The alternative, which is Linux, is to grant your calculator app the permissions to read and write to the same resources that your browser uses to store the password for your bank.

Well "grant" is too strong of a word. "By default and there is nothing you can do about it unless you are exceptionally skilled" is more accurate.

Also your calculator app can read your sudo password as you type it, which you do a dozen times a day to carry out complex and security sensitive tasks such as "Connect to printer to print out mom's recipe for brownies" and "restart bluetooth because it's buggy and you want to listen to spotify on your wireless headphones".

Re:SELinux is unmanageable; just turn it off if it gets in y... by vaylian on Wednesday April 27, 2022 @11:09AM (#31180848)
> Also your calculator app can read your sudo password as you type it

True with X11. Fixed in Wayland.

Re:SELinux is unmanageable; just turn it off if it gets in y... by yyyk on Thursday April 28, 2022 @01:10AM (#31188968)
Wayland fixed one problem, but there's no shortage of local privilege escalation bugs with which the calculator can still read the sudo password.
Re:SELinux is unmanageable; just turn it off if it gets in y... by vaylian on Thursday April 28, 2022 @11:14AM (#31193481)
I want to learn more. Do you have some examples?
Re:SELinux is unmanageable; just turn it off if it gets in y... by yyyk on Thursday April 28, 2022 @02:04PM (#31195945)
Just yesterday, Microsoft found a few[0]. There's no shortage of these, but more important is the haphazard way fixes are backported to longterm (e.g. [1]). This reached the point that Google's security advice is 'always follow the latest kernel'[2], except most users and distros simply cannot afford it, so they are stuck with a vulnerable system.

Linux is not unique here. In the longterm, all the typical desktop OSs will need significant structural changes far beyond 'chase vulnerabilities and patch everything all the time'.

[0] https://www.theregister.com/2022/04/27/microsoft-linux-vulne...

[1] https://nvd.nist.gov/vuln/detail/CVE-2019-15902

[2] https://security.googleblog.com/2021/08/linux-kernel-securit...

Re:SELinux is unmanageable; just turn it off if it gets in y... by htkibar on Wednesday April 27, 2022 @01:32PM (#31183094)
Which is still not the standard - probably will take at least a decade before we can even talk about this issue being fixed.
Re:SELinux is unmanageable; just turn it off if it gets in y... by johnny22 on Wednesday April 27, 2022 @02:47PM (#31184134)
standard or not, it's already shipping by default in ubuntu and fedora except for when nvidia drivers are involved.

The problems will be worked out.. one way or the other.

Re:SELinux is unmanageable; just turn it off if it gets in y... by freeopinion on Wednesday April 27, 2022 @03:08PM (#31184395)
Oh, I agree. I'm just noting that access controls are useless in a culture that ignores them. I think that goes for the original topic of SELinux.
Re:SELinux is unmanageable; just turn it off if it gets in y... by dale_glass on Wednesday April 27, 2022 @10:22AM (#31180240)
That's really an app store problem.

Nothing says that Google couldn't prioritize applications that need the least permissions, or make it easy to filter by permissions, or even have an acceptance policy that said "A calculator app can't look into your contacts".

The system could favor the user in this regard, Google just doesn't want it to.

Re:SELinux is unmanageable; just turn it off if it gets in y... by BenjiWiebe on Wednesday April 27, 2022 @11:44PM (#31188505)
That is quite an exaggeration. My calculator app has requested 0 permissions. That's right, none.

Even though I use the calculator app from a famous ad company that loves gathering data - Google.

Re:SELinux is unmanageable; just turn it off if it gets in y... by afr0ck on Wednesday April 27, 2022 @11:17AM (#31180967)
a.k.a container.
Re:SELinux is unmanageable; just turn it off if it gets in y... by zamalek on Wednesday April 27, 2022 @01:35PM (#31183133)
You really shouldn't rely on containers for this, unfortunately.