This article explains a use case for /tmp which is likely also useful.
I found it interesting that they specifically mounted /var/tmp to /tmp to add the parameters, why doesnt Fedora do that?
This serverfault comment explained the other parameters well.
I think nosuid
is irrelevant when using noexec
?
With the right parameters in the /etc/fstab you can block a big malware attack surface. The core problem is, that the /home is not protected, any program can write to the same location where things get executed.
I think this could also block the use of --user
flatpaks, which I find problematic as they allow to install executable binaries without privileges.
But what are the results from this change?
~/.bashrc
,~/.zshrc
,~/.config/fish/...
~/.local/bin
~/Random/Location/for/Appimages
Would these all not work? A shell config script is an executable, right? So it would not be loaded anymore. The bashrc includes this:
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
Does this mean, if the mutable ~/.bashrc
cannot be loaded, the protected /etc/bashrc
is also not loaded?
Fish does not have something like that at all, everything it in the unprotected ~/.config
.
A place to put external things has to be there. Especially on Atomic, /usr/local/bin
is not accessible, so /var/usrlocal/bin
can be used.
What about Toolbox or Distrobox containers, these are in /var and would run, right?
For sure it will make testing software worse. And a lot of strange habits, like random install scripts, or… Appimages, would break.
But when using distro packages and flatpaks it should be no issue.
I see how nonexecutable, read, configfiles can still be an issue. And data theft is for sure still the biggest issue. But anyways I find the concept of nonexecutable unprotected locations very interesting. And the concept of how a Linux system is built (root is protected, users cannot access system, but the user data is unprotected) is pretty crazy.
Needing root access to do many of these installations is also a change. But this means more control, as currently anyone can run anything.