logoalt Hacker News

mike_hearntoday at 4:56 PM5 repliesview on HN

Linux isn't like macOS, it doesn't have any kind of proper desktop sandboxing architecture that really works. So this is kind of security theatre. If you run a malicious program it can do stuff like tamper with your PATH or exploit local vulns in apps to get to the point where it can control anything that matters (which root generally doesn't). For instance it can just drop a custom shell into ~/.bin/.hidden-shell and reconfigure the terminal emulator to run it.

So this kind of "vulnerability" doesn't seem that important. If you run code as yourself on Linux it owns you.

On macOS it's very different. Pervasive code signing gives all apps a stable identity enforced by the kernel that they can't easily escape. The kernel can then impose sandboxing policies on any app that's run regardless of how it's installed, for instance, preventing apps from rummaging through ~/Documents or monitoring your screen. Permissions are editable and guaranteed to stick, including across upgrades. And root is disempowered so obtaining it barely matters, it's only really there for UNIX compatibility.

Unfortunately implementing an Apple style architecture on Linux would be very difficult.


Replies

Cloudeftoday at 5:57 PM

Its opposite. Windows and MacOS lacks proper sandboxing. While openbsd has pinsyscalls and linux has seccomp-bpf. Windows and MacOS only have filesystem and worse version of user namespace sandboxes, anything else and you need to write a kernel extension or rely on a hypervisor.

> Unfortunately implementing an Apple style architecture on Linux would be very difficult.

The apple apps kind of thing already exists and its called flatpak.

show 2 replies
Retr0idtoday at 4:59 PM

> Unfortunately implementing an Apple style architecture on Linux would be very difficult.

On desktop Linux as we know it, yes, but Android manages it alright, mostly via SELinux+seccomp.

show 1 reply
lrvicktoday at 6:03 PM

> Linux isn't like macOS, it doesn't have any kind of proper desktop sandboxing architecture that really works.

As a QubesOS user, I beg to differ. Just because most Linux distros are negligent with sandboxing does not mean all of them are.

show 1 reply
amlutotoday at 5:01 PM

> Linux isn't like macOS, it doesn't have any kind of proper desktop sandboxing architecture that really works.

I’m sorry, what? MacOS’s desktop sandboxing is pathetic. Sure, it kind of sort of tries to prevent an application from rummaging until you give it permission. And that permission is hilariously coarse grained, and it gets regularly broken anyway. (Seriously, read about TCC breaks. They’re not little implementation errors — they’re giant gaping holes in the whole concept.) The entitlement mechanism basically serves to help Apple restrict what developers can do without meaningful protecting Apple’s users.

If you think that it protects you when your Mac prompts to ask whether Terminal.app may access Documents, you are welcome to enjoy your warm fuzzy feelings.

> Unfortunately implementing an Apple style architecture on Linux would be very difficult.

Why would it be difficult? I think that mostly it would reveal to whomever implemented it how useless it is.

If you mean sandbox-exec, you can do this on Linux, too. And the Linux mechanisms are not considered deprecated and undocumented, whereas Apple steadfastly refuses admit that sandbox-exec is a real mechanism.

show 2 replies
bigyabaitoday at 4:58 PM

> it doesn't have any kind of proper desktop sandboxing architecture that really works.

Bubblewrap works.

show 2 replies