||FreeBSD Kernel Interfaces Manual
lightweight OS capability and sandbox framework
Capsicum is a lightweight OS capability and sandbox
framework implementing a hybrid capability system model.
Capsicum can be used for application and library
compartmentalisation, the decomposition of larger bodies of software into
isolated (sandboxed) components in order to implement security policies and
limit the impact of software vulnerabilities.
Capsicum provides two core kernel
- capability mode
- A process mode, entered by invoking
in which access to global OS namespaces (such as the file system and PID
namespaces) is restricted; only explicitly delegated rights, referenced by
memory mappings or file descriptors, may be used. Once set, the flag is
inherited by future children processes, and may not be cleared.
- Limit operations that can be called on file descriptors. For example, a
file descriptor returned by
may be refined using
so that only
can be called, but not
The complete list of the capability rights can be found in the
In some cases,
Capsicum requires use of
alternatives to traditional POSIX APIs in order to name objects using
capabilities rather than global namespaces:
- process descriptors
- File descriptors representing processes, allowing parent processes to
manage child processes without requiring access to the PID namespace;
described in greater detail in
- anonymous shared memory
- An extension to the POSIX shared memory API to support anonymous swap
objects associated with file descriptors; described in greater detail in
In some cases,
Capsicum limits the valid
values of some parameters to traditional APIs in order to restrict access to
- process IDs
- Processes can only act upon their own process ID with syscalls such as
Capsicum first appeared in FreeBSD
9.0, and was developed at the University of Cambridge.
Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.