Skip to content

Commit e7ea570

Browse files
committed
docs: update seccomp documentation
Replace outdated TODO comment with updated information about runc's seccomp support. Signed-off-by: Osama Abdelkader <[email protected]>
1 parent 7d81b21 commit e7ea570

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

libcontainer/SPEC.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,26 @@ profile <profile_name> flags=(attach_disconnected,mediate_deleted) {
367367
}
368368
```
369369

370-
*TODO: seccomp work is being done to find a good default config*
370+
[seccomp](https://en.wikipedia.org/wiki/Seccomp) can be used to apply filters
371+
to the system calls used in a container. The set of filter expressions allows
372+
you to match against syscall numbers (automatically resolved from syscall
373+
names) and apply various comparison operators to syscall arguments.
374+
375+
When a filter rule matches, the associated action will occur (this could
376+
involve killing the process or thread, returning an errno value without
377+
executing the syscall, forwarding the request to a user-space agent to handle,
378+
emitting a log entry, or permitting the syscall to execute).
379+
380+
The primary use-case is to provide an explicit allow-list of syscalls for a
381+
container, to reduce the kernel API attack surface exposed the container.
382+
Historically, seccomp has protected containers against various kernel 0-day
383+
vulnerabilities, so a strong seccomp filter is highly recommended.
384+
385+
libcontainer does not currently provide a default filter, but higher-level
386+
runtimes tend to define their own filters for use with runc. Here is an example
387+
OCI seccomp profile (see
388+
[oci-runtime-seccomp](https://github.com/opencontainers/runtime-spec/blob/v1.2.1/config-linux.md#seccomp)
389+
for more information on how to write your own filters)
371390

372391
### Runtime and Init Process
373392

0 commit comments

Comments
 (0)