Yesterday
[P2] KBI: the layout of struct prison (applies to D61328 as well) — sys/sys/jail.h:279
Wed, Dec 2
Tue, Dec 1
The enjail has some interesting ideas.
I have a use case where we need to run some command (cli) inside jail but jail doesn't package these CLIs for number of reasons (security is one of them). These CLIs are available on the host and it would be nice to do this:
jexec -m /mnt/oci_cli:/opt/oci_cli <jail> /opt/oci_cli/bin/lb_image_upgrade lb_v_1_0 lb_v_2_0
Sun, Nov 29
In D62026#1425442, @arrowd wrote:
I didn't look into details, but chances are you're inventing https://github.com/containers/bubblewrap
It'd be great to have our compatible implementation of bubblewrap instead of a completely new CLI utility.
I know at least one port that would benefit from the native bwrap.
I didn't look into details, but chances are you're inventing https://github.com/containers/bubblewrap
It'd be great to have our compatible implementation of bubblewrap instead of a completely new CLI utility.
I know at least one port that would benefit from the native bwrap.
Fri, Nov 27
rebase --onto nullfs_ephemeral HEAD~1
Thu, Nov 26
- [P3] Shared fd tables. After rfork() without RFFDG, the fd table is shared with a process outside the jail. The loop then marks that process's fds too. Fds it opens later reach the jailed process without the flag.
- [P1] Built on something main doesn't have. It uses D58079's td_dupfd mechanism. It doesn't apply (vfs_syscalls.c:1329) and has to be rebuilt on markj's nameidata path, for example by passing the original fd's f_flag up beside ni_filecaps.
- [P1] The check runs too late. It runs after vn_open_cred() and after fo_truncate(). So open("/dev/fd/N", O_RDWR|O_TRUNC) on a read-only fd empties the file first and only then fails with EACCES. O_RDONLY|O_TRUNC gets past the check completely, because O_TRUNC isn't recorded in f_flag.
- See also my comment in D58081.
- [P1] O_TRUNC gets around the check. OPENWRITE is set only when FWRITE is. So openat(fd, "", O_EMPTY_PATH|O_RDONLY|O_TRUNC) (or O_EXEC|O_TRUNC) passes. Jailed root then gets VWRITE and the file is truncated. With the summary's own jail.conf example, nobody can add hooks, but they can empty the file. Moving the check into vn_open_vnode(), where the open flags are known, would cover this and D58080 with one check.
- [P2] False EACCES on normal opens. The check doesn't test for an empty path. So openat(dfd, "sub/f", O_RDWR|O_EMPTY_PATH) fails, while the same call without O_EMPTY_PATH succeeds.
- [P3] The FD_RESOLVE_BENEATH text in fcntl(2) lists each of its restrictions. The new one should be added there.
rebase --onto nullfs_ephemeral HEAD~1
rebase --onto nullfs_ephemeral HEAD~1
I'd like to suggest having a lot of this discussion in arch@. This one review seems a bit obscure for the how it works parts of the discussion. There's a lot of detail that relies on a lot of new kernel features that should be hadhed out in front of a larger audience.
Wed, Nov 25
rebase --onto nullfs_ephemeral HEAD~1
My thought process was along the lines of ... what if a VPS-owner becomes disgruntled and drops creates /etc/defaults/vendor.conf with the following:
A generic comment: It is not clear to me what your target is for "enjail". You call it a sandbox. A sandbox is very strict in what it allows. "enjail" sounds to me more like a quick jailing solution, with the usual jail defaults. I wouldn't call it "enjail" if the purpose is a strict sandbox. The following review assumes the sandbox meaning. I would consider a sandbox feature a nice to have, and agree with Warner about having a wider discussion about it in e.g. arch@.
Update $Title$ and enjail.8 .Nd
This likely requires wider discussion and buy-in to be in base.
comments + rebase --onto nullfs_ephemeral HEAD~1
Use short form license header on enjail.8 (seuros)
Tue, Nov 24
Oct 8 2026
Thanks!
Oct 5 2026
I don't see you on the committer list - do you want me to commit this for you?
Looks good - please go ahead and commit.
ping
Oct 3 2026
Sep 29 2026
Sep 10 2026
Aug 28 2026
This change should merge cleanly to stable/15 - it would be nice to have this feature available in FreeBSD 15.2
Aug 26 2026
Looks good to me, although I haven't tested it yet.
Aug 24 2026
manpage changes looks good, should we Relnotes this?
- Update man page.
