-
-
Notifications
You must be signed in to change notification settings - Fork 68
Description
ChromeOS has a linux apps sandboxing solution called Crostini.
It lets the user launch untrusted code in a completly safe manner being sure it cannot reach the host OS.
It's mainly used to launch GUI apps that then integrate perfectly with the host OS as if they were native apps.
I think this kind of feature would be huge to have on desktop linux. Users could install apps as usual, have those apps behave like native apps on their desktop, while in the meantime being completly sandboxed in a memory safe VM.
Now, that's easier said than done given that Crostini is made to work with the whole ChromeOS software stack and cannot just run on our typical linux distros.
So here is what i've brainstormed: (It's far from a real plan yet)
So Crostini has many moving parts (see: https://www.chromium.org/chromium-os/developer-library/guides/containers/containers-and-vms/).
Crosvm
Crostini creates very tiny VMs that can boot incredibly fast and use very low amount of RAM using their own Virtual Machine Monitor called Crosvm, It's basically a simpler QEMU written in memory safe language so the attack surface is way smaller. (see: https://crosvm.dev/book/)
We could use Firecracker for the same effect, it's a fork of Crosvm from AWS that keeps the same advantages and is designed to run on typical linux distros.
Firecracker is already in the Fedora repos, so that's a plus.
NOTE : Even outside of this whole GUI app VM sandboxing idea, Firecracker could be something great to provide by default for users who want to make secure VMs on Secureblue.
Sommelier
Crostini uses Sommelier to integrate the Wayland apps running in the VM with the host OS seamlessly.
We could use X11Docker (Don't pay attention to the name, you can use it with Wayland and without Docker) to get the same effect.
Other
We could use Kata Containers, which makes VMs that acts like containers. (NOTE: this would also be great to have in general for containers in Secureblue, maybe would it also solve the current issues with containers and user namespace, or are these already solved ?) to make Firecracker and x11docker work together.
So we would have:
Kata Containers using Firecracker to run microVMs that boot very fast, have low memory footprint and are very secure thanks to memory safe language and small attack surface.
Those Kata containers VMs could be used with all the usual "containers" tooling.
x11docker being a container tool and being officially compatible with kata containers could then be used to run GUI apps in our microVMs/containers that would behave and feel like native/normal host OS GUI applications.
All of those are available already in the official Fedora repos, they would just need to be integrated together. Bringing them together, especially if the goal is to provide a completly automated process where users can just install an app from the store and all of that is configured automatically, would be a fairly big project and would probably require a dedicated repo.
I'm aware it's a bit(very) convoluted, but i think it's an idea worth thinking about. It would provide isolation similar to QubesOS (if implemented correctly) with all the usability and performances of a normal OS.
Also many of the ideas here can be used alone to make some other parts of the OS more secure. Kata Containers and Firecracker are very useful by themselve already.
Let me know what you think, i'm interested in what people pursuing similar goals regarding desktop computer security think about the idea.