Generates sandboxes for C/C++ libraries automatically
Go to file
Christian Blichmann 9c21744460 Revert memfd file sealing for embeded files
Ideally, we'd seal the embedded SAPI binary using fcntl(). However, in rare
cases, adding the file seals `F_SEAL_SEAL | F_SEAL_SHRINK | F_SEAL_GROW |
F_SEAL_WRITE` results in `EBUSY` errors.

This is likely because of an interaction of `SEAL_WRITE` with pending writes
to the mapped memory region (see `memfd_wait_for_pins()` in Linux'
`mm/memfd.c`). Since `fsync()` is a no-op on memfds, it doesn't help to
ameliorate the problem.

On systems where it is enabled, ksmd might also be a source of pending writes.

PiperOrigin-RevId: 385741435
Change-Id: I21bd6a9039be4b6298774e837ce3628180ed91a8
2021-07-20 02:29:21 -07:00
.bazelci Update BazelCI configuration to use Debian 10 2019-10-23 06:10:05 -07:00
.github/workflows Add more compiler variants to GitHub Actions 2021-04-07 15:23:23 +02:00
cmake Update third-party dependencies 2021-04-26 05:00:30 -07:00
contrib Add directories/README for contributions 2020-07-29 11:32:41 +02:00
oss-internship-2020 Merge pull request #82 from cblichmann:main 2021-01-26 08:18:57 -08:00
sandboxed_api Revert memfd file sealing for embeded files 2021-07-20 02:29:21 -07:00
.bazelignore Build fixes for recent Bazel versions 2020-09-25 07:25:31 -07:00
.bazelrc Update/simplify linker flags for testcases 2020-12-11 01:12:05 -08:00
.clang-format Update .clang-format to prefer & and * to be close to the type 2020-09-18 02:22:43 -07:00
.gitignore Make CMake superbuild behave more similar to FetchContent 2021-02-03 18:15:15 +01:00
.gitmodules Merge pull request #56 from alexelex:master 2020-12-08 03:15:35 -08:00
CMakeLists.txt Make CMake superbuild behave more similar to FetchContent 2021-02-03 18:15:15 +01:00
CONTRIBUTING.md Sandboxed API OSS release. 2019-03-18 19:00:48 +01:00
LICENSE Sandboxed API OSS release. 2019-03-18 19:00:48 +01:00
README.md Update/rephrase README 2021-02-02 03:08:31 -08:00
WORKSPACE Update dependencies to latest versions 2020-04-29 06:45:44 -07:00

Sandbox

Copyright 2019-2021 Google LLC.

Bazel build status CMake build status

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.