Page-Cache Exploits Explained: Copy Fail, Dirty Frag and Fragnesia

Page-cache exploits explained by Arise Servers

In the space of about two weeks in spring 2026, Linux admins had to deal with three separate kernel bugs that each handed root to any local user. Copy Fail arrived at the end of April. Dirty Frag followed on May 7. Fragnesia landed on May 13, and the Dirty Frag patches didn’t fix it.

Most coverage treated these as three unrelated news stories. They aren’t. They’re the same idea found in three different corners of the kernel, and it’s the same idea behind Dirty Pipe back in 2022. Once you understand that idea, the advisories stop looking random. You can also make a much better guess about which of your servers are exposed to the next one.

This post explains the bug class in plain terms, walks through each of the three, and covers what you can do today to block the whole family, not just one CVE at a time.

First, what is the page cache?

Reading from disk is slow compared to reading from memory. So when Linux reads a file, it keeps a copy of it in RAM. The next time any process reads that file, the kernel serves it from memory instead of going back to the disk. That pool of cached file data is the page cache.

The page cache is shared. If ten processes run /usr/bin/su, they all use the same cached copy. That’s great for performance. It also means that if an attacker can quietly change the cached copy, every process that reads the file gets the changed version, while the file on disk stays exactly as it was.

Normally, an ordinary user can only read a file like /usr/bin/su or /etc/passwd. The kernel won’t let them write to it, and it won’t let them write to its cached pages either. The whole bug class comes down to finding a path where the kernel writes into one of those cached pages by mistake.

VPS Server Plans

An ideal VPS solution for modern projects combines strong security, high-speed performance, and flexible, scalable configurations to match your evolving requirements.

PLANS

The pattern behind all three bugs

Infographic showing how a Linux page
How page-cache exploits like Dirty Frag and Fragnesia work. A zero-copy feature such as splice() passes a reference to a cached file page. Kernel code then writes into that page in place, altering a setuid binary or /etc/passwd in memory only and giving the attacker root.

Qualys described the shared pattern well: a zero-copy path hands out a reference to a page, and something further down writes into that page in place.

Here’s what that means step by step.

  1. Linux has fast “zero-copy” features, such as splice(), that move data between files, pipes and sockets without copying it. Instead of duplicating the bytes, the kernel passes along a reference to the original memory page.
  2. An attacker uses one of these features to pass a reference to a page-cache page of a file they can read, such as a setuid binary or /etc/passwd.
  3. Somewhere later in the path, a different part of the kernel (often crypto code) decides to process that data in place, writing its output back into the same page it read from.
  4. That kernel code doesn’t realise the page belongs to the page cache and shouldn’t be written. So it writes. The attacker has now changed a file they were never allowed to modify, but only in memory.

The result is a write primitive: a way to put chosen bytes into a cached file. With that, getting root is straightforward. Change a setuid program so it runs the attacker’s code, or blank out root’s password in the cached /etc/passwd.

Read Also: The 30-Minute Patch Window: How AI Changed Server Patching in 2026

Dirty Pipe (2022): where the pattern first got famous

Dirty Pipe (CVE-2022-0847) wasn’t a 2026 bug, but it’s the ancestor. It abused a flag on a pipe buffer so that data written into a pipe ended up overwriting the page-cache copy of a read-only file. It was patched in 2022, and most people assumed that kind of bug was dealt with. 2026 showed the pattern was still hiding in other subsystems.

Copy Fail (CVE-2026-31431)

Where it lives: the kernel’s user-space crypto interface, AF_ALG, specifically the algif_aead module.

What went wrong: In 2017, an optimisation let the kernel reuse source memory as the destination during some crypto operations. Microsoft’s write-up explains that a flaw in error handling during a failed copy lets an attacker make a controlled 4-byte write into the page cache. They do it by combining AF_ALG sockets with splice().

Why it was serious:

  • It affected kernels from 2017 until patched, including Ubuntu 24.04 LTS, Amazon Linux 2023, RHEL 10.1 and SUSE 16.
  • A public exploit of roughly 732 bytes was deterministic. No race condition and no luck needed.
  • It worked from inside a container with no special capabilities. Because containers share the host kernel and page cache, one container could affect the whole node.
  • CISA added it to the Known Exploited Vulnerabilities catalogue on May 1, 2026. CVSS 7.8.

Mitigation: patch the kernel. Where that isn’t possible yet, Microsoft recommends blocking AF_ALG socket creation. Most web servers have no reason to use AF_ALG at all.

Dirty Frag (CVE-2026-43284 and CVE-2026-43500)

Dirty Frag, disclosed on May 7, is really two bugs used as a pair.

CVE-2026-43284 is in the IPsec ESP code (xfrm). It gives a 4-byte page-cache write. This code path has been vulnerable since 2017.

