It might eventually be possible to relax this restriction and get rid of the SUID but I expect they would have to really clean up the kernel API, and that takes priority over fixing the userspace sandbox.
It might eventually be possible to relax this restriction and get rid of the SUID but I expect they would have to really clean up the kernel API, and that takes priority over fixing the userspace sandbox.
> Though I would love to hear if anyone has any other use cases where firejail really shines compared to the other similar tools to manage namespaces and seccomp.
It also supports sandboxing X11 and dbus. So in that sense it's more like flatpak than docker.
Doesn't this just require CAP_NET_ADMIN?
This was the best possible solution for a while, but things are getting better with Landlock introducing unprivileged sandboxing for file accesses. There are helper libraries in Go and Rust at https://github.com/landlock-lsm, and it's easy to play around with it with the landlock-restrict example tool:
$ go install github.com/landlock-lsm/go-landlock/cmd/landlock-restrict@latest
$ mkdir /tmp/lolcat
$ HOME=/tmp/lolcat landlock-restrict -ro /usr /lib /etc -rw /tmp/lolcat -- /bin/bash
The web browser I'm writing this from is sandboxed using the same example tool, so this works for bigger software as well. :) (Full disclosure, I'm the author of the go-landlock library.)I'm having high hopes that this'll get used by a lot of other sandboxing software as well. :) (If you run into issues, please file bug reports, I'm interested to hear about it.)
A lot of valid solutions are counterintuitive.
If the user account is compromised all valuable data (password, keys) is gone.
Gaining root is hardly useful to an attacker.
The devs patched it up super quickly, but I'm still a bit skeptical. It's probably still better than nothing...
systemd: yes, but firejail comes with friendly profiles for most applications
docker: not at all, it has a much higher attack surface
>Bubblewrap could be viewed as *setuid* implementation of a subset of user namespaces. Emphasis on subset [...]
Distros without user namespaces will probably still ship the SUID version though.