bb6ae1d4ab
1. In many cases, sandboxes need to allow /proc/stat and /proc/cpuinfo so that get_nprocs(3) will work; otherwise, per-CPU logic can't determine how many CPUs there are. Unfortunately, some of those sandboxes also disable namespaces. The solution is to provide two functions: AllowRestartableSequencesWithProcFiles(), which allows syscalls and files; and AllowRestartableSequences(), which allows syscalls only. Sandboxes should usually call the former; sandboxes that disable namespaces should instead call the latter and are responsible for allowing the files via the deprecated Fs mechanism. 2. Make the mmap(2) policy evaluate prot AND flags, not prot OR flags. 3. Order the code and the comments identically for better readability. PiperOrigin-RevId: 386414028 Change-Id: I016b1854ed1da9c9bcff7b351c5e0041093b8193 |
||
---|---|---|
.bazelci | ||
.github/workflows | ||
cmake | ||
contrib | ||
oss-internship-2020 | ||
sandboxed_api | ||
.bazelignore | ||
.bazelrc | ||
.clang-format | ||
.gitignore | ||
.gitmodules | ||
CMakeLists.txt | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
WORKSPACE |
Copyright 2019-2021 Google LLC.
What is Sandboxed API?
The Sandboxed API project (SAPI) makes sandboxing of C/C++ libraries less burdensome: after initial setup of security policies and generation of library interfaces, a stub API is generated, transparently forwarding calls using a custom RPC layer to the real library running inside a sandboxed environment.
Additionally, each SAPI library utilizes a tightly defined security policy, in contrast to the typical sandboxed project, where security policies must cover the total syscall/resource footprint of all its libraries.
Documentation
Developer documentation is available on the Google Developers site for Sandboxed API.
There is also a Getting Started guide.
Getting Involved
If you want to contribute, please read CONTRIBUTING.md and send us pull requests. You can also report bugs or file feature requests.
If you'd like to talk to the developers or get notified about major product updates, you may want to subscribe to our mailing list or sign up with this link.