CVE-2026-43500 is in RxRPC, a network protocol mostly used by the AFS file system. It gives an 8-byte write. This path has been vulnerable since 2023.

What went wrong: When data is spliced into a socket, the kernel can pin the original page into the network packet’s fragment list rather than copying it. On the receive side, the ESP or RxRPC code then decrypts that data in place, right on top of the page-cache page.

Why it came as a pair: The ESP path needs a capability called CAP_NET_ADMIN. An ordinary user can get that inside an unprivileged user namespace, which many distributions allow by default, including RHEL, Fedora, openSUSE and AlmaLinux. Ubuntu’s AppArmor rules can block that trick. So the exploit falls back to RxRPC, which needs no special privileges at all. Qualys noted this is why the chain still worked on hardened Ubuntu systems.

The public exploit targeted the first line of /etc/passwd, blanking root’s password field so that su would let anyone in without a prompt.

One more detail made it worse. Dirty Frag had a five-day embargo meant to give vendors time to prepare. It was broken within hours.

Fragnesia (CVE-2026-46300)

Six days later, William Bowling of V12 Security disclosed Fragnesia, with a public proof of concept and a kernel patch on the same day.

Where it lives: ESP-in-TCP, a mode that carries IPsec ESP traffic inside a TCP stream. It shares the general xfrm/ESP area with Dirty Frag but uses a different entry point.

What went wrong: The kernel marks pages it shouldn’t write to with a flag called SKBFL_SHARED_FRAG. When TCP merges packets together, the function skb_try_coalesce() didn’t carry that flag over to the merged packet. The flag was lost, so the kernel treated page-cache pages as safe to write. Tenable’s analysis describes the result as a 192-byte XOR using an AES-GCM keystream. That’s a much bigger write than Dirty Frag’s 4 bytes, and there’s no race to win.

Why it caught people out: Fragnesia is the same class as Dirty Frag but a different bug. Servers that had installed only the Dirty Frag kernel patches were still vulnerable. Servers that had used the module blacklist workaround for Dirty Frag (blocking esp4, esp6 and rxrpc) were already protected.

That difference is the most practical lesson in this whole series. Patches fix one bug. Removing the attack surface blocks the class.

The public exploit targeted /usr/bin/su in the page cache, leaving the binary on disk unchanged. Amazon Linux wasn’t affected because it doesn’t ship the espintcp module. Months later, attackers chained Fragnesia with the PHP2Shell remote bug to go from a web request to root on real servers. We cover that in detail in the next post in this series.

The three side by side

Copy FailDirty FragFragnesia
CVECVE-2026-31431CVE-2026-43284 / 43500CVE-2026-46300
DisclosedLate April 2026May 7, 2026May 13, 2026
SubsystemAF_ALG crypto (algif_aead)IPsec ESP + RxRPCESP-in-TCP
Write size4 bytes4 bytes (ESP), 8 bytes (RxRPC)192 bytes (XOR)
Needs a user namespace?NoESP path yes, RxRPC path noYes
Fixed by the Dirty Frag patch?NoYesNo
Blocked by the esp4/esp6/rxrpc blacklist?NoYesYes

Am I exposed? A quick check

These are local bugs, so the first question is who can run code on the machine. If the answer includes website code, customer uploads, CI jobs or containers, treat these as urgent.

Then check which of the relevant modules are loaded or loadable:

# Running kernel
uname -r

# Are any of the risky modules loaded right now?
lsmod | grep -E 'esp4|esp6|rxrpc|algif_aead'

# Are unprivileged user namespaces allowed?
sysctl user.max_user_namespaces
sysctl kernel.unprivileged_userns_clone 2>/dev/null
sysctl kernel.apparmor_restrict_unprivileged_userns 2>/dev/null

An empty lsmod result doesn’t mean you’re safe. Many of these modules load automatically the first time a program asks for them, and the exploits ask for them. What matters is whether they can load.

How to block the whole family today

Dirty Frag patch with module blacklistin
Patches fix one bug; hardening blocks the whole class. Servers with only the Dirty Frag patch were still exposed to Fragnesia, while blacklisting esp4, esp6 and rxrpc blocked both. To block the family: patch and reboot, blacklist unused modules, block AF_ALG if not needed, and restrict unprivileged user namespaces.

1. Patch and reboot. Install your distribution’s fixed kernel, then boot into it. Check with uname -r afterwards. A fixed kernel sitting on disk protects nothing.

2. Blacklist modules you don’t use. If the server doesn’t terminate IPsec and doesn’t use AFS, it has no need for ESP or RxRPC. The workaround published for Dirty Frag, which also blocks Fragnesia, looks like this:

sudo rmmod esp4 esp6 rxrpc 2>/dev/null
printf 'install esp4 /bin/false\ninstall esp6 /bin/false\ninstall rxrpc /bin/false\n' | sudo tee /etc/modprobe.d/dirtyfrag.conf

