Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion libcontainer/SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,25 @@ profile <profile_name> flags=(attach_disconnected,mediate_deleted) {
}
```

*TODO: seccomp work is being done to find a good default config*
[seccomp](https://en.wikipedia.org/wiki/Seccomp) can be used to apply filters
to the system calls used in a container. The set of filter expressions allows
you to match against syscall numbers (automatically resolved from syscall
names) and apply various comparison operators to syscall arguments.

When a filter rule matches, the associated action will occur (this could
involve killing the process or thread, returning an errno value without
executing the syscall, forwarding the request to a user-space agent to handle,
emitting a log entry, or permitting the syscall to execute).

The primary use-case is to provide an explicit allow-list of syscalls for a
container, to reduce the kernel API attack surface exposed the container.
Historically, seccomp has protected containers against various kernel 0-day
vulnerabilities, so a strong seccomp filter is highly recommended.

libcontainer does not provide a default filter, but higher-level
runtimes tend to define their own filters for use with runc (see
[oci-runtime-seccomp](https://github.com/opencontainers/runtime-spec/blob/v1.2.1/config-linux.md#seccomp)
for more information on how to write your own filters)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing period


### Runtime and Init Process

Expand Down