From: Mike Frysinger <vapier@chromium.org>
To: Demi Marie Obenour <demiobenour@gmail.com>
Cc: minijail@chromium.org, Alyssa Ross <hi@alyssa.is>,
Spectrum OS Development <devel@spectrum-os.org>
Subject: Re: [minijail] Re: Can't get minijail0 working without bind-mounting /
Date: Mon, 24 Nov 2025 14:57:42 -0500 [thread overview]
Message-ID: <CAAbOSc=wYbqS-_q27B=3uo-T6E_dU8xF0G44Nz3Z80LV+7cGww@mail.gmail.com> (raw)
In-Reply-To: <74fe4492-b7c2-4424-ade4-db2b32c85ca5@gmail.com>
On Mon, Nov 24, 2025 at 1:57 PM Demi Marie Obenour wrote:
> On 11/23/25 01:38, Demi Marie Obenour wrote:
> > I'm trying to get minijail0 to work without bind-mounting /, and I'm
> > running into lots of problems. So far:
> >
> > - Unprivileged user namespaces fail due to -EPERM in a mount syscall.
those errors come from the kernel, not minijail. you prob want to
double check user namespaces constraints.
> > - Mounting a tmpfs over / always causes the program to be executed
> > to not be found.
what is the command line you are using exactly, and is the program
you're trying to run statically or dynamically linked ?
> > - `sudo ./minijail0.sh -v --profile=minimalistic-mountns /bin/ls`
> > works, but doesn't actually do any sandboxing as it bind-mounts `/`.
it sounds like you're conflating "empty filesystem" with "it's
sandboxed". sandboxing (namespaces / container technology) is
composed of a multitude of layers.
what you describe here is correct. check the set of mounts inside
that sandbox to see they're significantly reduced.
> > Are there examples of how to use minijail0 properly?
seems like you've already found some, and they're working correctly.
the website also links to more docs & practical examples.
https://google.github.io/minijail/
> > Alternatively,
> > can I use it purely for seccomp and Landlock, and use bubblewrap to
> > handle namespacing?
if the minijail config allows access to all the syscalls/privileges
that the program needs to set things up, then i don't see why not.
-mike
prev parent reply other threads:[~2025-11-24 19:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-23 6:38 Can't get minijail0 working without bind-mounting / Demi Marie Obenour
2025-11-23 18:21 ` Demi Marie Obenour
2025-11-24 19:57 ` Mike Frysinger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAbOSc=wYbqS-_q27B=3uo-T6E_dU8xF0G44Nz3Z80LV+7cGww@mail.gmail.com' \
--to=vapier@chromium.org \
--cc=demiobenour@gmail.com \
--cc=devel@spectrum-os.org \
--cc=hi@alyssa.is \
--cc=minijail@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).