If you run an IPsec VPN on the box, don’t do this. You’ll break the VPN. Patch instead, and keep that server’s local user access as tight as possible.

3. Block AF_ALG if you don’t need it. For Copy Fail, Microsoft recommends blocking AF_ALG socket creation where patching isn’t immediate. Very few web stacks use it. Check with your distribution’s guidance before you change it, since some disk-encryption and crypto tools rely on it.

4. Restrict unprivileged user namespaces. Fragnesia and the ESP half of Dirty Frag both rely on them. Ubuntu limits them through AppArmor. Other distributions can set user.max_user_namespaces=0, or kernel.unprivileged_userns_clone=0 where that setting exists. Test first: rootless containers and some browser sandboxes need user namespaces.

These four steps make up a more general Linux hardening habit: every kernel feature you don’t use is a feature that can’t hurt you.

Why your integrity scanner might miss it

This bug class has an unpleasant property for anyone doing incident response. The exploit changes the cached copy of a file, not the file on disk. Tools that verify files by hashing them on disk, including many file-integrity monitors, will report that everything is fine.

The changed page stays in memory until the kernel drops it from the cache or the machine reboots. Qualys noted that a corrupted /usr/bin/su in the cache keeps working as a backdoor until then.

That creates a real dilemma. A reboot cleans the cache and removes the backdoor, but it also destroys the evidence of what happened. If you think a server was hit, capture memory first, then patch or reboot. Our guide to detecting malware on a Linux VPS covers the other places to look. Keep in mind that a root compromise usually means the safest path is a rebuild from known-good backups, not a cleanup.

Dedicated Server Plans

Arise Dedicated Servers deliver powerful performance, reliable infrastructure, and flexible resources for businesses, high-traffic websites, applications, and demanding workloads.

PLANS

What this means for shared and container hosts

Page-cache bugs hit hardest where many users share one kernel. On a shared hosting server, any one compromised website can become root for all of them. On a container host, one container can affect the node. Copy Fail showed this directly.

A few takeaways:

  • Treat any remote code execution inside a container as a possible host compromise until proven otherwise.
  • Keep kernel patching on container nodes as fast as on your web front ends, not on a slower “infrastructure” cycle.
  • For workloads that really can’t share a kernel with strangers, single-tenant dedicated servers remove a whole category of cross-tenant risk.

Our post on protecting VPS and cloud servers from attacks covers the wider set of controls for multi-tenant setups.

arise server

Will there be a fourth?

Almost certainly. Copy Fail, Dirty Frag and Fragnesia were found in different parts of the kernel by different people within weeks of each other. Researchers and attackers now know exactly what to look for: any place where zero-copy data meets in-place processing. AI-assisted code review makes that search faster. Copy Fail itself was reportedly found in a one-hour AI-assisted scan.

You can’t predict the next CVE number. You can predict its shape. It’ll probably need local code execution, it’ll probably touch a networking or crypto module that most servers don’t use, and it’ll probably target a setuid binary or /etc/passwd in the cache. Servers with unused modules blacklisted, user namespaces restricted and a fast kernel-reboot routine will be in good shape before the advisory even lands.

If keeping up with kernel advisories is more than your team has time for, a cyber security management service can handle the monitoring and emergency work.

FAQ’s

Fragnesia (CVE-2026-46300) is a Linux kernel bug in the IPsec ESP-in-TCP code that lets any local user get root. It writes attacker-chosen bytes into the in-memory page-cache copy of a file such as /usr/bin/su. It was disclosed on May 13, 2026, with a public proof of concept.

They belong to the same bug class but are separate bugs. Dirty Frag (CVE-2026-43284 and CVE-2026-43500) abuses ESP and RxRPC. Fragnesia abuses ESP-in-TCP through a lost safety flag. The Dirty Frag kernel patches don’t fix Fragnesia, but blacklisting the esp4, esp6 and rxrpc modules blocks both.

It’s an attack that changes the copy of a file Linux keeps in memory rather than the file on disk. Every process that reads the file gets the altered version, so changing a cached setuid program or /etc/passwd can give root. The file on disk stays untouched.

Often not. Tools that hash files on disk see a clean file, because only the cached copy in memory was changed. The altered page stays until the cache is dropped or the server reboots. Memory capture is the more reliable way to find evidence.

On most web and application servers, yes. They’re only needed if the server terminates IPsec VPN traffic (ESP) or uses the AFS file system (RxRPC). If your server runs an IPsec VPN, don’t blacklist ESP. Patch the kernel instead.

Yes. Containers share the host’s kernel and page cache, so a process inside one container can affect the whole node. Copy Fail worked from a container with no special capabilities. Treat any code execution inside a container as a possible host compromise.

Similar Posts