
Go port of the Copy Fail PoC for CVE-2026-31431, a Linux kernel authencesn flaw enabling a 4-byte write into page cache via AF_ALG and splice. Includes multi-arch build pipeline and detailed technical documentation.
This repository provides a Go port of the public Copy Fail PoC and a reproducible build pipeline for multi architecture Linux binaries.
Copy Fail (CVE-2026-31431) is a Linux kernel logic flaw in authencesn that enables a deterministic 4 byte write into page cache data referenced through AF_ALG + splice().
Use this project only in environments where you are explicitly authorized to test. Do not run this PoC against systems you do not own or have written permission to assess.
If you want to test immediately without building from source, download a release binary and run it:
wget https://github.com/ErdemOzgen/copy-fail-cve-2026-31431/releases/download/v1.0.1/copy-fail-cve-2026-31431_linux_amd64
chmod +x copy-fail-cve-2026-31431_linux_amd64
./copy-fail-cve-2026-31431_linux_amd64
For other architectures, download the matching asset from the GitHub Releases page:
Build all Linux targets:
make clean build-linux
Build and generate checksums:
make clean checksums
Output binaries in dist/:
copy-fail-cve-2026-31431_linux_amd64copy-fail-cve-2026-31431_linux_arm64copy-fail-cve-2026-31431_linux_386copy-fail-cve-2026-31431_linux_armv7SHA256SUMSDefault run:
./copy-fail-cve-2026-31431_linux_amd64
Use a custom target path:
./copy-fail-cve-2026-31431_linux_amd64 -target /path/to/binary
Disable post run su execution:
./copy-fail-cve-2026-31431_linux_amd64 -spawn-su=false
Print build metadata:
./copy-fail-cve-2026-31431_linux_amd64 -version
If execution fails at offset 0 with an error similar to:
error: copy chunk at offset 0: splice(pipe->AF_ALG): software caused connection abort
the kernel most likely rejected the vulnerable AEAD in-place path (for example because the host is patched for CVE-2026-31431 or algif_aead is mitigated/disabled).
Quick checks:
uname -r
grep -E "algif_aead|authencesn" /proc/modules
On remediated systems, this PoC is expected to fail.
According to the public disclosure, the vulnerable path allows an unprivileged local user to influence a 4 byte write primitive into page cache content of readable files under specific conditions.
The important operational property is that the in memory page cache copy can diverge from on disk bytes during runtime, which can make impact analysis not trivial for teams relying only on disk level integrity checks.
Copy Fail is notable because it was reported as:
At a high level, the issue sits at the intersection of three mechanics:
AF_ALG AEAD request handling.splice() page cache backed data movement.authencesn decryption scratch behavior.In the vulnerable design, page cache backed segments can be linked into a request shape that later receives writes during algorithm processing, violating a key assumption that only intended destination regions are modified.
In the documented path, authencesn uses destination side scratch operations around ESN layout handling and performs a write at an offset beyond the expected decrypt output contract.
When combined with the in place AEAD setup and chained scatterlist references, this write can land in page cache backed memory for attacker selected regions.
The disclosure describes a multi commit evolution:
authencesn behavior originated in earlier integration history.AF_ALG AEAD support introduced userspace reachability with splice() interaction.algif_aead combined source and destination flow in a way that made this intersection exploitable.The key lesson is compositional risk: individually reasonable changes can become unsafe in combination.
The public write up and PoC describe this sequence:
AF_ALG AEAD socket for authencesn(hmac(sha256),cbc(aes)).splice() to route page cache backed file data through the request path.This repository's Go implementation mirrors that public PoC logic for research and validation in authorized environments.
The reported fix reverts vulnerable in place AEAD operation in algif_aead to out of place behavior.
Conceptually:
AF_ALG usage where operationally feasible).Based on the public write up:
| Date | Event |
|---|---|
| 2026-03-23 | Report submitted to Linux kernel security team |
| 2026-03-24 | Initial acknowledgment |
| 2026-03-25 | Patch discussion/review |
| 2026-04-01 | Fix committed to mainline |
| 2026-04-22 | CVE-2026-31431 assigned |
| 2026-04-29 | Public disclosure |
The published research credits human guided, AI assisted subsystem analysis focused on userspace reachable crypto code paths and scatterlist/page provenance under splice().
main.go: Go PoC port.Makefile: deterministic multi arch Linux build targets..github/workflows/build.yml: CI build and release artifact workflow.Workflow file: .github/workflows/build.yml
Triggers:
mainv*workflow_dispatchBehavior:
make clean checksums.v*.Suggested release flow:
git tag v1.0.0
git push origin v1.0.0
| Distribution | Kernel Version |
|---|---|
| Ubuntu 24.04 LTS | 6.17.0-1007-aws |
| Amazon Linux 2023 | 6.18.8-9.213.amzn2023 |
| RHEL 10.1 | 6.12.0-124.45.1.el10_1 |
| SUSE 16 | 6.12.0-160000.9-default |