mirror of
https://github.com/containerd/containerd.git
synced 2026-11-06 05:17:02 +00:00
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 <pawel.gronowski@docker.com>