
Copy Fail 🐧
Researchers have discovered a bug in the Linux kernel that has existed since 2017 and affects nearly all distributions.
The vulnerability, which we consider trending, consists of four steps:
1️⃣ A user opens an AF_ALG socket and initializes an AEAD algorithm without privileges;
2️⃣ Using splice(), pages from the target file’s cache are placed into the operation buffer;
3️⃣ A flaw in authencesn allows writing 4 bytes out of bounds directly into the cache pages;
4️⃣ The kernel executes a modified setuid file from the cache → resulting in code execution with root privileges.
This vulnerability chain is partially similar to Dirty Pipe (CVE-2022-0847), which also leverages system calls:
• pipe — creates a unidirectional data channel;
• splice — enables data transfer between file descriptors without intermediate copying.
Since this vulnerability had already been observed in PT Sandbox during software analysis within an Astra Linux image, exploitation of the new Copy.Fail vulnerability was also detected in PT Sandbox even before a public exploit was released.
This exploit allows not only overwriting suid files but also performing other modifications, making system changes more stealthy.
How to fix 🔧
If you administer Linux systems, update the kernel. The patch is included in commit a664bf3d603d. Major distributions began releasing fixed packages starting April 29. A reboot will be required after updating.
If immediate updating is not possible, a temporary mitigation is to disable the algif_aead module:
echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif-aead.conf
rmmod algif_aead 2>/dev/null
#CopyFail #Linux #cve

English


















