3 ms·
A long time ago I had this (not very original) idea that software would be installed in /usr/bin and it would be mounted as a read-only file system. All other m
by kccqzy 2y ago
A long time ago I had this (not very original) idea that software would be installed in /usr/bin and it would be mounted as a read-only file system. All other mount points that aren't read only like /tmp or /home ignore execute bit for all files. These days I don't think that's much of an improvement. And the problem is not just JavaScript. Python apps can also just download new code from the server and execute them. You can even do it in bash.
The real problem is the fact that software that can be used locally needs to connect the vendor's server in the first place. The other real problem is that by and large desktop software is not sufficiently sandboxed and does not have effective security policy (like SELinux) to restrict their permission.
- ninkendo 2y agoIf an app has root (which it would need to write to /usr), then mount -o remount,rw /usr Can defeat that pretty trivially. Probably why nobody really bothers with it. /usr (and root access in general) is such a distraction from the real issue though, which is that all the stuff I care about is accessible under my account. My browser data, photos, etc etc… if a malicious app isn’t sandboxed and is running as me, it’s game over. Stopping it from writing to /usr (or other places outside my homedir) is basically meaningless.
- superkuh 2y agoSetting all the exectuable and lib files in an application's directory as immutable might work: chattr +i.