commit | cb8674d56e3f148d867b17ee549c5d3e8f1d1bb5 | [log] [tgz] |
---|---|---|
author | Mike Frysinger <[email protected]> | Sun Aug 12 00:53:35 2018 -0400 |
committer | Treehugger Robot <[email protected]> | Mon Aug 27 21:00:21 2018 +0000 |
tree | f5efe29df4224d3c9b64017de0342e29fe00692d | |
parent | 3d98f3cdfd5ebca120c3088dca7344f6aba1f23f [diff] |
minijail0: change default mount flags with -k Lets change the default mount flags for -k to be more secure by default rather than require everyone to remember to specify these all the time. If people actually want dev+exec+suid, they can use an explicit 0 flag. This also updates the libminijail C API so that flags=0 is changed to secure defaults. This means there's not an easy way for the callers to actually get flags=0, but maybe that's a good thing. If they need that, they could hack around it with something like MS_SILENT, and we can wait for them to file a feature request. Bug: chromium:873216 Change-Id: Ia70b62cbb308eddfb58de3454fde3bfbac8e2f92
The Minijail homepage and main repo is https://android.googlesource.com/platform/external/minijail/.
There might be other copies floating around, but this is the official one!
Minijail is a sandboxing and containment tool used in Chrome OS and Android. It provides an executable that can be used to launch and sandbox other programs, and a library that can be used by code to sandbox itself.
You're one git clone
away from happiness.
$ git clone https://android.googlesource.com/platform/external/minijail $ cd minijail
Releases are tagged as linux-vXX
: https://android.googlesource.com/platform/external/minijail/+refs
See the HACKING.md document for more details.
See the RELEASE.md document for more details.
We've got a couple of contact points.
The following talk serves as a good introduction to Minijail and how it can be used.
The Chromium OS project has a comprehensive sandboxing document that is largely based on Minijail.
After you play with the simple examples below, you should check that out.
# id uid=0(root) gid=0(root) groups=0(root),128(pkcs11) # minijail0 -u jorgelo -g 5000 /usr/bin/id uid=72178(jorgelo) gid=5000(eng) groups=5000(eng)
# minijail0 -u jorgelo -c 3000 -- /bin/cat /proc/self/status Name: cat ... CapInh: 0000000000003000 CapPrm: 0000000000003000 CapEff: 0000000000003000 CapBnd: 0000000000003000