Skip to content

[release/2.2] seccomp: Use an allow-list for socket domains - #14249

Merged
samuelkarp merged 1 commit into
containerd:release/2.2from
k8s-infra-cherrypick-robot:cherry-pick-14245-to-release/2.2
Sep 29, 2026
Merged

samuelkarp merged 1 commit into
containerd:release/2.2from
k8s-infra-cherrypick-robot:cherry-pick-14245-to-release/2.2

Conversation

@k8s-infra-cherrypick-robot

@k8s-infra-cherrypick-robot k8s-infra-cherrypick-robot commented Sep 28, 2026 •

Copy link
Copy Markdown

This is an automated cherry-pick of #14245

/assign samuelkarp

Apply hardening to allowlist socket domains in the default seccomp profile

The default profile allowed socket(2) through open-ended range checks
around AF_ALG and AF_VSOCK. Any address family added to Linux later was
allowed automatically.

List the Linux address families the default profile supports and build
the socket rules from that list.

AF_ALG and AF_VSOCK stay blocked, and unknown or future domains now get
the default EPERM response.

A single rule cannot bound both ends of a range, because runc treats
repeated comparisons on one argument as OR.

The consecutive run starting at AF_UNIX therefore becomes one less-than
rule, which is safe because AF_UNSPEC cannot be created. Every other
domain gets its own equality rule.

This matches the same change in Moby's default seccomp profile.

Signed-off-by: Paweł Gronowski <[email protected]>
@samuelkarp
samuelkarp merged commit 12d39ca into containerd:release/2.2 Sep 29, 2026
88 of 90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants