seccomp (Secure Computing Mode) is a Linux kernel facility, activated by the seccomp(2) syscall, that restricts which system calls a process may subsequently invoke. In its original SECCOMP_SET_MODE_STRICT form (2005) it was a blunt instrument: the process could call only read, write, _exit, and sigreturn. The operationally useful form is SECCOMP_SET_MODE_FILTER, introduced in kernel 3.5 (2012), which accepts a BPF (classic BPF, predating eBPF) filter program that receives each syscall’s number and arguments and returns one of several verdicts: ALLOW (continue normally), ERRNO (return a specified error to the process), KILL_PROCESS or KILL_THREAD (terminate immediately without giving the process a chance to handle signals), TRAP (deliver SIGSYS), or TRACE (notify a ptracer). Once installed, a seccomp filter cannot be removed, and child processes created by fork() or threads created by clone() inherit it. Filters may only add restrictions, never loosen them — so a chain of filters is the intersection of all their allowlists. The filter runs entirely in the kernel, in BPF bytecode verified for safety, before the syscall implementation is entered, making it extremely low-overhead relative to the security it provides.
A seccomp profile in practice is a list of permitted syscalls (an allowlist) rather than a denylist, because the Linux syscall surface is large and new dangerous syscalls are added with kernel releases. Container runtimes generate and apply seccomp profiles automatically: containerd, CRI-O, and Docker all ship a default seccomp profile — a curated allowlist of roughly 300 syscalls sufficient for the vast majority of containerised workloads — which blocks a targeted set of dangerous calls including kexec_load, ptrace, mount, unshare, setns, perf_event_open, bpf, userfaultfd, and the full set of privileged clock operations. Kubernetes 1.27+ enables RuntimeDefault seccomp by default in the Restricted PSA profile. Custom profiles are specified in the pod spec via securityContext.seccompProfile.type: Localhost with a node-local profile path, or distributed across nodes via the Security Profiles Operator (SPO), which manages seccomp (and AppArmor) profiles as Kubernetes CRDs and syncs them to nodes. The SPO can also run in recording mode: it attaches a BPF program to the pod’s syscall path, records every syscall the workload actually makes, and synthesises a minimal allowlist profile, dramatically reducing the effort of profile authoring for existing applications.
seccomp is complementary to and layered with the other Linux isolation mechanisms in this glossary. Namespaces restrict what a process can see; cgroups restrict what it can consume; LSM (AppArmor, SELinux) restricts what it can access based on MAC policy; seccomp restricts which kernel operations it can invoke at all — each layer addresses a different dimension of the attack surface. The interaction between seccomp and LSM is precisely ordered: seccomp runs before LSM hooks, so a syscall blocked by seccomp never reaches the LSM check. eBPF programs loaded via bpf(2) are themselves subject to the seccomp filter of the loading process — the default container seccomp profile blocks bpf() for this reason. In the context of Kata Containers and KubeVirt, seccomp is applied to the QEMU or virt-launcher host process, constraining the hypervisor’s own syscall surface to limit the damage from a QEMU vulnerability, independently of whatever seccomp profile the workload inside the VM uses.
