Sandboxing

Sandboxing is a security mechanism for running untrusted code. The aim is to make a tightly-restricted, locked-down environment with minimal privileges, enforced by Operating System policies.

Inside the sandbox, access to sensitive resources - such as files, the network, devices, users or other processes - is restricted. This is a major part of the "defence in deptharrow-up-right" philosophy, where we accept that vulnerabilities can occur despite our best efforts and we limit the potential impact of such vulnerabilities as much as possible.

Linux

On Linux there are a handful of kernel-provided features. Chromiumarrow-up-right uses namespacesarrow-up-right and seccomp-bpfarrow-up-right.

Namespaces

To quote the man pages,

A namespace wraps a global system resource in an abstraction that makes it appear to the processes within the namespace that they have their own isolated instance of the global resource. Changes to the global resource are visible to other processes that are members of the namespace, but are invisible to other processes.

In effect, namespaces are kernel-provided and prevent anything in the namespace from accessing files, processes, networks, users or anything else outside the namespace. This stops processes inside the namespace from affecting anything outside the namespace.

seccomp-bpf

Seccomp filters system calls to only allow accepted ones, which has the effect of reducing attacker capabilities if they do get code execution.

Last updated

Was this helpful?