|
|
Log in / Subscribe / Register

How would file system being only writable or only executable work in practice?

How would file system being only writable or only executable work in practice?

Posted Nov 6, 2025 16:12 UTC (Thu) by raven667 (subscriber, #5198)
In reply to: How would file system being only writable or only executable work in practice? by gray_-_wolf
Parent article: A security model for systemd

> So, uh, how is this supposed to work in practice? I want to install program into /opt/PROG, using `make install'.

Clearly not like that.

This design is predicated on systems being shipped as full filesystem images with merged /usr so there is a clear separation between mutable /etc and /var and immutable /usr, so if you aren't familiar with these systems (like Fedora Silverblue or Bazzite) then maybe this seems insane to you. Someone else already pointed out the sysext and confext as a way to package overlay images to extend the base system and containers as a way to run arbitrary apps/services, so the `make install` would happen in a container build process and that's where you'd install your special thing. This is a different style of packaging and system management than the world of `/opt`, `/usr/local` and `make install` so you have to understand the worldview to understand the proposal.

I can never tell when a response like that which fails to consider that other parts of the system can be changed is bad faith (does the OP genuinely believe that 10,000 mounts is what is being proposed? or is that just an affectation for the sake of argument?) or a genuine misunderstanding of the proposal/possibilities.


to post comments

How would file system being only writable or only executable work in practice?

Posted Nov 6, 2025 17:09 UTC (Thu) by IanKelling (subscriber, #89418) [Link] (1 responses)

> Clearly not like that.
>
> This design is predicated on systems being shipped

I get it! Delegate every realistic security risk to be run on a different machine, then go give talks as if this gimped machine is the only one which exists and is super amazing and secure. (a bit of sarcasm here)

How would file system being only writable or only executable work in practice?

Posted Nov 6, 2025 22:22 UTC (Thu) by marcH (subscriber, #57642) [Link]

> I get it! Delegate every realistic security risk to be run on a different machine, then go give talks as if this gimped machine is the only one which exists and is super amazing and secure. (a bit of sarcasm here)

Maybe this has too many layers for me to understand the irony but yes: development systems are much less secure than production systems. That's why there's a lot of code reviews, testing, QA and other processes gating the latter from the former.

How would file system being only writable or only executable work in practice?

Posted Nov 6, 2025 17:16 UTC (Thu) by gray_-_wolf (subscriber, #131074) [Link] (3 responses)

> This is a different style of packaging and system management than the world of `/opt`, `/usr/local` and `make install` so you have to understand the worldview to understand the proposal.

Hm, sure. I can see this approach working just fine on my Steamdeck for example. However I am not sure how to incorporate it into a general purpose computing system (e.g., How do I even run `make check' if VPATH cannot be writable and executable at the same time?). It just seems extremely painful, so I was curious about how people actually use systems where everything is either writable or executable.

> does the OP genuinely believe that 10,000 mounts is what is being proposed

I do not believe it is specifically being proposed, no. I was -- in the spirit of "other parts of the system can be changed" -- just thinking about how to approach this in GNU Guix / NixOS, where each package is installed into a separate directory under /{gnu,nix}/store. Each package would likely require 1 or more mounts, so I was curious whether there is a practical limit under Linux.

How would file system being only writable or only executable work in practice?

Posted Nov 6, 2025 18:21 UTC (Thu) by NYKevin (subscriber, #129325) [Link]

For local development, of arbitrary projects, it will probably never be feasible to have a fully write-xor-execute filesystem. But we can get partway there:

* A lot of users are not interested in local development, and just want to install and run applications that somebody else wrote. They can ignore this problem.
* If we are doing local development and need a writable executable filesystem, we can at least narrow the scope of that to $HOME or possibly even something more specific like the project directory.
* If we are using something like Bazel, we may be able to go further and actually have a write-xor-execute filesystem, because Bazel already requires you to pervasively describe the inputs and outputs of all parts of the build process, and already uses build sandboxing to enforce correctness. So it knows exactly which files need to be "blessed" or transferred into some immutable-and-executable location, and it even knows when this "blessing" operation needs to happen for correct build sequencing. I'm not sure if it actually has the functionality to do this, but I imagine it can be added if it is not already there.

Disclaimer: I work for Google and use the internal equivalent of Bazel all the time, but I have not studied its sandboxing functionality in detail.

How would file system being only writable or only executable work in practice?

Posted Nov 7, 2025 5:47 UTC (Fri) by raven667 (subscriber, #5198) [Link]

> I can see this approach working just fine on my Steamdeck for example. However I am not sure how to incorporate it into a general purpose computing system

This style of system won't be appropriate for every kind of use case, but I think we should try and push this style of system to see how far it can go, because I think it can work for a lot of uses and can be much more reliable and simple to reason about. Only a fraction of computer use is developing binary software, most is editing data files which this kind of system design can already handle fully. Even development in languages which don't compile to binary executables would work fine.

For compiled binary software carving out a portal to a read+execute subdirectory accessible from a container, which may have a limited view of the system outside of its own runtime and the directory for development. Having read+execute access to a small part of the system in a controlled way is still a win when the rest of the system can't be compromised and the blast radius of any badness is small and manageable.

I've been using Silverblue for my day job (and just switched to Bazzite at home for my gaming system) and the immutable image-based systems are different, but not bad. It's nice to know that there is a solid base underneath my work that I can't accidentally crud up with changes and experiments I forgot making. Flatpak has been a joy (although a few nits to pick, slow startup time for simple apps is one), but I still target my development to RPMs on traditionally-managed servers, so I don't know how painful translating that to OCI containers would be, although I think building a container using traditional OS distribution packaging tools makes sense, those were developed in response to `make install` style system management and provide useful frameworks to manage that complexity.

How would file system being only writable or only executable work in practice?

Posted Nov 7, 2025 11:23 UTC (Fri) by farnz (subscriber, #17727) [Link]

One component of making this usable is exploiting containerization. You have a "project A developer container", which has a filesystem that's both writable and executable, and once "project A" is ready to deploy, you build a "project A production container" which is either writable or executable but not both.

Then, you deploy the production container (possibly on the same machine as the developer container) for normal use; you don't use the developer container except for development. This extra stage is overhead, but it reduces the attack surface, since the container you use in normal use (the production container) doesn't have a writable filesystem, and ideally has a more restrictive sandboxing policy applied than the developer container (which has to have fewer restrictions so that you can actually do work).


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds