---
title: "Mitigating CVE-2026-31431 (“Copy Fail”) in Docker Engine"
description: "CVE-2026-31431 (\"Copy Fail\") is a Linux kernel flaw in the AF_ALG algif_aead module."
url: "https://swe.quest/articles/mitigating-cve-2026-31431-copy-fail-in-docker-engine-74f4660a17411d93"
canonical: "https://www.docker.com/blog/mitigating-cve-2026-31431-copy-fail-in-docker-engine/"
source: "Docker"
published: "2026-05-27"
difficulty: "medium"
kind: "Incident"
reading_minutes: 6
tags: ["sandboxing","containers","linux","vulnerability-research"]
---

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

A post on [Docker](https://swe.quest/sources/docker.md), published 2026-05-27, 6 min read, Incident. Original: [https://www.docker.com/blog/mitigating-cve-2026-31431-copy-fail-in-docker-engine/](https://www.docker.com/blog/mitigating-cve-2026-31431-copy-fail-in-docker-engine/)

## Summary

CVE-2026-31431 ("Copy Fail") is a Linux kernel flaw in the AF\_ALG algif\_aead module. It lets any unprivileged process with an AF\_ALG socket write to the shared page cache, so a default container can corrupt files such as setuid binaries for the host and for other containers. Docker's first mitigation in v29.4.2 blocked socket(AF\_ALG) via seccomp and denied socketcall(2) outright, because BPF cannot inspect socketcall's pointer arguments. That broke networking for 32-bit glibc, Go GOARCH=386, Wine and SteamCMD workloads, and the int $0x80 path from amd64 could still reach socketcall anyway. Docker Engine v29.4.3 reverts the socketcall deny and blocks AF\_ALG at the LSM socket-creation hook through AppArmor and a SELinux CIL module, keeping the seccomp filter as defense-in-depth; patching the kernel remains the real fix.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)
- [Vulnerability research](https://swe.quest/tags/vulnerability-research.md) (Security)

## Prerequisites

- Linux syscalls ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- seccomp-BPF
- AppArmor or SELinux basics
- Docker container security profiles ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))

## Keywords

CVE-2026-31431, Copy Fail, AF\_ALG, Docker Engine, seccomp, socketcall, AppArmor, SELinux

## Related posts

- [From 732 bytes to nowhere: shutting down Copy Fail in production](https://swe.quest/articles/from-732-bytes-to-nowhere-shutting-down-copy-fail-in-production-8dac32664e09abe4.md): Together AI · 2026-04-30 · Medium · 4 min read · Vulnerability research, Linux, Multi-tenancy, Incidents & postmortems, Security
  Copy Fail (CVE-2026-31431) is a logic bug in the Linux kernel's algif\_aead AF\_ALG interface.
- [Docker Security Advisory: AuthZ Plugin Bypass Regression in Docker Engine](https://swe.quest/articles/docker-security-advisory-authz-plugin-bypass-regression-in-docker-engine-a88edacc9440d46e.md): Docker · 2024-07-23 · Medium · 3 min read · Containers, Identity & auth, Vulnerability research, Security
  Docker Engine v19.03 and later regressed on a 2018 authorization-plugin bypass (CVE-2024-41110): an API request with Content-Length set to 0 causes the daemon to forward the request to the AuthZ plugin without its body, so a plugin not set to deny by default may approve it and allow privilege escalation.
- [From Security Blocked to Prod Ready: ClickHouse on Docker Hardened Images](https://swe.quest/articles/from-security-blocked-to-prod-ready-clickhouse-on-docker-hardened-images-fbdddd6267212370.md): Docker · 2026-04-30 · Medium · 11 min read · Containers, Supply chain security, Kubernetes, Security
  Security scanners block the standard ClickHouse image because its Ubuntu 22.04 base ships unused packages carrying unpatched CVEs, such as wget (CVE-2021-31879) and tar.
- [Well, That Wasn't Fun: October 16 '26](https://swe.quest/articles/well-that-wasn-t-fun-october-16-26-83d1120fe160ef39.md): Fly.io · 2026-11-06 · Medium · 7 min read · Incidents & postmortems, Vulnerability research, Linux, Virtualization, Networking
  A Linux kernel bug in IPv4 checksum offload validation let a guest VM direct the host to write its computed checksum into an already-trusted IPv4 header field.
- [How We Found and Fixed a Filesystem Corruption Bug](https://swe.quest/articles/how-we-found-and-fixed-a-filesystem-corruption-bug-ec675d8c1746a0c9.md): Heroku Engineering · 2017-02-15 · Medium · 6 min read · Incidents & postmortems, Linux, Containers, Storage systems, Deployment
  A failed Cedar-14 stack image rollback caused Heroku's container tools to truncate and overwrite a disk image while it was still mounted read-only as dynos' root filesystem.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
