sandboxed-api/sandboxed_api/sandbox2
Christian Blichmann eb62bae167 Refactor stack trace handling
- Drop `delim` argument from the `GetStackTrace()` family of functions.
  We only ever used plain spaces.
- Use an `std::vector<std::string>` for the symbolized stack frames and
  adjust the unwind proto accordingly.

This change now prints each stack frame on its own line while skipping
duplicate ones:

```
I20200717 11:47:16.811381 3636246 monitor.cc:326] Stack trace: [
I20200717 11:47:16.811415 3636246 monitor.cc:337]   map:/lib/x86_64-linux-gnu/libc-2.30.so+0xceee7(0x7fb871602ee7)
I20200717 11:47:16.811420 3636246 monitor.cc:337]   Rot13File+0x130(0x55ed24615995)
I20200717 11:47:16.811424 3636246 monitor.cc:337]   ffi_call_unix64+0x55(0x55ed2461f2dd)
I20200717 11:47:16.811429 3636246 monitor.cc:337]   map:[stack]+0x1ec80(0x7ffee4257c80)
I20200717 11:47:16.811455 3636246 monitor.cc:339]   (last frame repeated 196 times)
I20200717 11:47:16.811460 3636246 monitor.cc:347] ]
```

PiperOrigin-RevId: 322089140
Change-Id: I05b0de2f4118fed90fe920c06bbd70ea0d1119e2
2020-07-20 00:24:40 -07:00
..
examples Mark zlib as found when using SAPI CMake build 2020-06-30 08:59:50 +02:00
network_proxy Cleanup calls to sapi::StatusOr<>::ValueOrDie() 2020-04-02 07:42:45 -07:00
testcases Migrate usage of StatusOr::operator bool to StautsOr::ok. 2020-07-07 00:14:07 -07:00
unwind Refactor stack trace handling 2020-07-20 00:24:40 -07:00
util First MVP of a LibTooling based SAPI header generator 2020-05-15 15:35:42 +02:00
bpfdisassembler.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
bpfdisassembler.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
buffer_test.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
buffer.cc Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
buffer.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
BUILD.bazel Extract ForkClient to a separate target 2020-07-17 04:54:54 -07:00
client.cc Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
client.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
CMakeLists.txt Extract ForkClient to a separate target 2020-07-17 04:54:54 -07:00
comms_test.cc Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
comms_test.proto Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
comms.cc Internal change 2020-06-18 03:19:01 -07:00
comms.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
executor.cc Extract ForkClient to a separate target 2020-07-17 04:54:54 -07:00
executor.h Extract ForkClient to a separate target 2020-07-17 04:54:54 -07:00
fork_client.cc Extract ForkClient to a separate target 2020-07-17 04:54:54 -07:00
fork_client.h Extract ForkClient to a separate target 2020-07-17 04:54:54 -07:00
forkingclient.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
forkingclient.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
forkserver_bin.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
forkserver_test.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
forkserver.cc Extract ForkClient to a separate target 2020-07-17 04:54:54 -07:00
forkserver.h Extract ForkClient to a separate target 2020-07-17 04:54:54 -07:00
forkserver.proto Internal change 2020-01-31 05:39:25 -08:00
global_forkclient.cc Extract ForkClient to a separate target 2020-07-17 04:54:54 -07:00
global_forkclient.h Extract ForkClient to a separate target 2020-07-17 04:54:54 -07:00
ipc_test.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
ipc.cc Now network proxy server supports IP filtering. API to policybuilder is added to make a list of allowed pairs of allowed IP, mask and port where mask and port are optional. 2020-02-20 07:45:44 -08:00
ipc.h Now network proxy server supports IP filtering. API to policybuilder is added to make a list of allowed pairs of allowed IP, mask and port where mask and port are optional. 2020-02-20 07:45:44 -08:00
limits_test.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
limits.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
logserver.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
logserver.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
logserver.proto Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
logsink.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
logsink.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
monitor.cc Refactor stack trace handling 2020-07-20 00:24:40 -07:00
monitor.h Now network proxy server supports IP filtering. API to policybuilder is added to make a list of allowed pairs of allowed IP, mask and port where mask and port are optional. 2020-02-20 07:45:44 -08:00
mounts_test.cc Cleanup calls to sapi::StatusOr<>::ValueOrDie() 2020-04-02 07:42:45 -07:00
mounts.cc Cleanup calls to sapi::StatusOr<>::ValueOrDie() 2020-04-02 07:42:45 -07:00
mounts.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
mounttree.proto Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
namespace_test.cc Cleanup calls to sapi::StatusOr<>::ValueOrDie() 2020-04-02 07:42:45 -07:00
namespace.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
namespace.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
notify_test.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
notify.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
policy_test.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
policy.cc Reduce dependencies on libcap 2020-07-01 08:23:46 -07:00
policy.h Reduce dependencies on libcap 2020-07-01 08:23:46 -07:00
policybuilder_test.cc Cleanup calls to sapi::StatusOr<>::ValueOrDie() 2020-04-02 07:42:45 -07:00
policybuilder.cc Fix AllowLlvmSanitizers for Msan. 2020-07-07 02:40:24 -07:00
policybuilder.h Add helper function for MADV_WIPEONFORK. 2020-04-30 00:08:55 -07:00
README.md Corrects typo in link 2019-10-07 02:36:35 -07:00
regs.cc Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
regs.h Replace sapi::Status with absl::Status 2020-02-27 09:24:12 -08:00
result.cc Refactor stack trace handling 2020-07-20 00:24:40 -07:00
result.h Refactor stack trace handling 2020-07-20 00:24:40 -07:00
sandbox2_test.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
sandbox2.cc Cleanup calls to sapi::StatusOr<>::ValueOrDie() 2020-04-02 07:42:45 -07:00
sandbox2.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
sanitizer_test.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
sanitizer.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
sanitizer.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
stack_trace_test.cc Refactor stack trace handling 2020-07-20 00:24:40 -07:00
stack_trace.cc Refactor stack trace handling 2020-07-20 00:24:40 -07:00
stack_trace.h Refactor stack trace handling 2020-07-20 00:24:40 -07:00
syscall_defs.cc Fix logging/display of syscall tables 2020-07-14 00:47:54 -07:00
syscall_defs.h Refactor syscall definitions to rely less on macros 2020-01-07 05:27:21 -08:00
syscall_test.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
syscall.cc Do not keep a reference to a temporary 2020-07-14 01:42:05 -07:00
syscall.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
testing.cc Move filewrapper to tools directory 2020-05-29 05:40:52 -07:00
testing.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
util_test.cc Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
util.cc Refactoring for internal change 2020-07-10 09:01:49 -07:00
util.h Update license header with recommended best practices 2020-01-17 05:05:29 -08:00
violation.proto Update license header with recommended best practices 2020-01-17 05:05:29 -08:00

Sandbox2

Sandbox2 is a C++ security sandbox for Linux which can be used to run untrusted programs or portions of programs in confined environments. The idea is that the runtime environment is so restricted that security bugs such as buffer overflows in the protected region cause no harm.

Documentation

Detailed developer documentation is available on the Google Developers site for Sandboxed API under Sandbox2.

There is also a Getting Started guide for Sandbox2.