# Mitigating CVE-2026-31431 (“Copy Fail”) in Docker Engine

[Docker](https://yomu.fyi/company/docker) · Paweł Gronowski · May 27, 2026

**Type:** Problem & solution

## Summary

CVE-2026-31431, dubbed Copy Fail, is a Linux kernel vulnerability in the AF\_ALG crypto subsystem that allows unprivileged users to perform controlled writes to the page cache. Because default Docker Engine profiles permitted AF\_ALG sockets, containers on unpatched host kernels could corrupt shared host page caches. Docker's initial mitigation in v29.4.2 blocked AF\_ALG sockets and the socketcall syscall via seccomp, but entirely blocking socketcall broke 32-bit binaries and Go runtimes. To resolve compatibility issues, Docker Engine v29.4.3 reverted the seccomp socketcall block and adopted Linux Security Modules to enforce socket restrictions. The updated release configures AppArmor and SELinux policies to block AF\_ALG creation across both direct and multiplexed syscall paths while retaining seccomp filtering for defense-in-depth.

## Context

CVE-2026-31431 (Copy Fail) is a Linux kernel privilege escalation flaw in the algif\_aead module of the AF\_ALG crypto subsystem affecting unpatched kernels since 2017. An unprivileged user with AF\_ALG socket access can perform controlled writes to the shared page cache, modifying readable files across the host and other containers. Because public disclosure occurred before many distributions released kernel patches, Docker Engine sought to mitigate exposure for default container configurations on vulnerable hosts.

## Approach / What changed

Docker Engine v29.4.2 initially blocked socket(AF\_ALG) and socketcall via seccomp, but blocking socketcall broke 32-bit workloads and Go runtimes using GOARCH=386. Docker Engine v29.4.3 reverted the socketcall seccomp deny and shifted enforcement to Linux Security Modules, adding deny network alg to the default AppArmor profile and providing a SELinux CIL policy module denying alg\_socket creation for container domains. The socket(AF\_ALG) seccomp filter was retained as defense-in-depth for direct socket syscalls.

## Takeaways

- Seccomp cannot selectively inspect or block address families inside the socketcall syscall because arguments are passed via userspace pointers that BPF cannot dereference.
- Linux Security Modules such as AppArmor and SELinux intercept socket creation at the security\_socket\_create callback, successfully blocking AF\_ALG across both direct socket and multiplexed socketcall entry points.
- While Docker Engine v29.4.3 mitigates containerized exploitation via LSM rules and seccomp, systems without an active LSM still leave the socketcall path unblocked unless host kernels are patched or crypto modules blacklisted.

**Tags:** [Docker](https://yomu.fyi/topic/docker)

[Read original post](https://www.docker.com/blog/mitigating-cve-2026-31431-copy-fail-in-docker-engine)
