Re:NsJail: A light-weight process isolation tool for Linux
by sushidev on Wednesday February 05, 2025 @03:27AM
(#42945646)
And jailer from firecracker and systemd itself which has some similar capabilities
Re:NsJail: A light-weight process isolation tool for Linux
by anonzzzies on Wednesday February 05, 2025 @04:57AM
(#42946335)
Me too, for me the ease of use is rather important. NSJail is very easy to use, I am not sure which ones I tried when looking for these tools but some of them were an absolute pain to get going.
Edit: funnily, chatgpt 03-mini tells me nsjail is the second hardest to use (first = systemd) of these...
Re:NsJail: A light-weight process isolation tool for Linux
by a-french-anon on Wednesday February 05, 2025 @05:36AM
(#42946620)
As a bubblewrap user, beware https://github.com/containers/bubblewrap/pull/586 still missing. The usual ^C doesn't work with your sandboxed stuff, very annoying.
A cursory look at NSjail tells me its filesystem stuff is less granular than bwrap's bind mounting.
Firejail can't handle : in some paths (at all, no escaping provided) which made me dump it.
Re:NsJail: A light-weight process isolation tool for Linux
by selendym on Wednesday February 05, 2025 @12:22PM
(#42951903)
> Firejail can't handle : in some paths (at all, no escaping provided) which made me dump it.
This doesn't match my experience. For example, the following works just fine in a profile file:
blacklist /sys/devices/pci0000:00/*
Can you give an example of what you had problems with?
Re:NsJail: A light-weight process isolation tool for Linux
by a-french-anon on Thursday February 06, 2025 @03:57AM
(#42960477)
Looks like this specific character got fixed. But still a lot of forbidden ones.
cf https://github.com/netblue30/firejail/issues/4614, https://github.com/netblue30/firejail/blob/master/src/fireja... and https://github.com/netblue30/firejail/blob/master/src/lib/co...
Re:NsJail: A light-weight process isolation tool for Linux
by yamrzou on Wednesday February 05, 2025 @05:46AM
(#42946696)
And pledge(): https://justine.lol/pledge/
Re:NsJail: A light-weight process isolation tool for Linux
by kennysoona on Wednesday February 05, 2025 @06:36AM
(#42947097)
pledge is the openbsd version of landlock, a pretty different category from the other namespace based solutions listed.
Re:NsJail: A light-weight process isolation tool for Linux
by bjackman on Wednesday February 05, 2025 @07:27AM
(#42947531)
It's still a reasonable comparison though. The seccomp-bpf is part of nsjail is achieving the same thing, one way to look at it is that Landlock/pledge are just a better implementation for the same approximate feature.
Re:NsJail: A light-weight process isolation tool for Linux
by kennysoona on Wednesday February 05, 2025 @07:30AM
(#42947560)
I don't really find it reasonable, landlock type functionality is a tiny subset of what namespace based sandboxing offers. It's like comparing a scanner to authenticate ID cards against a fortified house.
Re:NsJail: A light-weight process isolation tool for Linux
by bjackman on Wednesday February 05, 2025 @07:32AM
(#42947584)
Oh yeah I was just talking specifically about the seccomp-bpf bit. It's not comparable to nsjail as a whole.
Re:NsJail: A light-weight process isolation tool for Linux
by l0kod on Friday February 07, 2025 @05:20AM
(#42971137)
Namespace are very useful to build virtual environments, but I think it's important to keep in mind that they are not designed for sandboxing and don't provide security guarantees (e.g. mount point propagation), nor fine-grained access rights, nor security events (e.g. logs)... which might be OK according to use cases. Also, namespaces increase the attack surface of the kernel (e.g. vulnerabilities that can be reached through user namespaces). That being said, even if Landlock can control the most important filesystem access rights, not all of them are supported yet. New kernel releases bring new Landlock features (e.g. IPC, network control). It takes some time to build a new and safe access control system but we'll get there!
Re:NsJail: A light-weight process isolation tool for Linux
by beardedwizard on Wednesday February 05, 2025 @09:16AM
(#42948760)
One is not like the others - firejail is aimed at more of desktop type applications you interact with, where the others can do so but are more suited for arbitrary workloads.
A parent comment mentions ebpf syscall interception, many end up combining gvisor and nsjail and seccomp.
Re:NsJail: A light-weight process isolation tool for Linux
by pveierland on Wednesday February 05, 2025 @10:22AM
(#42949733)
Another interesting and modern alternative is Syd written in Rust.
- nsjail
- firejail
- bubblewrap
- runc
etc.