Dirty Frag is the name of two Linux kernel bugs that are chained together: CVE-2026-43284 in the xfrm ESP (IPsec) receive path and CVE-2026-43500 in RxRPC. Each one gives a local user a way to write into the page cache, which is the kernel's in-memory copy of file contents. If an attacker can overwrite the cached copy of /usr/bin/su or /etc/passwd, any shell on the box becomes root. That includes a shell from a PHP upload bug or a compromised service account. Hyunwoo Kim (@v4bel) found the bugs, and the details became public on 7 May 2026 after the embargo broke. A public exploit was out before most distributions had shipped fixed kernels.
Most write-ups so far are vendor threat-intel summaries. This post looks at Dirty Frag from the Debian 13 side. It covers which trixie kernel fixes it, how to prove the running kernel has the fix, the stopgaps you can test, and what to log so you notice an attempt.
How Dirty Frag page-cache corruption works
Dirty Frag belongs to the same bug class as Dirty Pipe and Copy Fail (CVE-2026-31431). In each case the kernel writes into memory it does not own exclusively, and that memory turns out to be page-cache pages of a file the attacker can only read.
The pieces fit together like this:
splice()moves pages of a readable file into a pipe without copying them. WithMSG_SPLICE_PAGES, those same page-cache pages end up as fragments (frags) of a UDP socket buffer (sk_buff).- Crypto code that decrypts in place is supposed to copy shared frags into private pages first. According to the Debian tracker's description of CVE-2026-43284, the IPv4/IPv6 UDP append paths never marked spliced pages as shared (
SKBFL_SHARED_FRAG). ESP-in-UDP input therefore took the fast path and decrypted straight over the file's cached pages. - CVE-2026-43500 is the same mistake in RxRPC. Its DATA and RESPONSE handlers only made a private copy when the packet was cloned. Uncloned packets with externally owned paged frags went straight to in-place decryption.
The researcher calls this a deterministic logic bug. It needs no race window, and a failed attempt does not panic the kernel. The two paths cover each other's gaps: according to the researcher's repository, the ESP variant needs the privilege to create a namespace and the RxRPC variant does not. The lilting.ch technical analysis adds the details. Reaching the ESP path means registering an xfrm security association, which normally needs CAP_NET_ADMIN, so an unprivileged attacker typically gets it by creating a user namespace plus a network namespace. The RxRPC path skips namespaces and instead registers a session key through add_key("rxrpc", ...). Per that analysis it works where rxrpc.ko is available.
For defenders, the most important detail is this: the modified page is never written back to disk. read() and execve() see the corrupted bytes, but the on-disk file stays clean. After a reboot or a cache drop the evidence is gone, while whatever the attacker set up after getting root stays.
The public PoC is at github.com/V4bel/dirtyfrag. Run it only on your own throwaway VMs, never on a production host. It corrupts cached setuid binaries or /etc/passwd, and that corruption stays until you reboot or drop caches.
| CVE | Subsystem | Module | Needs user namespace | CVSS 3.1 |
|---|---|---|---|---|
| CVE-2026-43284 | xfrm ESP (IPsec) | esp4, esp6 | Yes, for an unprivileged attacker | 8.8 (kernel.org CNA) |
| CVE-2026-43500 | RxRPC (AFS) | rxrpc | No | 7.8 (NVD/CISA) |
The CVSS values are the ones quoted in Canonical's advisory. According to the Debian security tracker, both upstream fixes went into Linux 7.1-rc3: commit f4c50a4034e6 for ESP and aa54b1d27fe0 for RxRPC.
Check Dirty Frag exposure on Debian 13
Debian fixed both CVEs in trixie with DSA-6253-1 on 8 May 2026. The fixed source version is linux 6.12.86-1, and later trixie kernels include the fix. The kernel versions in the archive change with every kernel DSA, so ask your own mirror what it offers and compare the candidate with the thresholds below:
apt policy linux-image-amd64
The ESP fix turned out to be incomplete, though. CVE-2026-43284 has a follow-up, CVE-2026-46300, called Fragnesia. It is another page-cache write in the same ESP path. According to the Debian tracker, skb_try_coalesce() drops the SKBFL_SHARED_FRAG marker when it moves paged frags from one socket buffer to another, so ESP input decrypts in place over page-cache data again. The tracker links a public PoC. Debian fixed it in trixie with DSA-6295-1 (linux 6.12.90-1) and in bookworm with DSA-6306-1 (6.1.174-1). A trixie kernel from 6.12.86-1 up to anything older than 6.12.90-1 is fixed for Dirty Frag but still exploitable through Fragnesia, so the checks below use the Fragnesia fix as the threshold: 6.12.90-1 on trixie, 6.1.174-1 on bookworm.
| Suite | Dirty Frag fixed in | Fragnesia (CVE-2026-46300) fixed in |
|---|---|---|
| trixie (13) | 6.12.86-1 (DSA-6253-1) | 6.12.90-1 (DSA-6295-1) |
| bookworm (12) | 6.1.170-3 (DSA-6258-1) | 6.1.174-1 (DSA-6306-1) |
Don't compare against the upstream number in uname -r. On Debian, the ABI string (for example 6.12.90+deb13-amd64) is not the package version, and fixes are backported. The Debian package version of the running kernel appears in uname -v:
uname -r
uname -v
dpkg -l 'linux-image-*' | grep '^ii'
The next part matters most. Installing a fixed package does nothing until you boot into it. This snippet compares the running kernel, not the installed one, against the fixed version for the host's Debian release:
running=$(uname -v | grep -oP 'Debian \K\S+')
codename=$(. /etc/os-release; echo "$VERSION_CODENAME")
case "$codename" in
trixie) fixed=6.12.90-1 ;;
bookworm) fixed=6.1.174-1 ;;
*) fixed= ;;
esac
echo "release: $codename, running kernel package version: $running"
if [ -z "$fixed" ]; then
echo "no threshold for $codename - check the Debian security tracker"
elif dpkg --compare-versions "$running" ge "$fixed"; then
echo "running kernel contains the Dirty Frag and Fragnesia fixes (>= $fixed)"
else
echo "running kernel is VULNERABLE (< $fixed) - install the update and reboot"
fi
The thresholds only apply to the stock kernel of each release. If a bookworm host runs a backports kernel, the comparison against 6.1.174-1 says nothing useful, so look up that kernel's version in the security tracker by hand.
If the newest linux-image package is fixed but this check still says vulnerable, the box has not been rebooted. Patch, then reboot during a maintenance window. Rebooting a remote server always carries some risk of not getting it back, so have console access ready:
sudo apt update
sudo apt full-upgrade
sudo reboot
After the reboot, run the comparison again. The patch is only done once it reports the fixed version.
Is the vulnerable code even reachable?
On Debian 13, esp4, esp6 and rxrpc are loadable modules. The package contents search shows rxrpc.ko.xz in the amd64 and rt-amd64 flavours, but not in cloud-amd64. Check how your kernel was built and what is loaded right now:
grep -E 'CONFIG_INET_ESP=|CONFIG_INET6_ESP=|CONFIG_AF_RXRPC=' "/boot/config-$(uname -r)"
lsmod | grep -E '^(esp4|esp6|rxrpc) '
sudo ip xfrm state
If lsmod shows nothing, that does not mean you are safe. These modules autoload on demand, so an attacker's socket call can pull them in. An empty ip xfrm state means no IPsec SAs exist right now, which is a good sign that blocking ESP will not break anything.
Stopgaps when you cannot reboot yet
Block the modules
Warning: this breaks IPsec (strongSwan, Libreswan) and in-kernel AFS. Don't apply it on VPN gateways that use IPsec. Blocking only ESP or only RxRPC leaves the other path open, so block all three. Blocking esp4 and esp6 also closes the Fragnesia path, since it goes through the same ESP code.
install esp4 /bin/false
install esp6 /bin/false
install rxrpc /bin/false
sudo update-initramfs -u -k all
sudo modprobe -r esp4 esp6 rxrpc
modprobe -n -v esp4
modprobe -n -v rxrpc
lsmod | grep -E '^(esp4|esp6|rxrpc) '
modprobe -n -v should print install /bin/false for each module. If a module is in use and won't unload, the block only takes effect after a reboot. Keep the block until the running kernel is at least 6.12.90-1 (6.1.174-1 on bookworm). A kernel that only has the Dirty Frag fix is not enough, because Fragnesia is still open there. After that, delete the file and run update-initramfs -u -k all again. The Copy Fail mitigation (blacklisting algif_aead) does not stop Dirty Frag.
Restrict unprivileged user namespaces
Debian's kernel carries its own sysctl, kernel.unprivileged_userns_clone, which defaults to 1. Setting it to 0 takes away the ESP route from an unprivileged attacker. It does nothing against the RxRPC path.
kernel.unprivileged_userns_clone = 0
sudo sysctl --system
sysctl kernel.unprivileged_userns_clone
unshare --user --map-root-user id
Run the last command as a normal user. It should now fail with a permission error. The setting breaks rootless Podman, bubblewrap and Flatpak, so check first whether anything on the host uses them.
| Setting | Blocks | Side effects |
|---|---|---|
kernel.unprivileged_userns_clone=0 | User namespaces for non-root users | Breaks rootless containers, bubblewrap, Flatpak |
user.max_user_namespaces=0 | User namespaces for everyone, including root | Also breaks root-run tools that use user namespaces |
On a Debian server, the first option is usually the right one. Ubuntu restricts user namespaces through an AppArmor sysctl (kernel.apparmor_restrict_unprivileged_userns), but that comes from an Ubuntu kernel patch. If sysctl kernel.apparmor_restrict_unprivileged_userns reports an unknown key on your box, you don't have that layer.
Sandbox the services that are your likely foothold
Usually the attacker starts as www-data or another service user. systemd can take away the syscalls both paths depend on. Here is a drop-in for a service that only needs IP and Unix sockets (replace myapp with your unit):
[Service]
RestrictNamespaces=true
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
SystemCallFilter=~@keyring
NoNewPrivileges=true
RestrictNamespaces=true prevents the user and network namespaces needed for the ESP path. The address family allow list excludes AF_RXRPC. ~@keyring blocks the kernel keyring calls. NoNewPrivileges=true means a corrupted setuid su started from the service does not hand out root. It also breaks anything that needs setuid or setgid helpers, such as the Postfix sendmail binary used by PHP mail.
systemd only reads a new or changed drop-in after systemctl daemon-reload. If you just restart, the service keeps running with the old unit config and the sandbox is not active, even though the file is in place. Reload, restart, then confirm the settings are live:
sudo systemctl daemon-reload
sudo systemctl restart myapp
systemctl show myapp -p RestrictNamespaces -p RestrictAddressFamilies -p NoNewPrivileges
systemd-analyze security myapp
Test the service properly before rolling this out. The systemd sandboxing guide for Debian 13 shows how to score and tighten units with systemd-analyze security.
AppArmor, which is enabled by default on Debian 13, adds some friction. Splicing a file requires opening it for reading first, and a strict profile limits which files a service can open. Every profile has to allow /etc/passwd for NSS, though, so don't treat AppArmor as a fix.
Detecting Dirty Frag attempts
auditd rules
Most of the exploit happens in memory, but the steps around it make syscalls you can log. On a server without containers, these rules produce little noise:
## service accounts (uid 1-999) creating namespaces
-a always,exit -F arch=b64 -S unshare -F uid>0 -F uid<1000 -k svc_userns
## AF_RXRPC sockets (address family 33)
-a always,exit -F arch=b64 -S socket -F a0=33 -k rxrpc_socket
## kernel keyring use by non-root
-a always,exit -F arch=b64 -S add_key -F uid>0 -k add_key
## su and sudo started by service accounts
-a always,exit -F arch=b64 -S execve -F path=/usr/bin/su -F uid>0 -F uid<1000 -k svc_su
-a always,exit -F arch=b64 -S execve -F path=/usr/bin/sudo -F uid>0 -F uid<1000 -k svc_su
## new setuid bits (post-exploitation persistence)
-a always,exit -F arch=b64 -S chmod,fchmod -F a1&04000 -k setuid_chmod
-a always,exit -F arch=b64 -S fchmodat -F a2&04000 -k setuid_chmod
-a always,exit -F arch=b64 -S fchmodat2 -F a2&04000 -k setuid_chmod
sudo augenrules --load
sudo ausearch -k svc_su -i
sudo ausearch -k rxrpc_socket -i
If www-data runs su, investigate. That should never happen. The rules only cover 64-bit syscalls, so add matching arch=b32 lines if 32-bit binaries can run on the host. Kernels since 6.6, including trixie's 6.12, also have the fchmodat2 syscall, and newer glibc can use it for fchmodat(), which is why the last rule is there. If augenrules rejects that line, check with ausyscall fchmodat2 whether your auditd knows the syscall name. A clone() with namespace flags can bypass the unshare rule, so treat that rule as a tripwire, not a full audit. To fit these rules into a baseline that stays quiet, follow the small auditd rule set for Debian 13.
Integrity checks, with one caveat
Because the corruption only exists in the page cache, file integrity tools catch it only while it is live. That is enough to be useful. debsums and AIDE read files through the page cache, so a corrupted su fails its checksum until the cache is dropped:
sudo debsums -s "$(dpkg -S /usr/bin/su | cut -d: -f1)" sudo passwd
sudo debsums -c
A cleaner check is to compare the cached contents with what's on disk. O_DIRECT reads skip the page cache on filesystems like ext4 and XFS, so different hashes for the same file are a strong warning sign:
sha256sum /usr/bin/su
sudo dd if=/usr/bin/su iflag=direct bs=1M status=none | sha256sum
The debsums man page calls it of limited use as a security tool. Its md5sums lists live in /var/lib/dpkg/info on the same host, where root can change them. Run AIDE with a protected database from a timer, as described in AIDE file integrity monitoring on Debian 13. Keep in mind that a clean AIDE run after a reboot proves nothing about the time before it.
If you suspect Dirty Frag was used, collect evidence first: hashes, audit logs and a memory image if you can get one. Then clear the corruption. A reboot is the sure way. Evicting the cache with sync, followed by echo 3 | sudo tee /proc/sys/vm/drop_caches, only drops clean pages that nothing has mapped, so pages of a corrupted binary still mapped by a running process (a lingering su or shell, for example) can stay in memory. If you go that route, repeat the O_DIRECT hash comparison afterwards. Neither step removes an attacker who already had root. Look for new users, SSH keys, units, timers and setuid files, and if you're unsure, rebuild the host.
Takeaways
- Running kernel package version (from
uname -v) is at least 6.12.90-1 on every trixie host and at least 6.1.174-1 on every bookworm host, which covers Dirty Frag and the Fragnesia follow-up CVE-2026-46300. Backports kernels need a manual check in the tracker. - A reboot happened after the upgrade, and you checked it with the version comparison, not just the package list.
- Where you couldn't reboot:
esp4,esp6andrxrpcare blocked in/etc/modprobe.dandmodprobe -n -vconfirms it. kernel.unprivileged_userns_clone=0on hosts that don't run rootless containers.- Internet-facing services use
RestrictNamespaces,RestrictAddressFamiliesandNoNewPrivilegeswhere they still work with them, applied withsystemctl daemon-reloadand checked withsystemctl show. - auditd alerts fire on
suorsudofrom service accounts,AF_RXRPCsockets and new setuid bits. - debsums or AIDE run regularly, and the stopgap file is removed only once the running kernel is at least 6.12.90-1 (6.1.174-1 on bookworm).
Sources
- Debian security tracker: CVE-2026-43284
- Debian security tracker: CVE-2026-43500
- Debian security tracker: CVE-2026-46300 (Fragnesia)
- Debian security tracker: DSA-6253-1
- Debian security tracker: DSA-6295-1
- Debian security tracker: DSA-6306-1
- [SECURITY] [DSA 6253-1] linux security update
- Debian trixie package: linux-image-amd64
- Debian package contents search: rxrpc.ko (trixie, amd64)
- Debian package contents search: esp4.ko (trixie, amd64)
- V4bel/dirtyfrag: Dirty Frag write-up and PoC
- Canonical: Dirty Frag Linux vulnerability fixes available
- Wiz: Dirty Frag, Linux kernel local privilege escalation via ESP and RxRPC
- Linux Dirty Frag: page cache to root (technical analysis)
- NHIMG: Dirty Frag shows why Linux privilege escalation changes defense
- bubblewrap README.Debian (unprivileged_userns_clone, max_user_namespaces)
- debian-user: kernel.unprivileged_userns_clone on trixie
- namespaces(7), Debian trixie manpages
- systemd.exec(5), Debian trixie manpages
- debsums(1), Debian trixie manpages
- Ubuntu spec: unprivileged user namespace restrictions via AppArmor
- Linux kernel documentation: /proc/sys/vm (drop_caches)
Comments