Skip to content

pkg/docker-engine: rpm: Ship SELinux policy denying AF_ALG sockets#449

Merged
vvoland merged 1 commit into
docker:mainfrom
thaJeztah:fix_alg
Jun 11, 2026
Merged

pkg/docker-engine: rpm: Ship SELinux policy denying AF_ALG sockets#449
vvoland merged 1 commit into
docker:mainfrom
thaJeztah:fix_alg

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

Ship a CIL policy module that denies AF_ALG socket creation for all container domains (container_t, spc_t). Like AppArmor, SELinux hooks into the kernel's security_socket_create() LSM callback, which fires regardless of whether the socket was created via socket(2) or the legacy socketcall(2) multiplexer. This blocks AF_ALG selectively without disrupting other socketcall usage by 32-bit binaries.

This complements the seccomp profile change in moby, which blocks socket(AF_ALG) but cannot filter socketcall arguments.

On SELinux-only systems (Fedora, RHEL, CentOS) where AppArmor is not available, this CIL module provides equivalent protection.

Load the module from %post when SELinux is enabled, warning but keeping installation non-fatal if semodule cannot load it. Remove the module on uninstall.

Ship a CIL policy module that denies AF_ALG socket creation for all
container domains (container_t, spc_t). Like AppArmor, SELinux hooks
into the kernel's security_socket_create() LSM callback, which fires
regardless of whether the socket was created via socket(2) or the
legacy socketcall(2) multiplexer. This blocks AF_ALG selectively
without disrupting other socketcall usage by 32-bit binaries.

This complements the seccomp profile change in moby, which blocks
socket(AF_ALG) but cannot filter socketcall arguments.

On SELinux-only systems (Fedora, RHEL, CentOS) where AppArmor is not
available, this CIL module provides equivalent protection.

Load the module from %post when SELinux is enabled, warning but keeping
installation non-fatal if semodule cannot load it. Remove the module on
uninstall.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah requested a review from a team as a code owner June 11, 2026 16:05
@vvoland vvoland merged commit d83c04a into docker:main Jun 11, 2026
138 checks passed
@thaJeztah thaJeztah deleted the fix_alg branch June 11, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants