
Kernel patches for Dirty Frag vulnerability (CVE-2026-43284, CVE-2026-43500)
Patch series for the Dirty Frag vulnerability class discovered by Hyunwoo Kim (@v4bel).
Dirty Frag allows an unprivileged local user to overwrite arbitrary bytes of the page cache of read-only files (e.g. /usr/bin/su, /etc/passwd) leading to local privilege escalation to root on all major Linux distributions.
The patches in this repository were NOT written by the maintainer of this repo.
- CVE-2026-43284 (ESP patch): authored by Hyunwoo Kim (@v4bel) and Kuan-Ting Chen. Merged into the Linux kernel mainline at commit
f4c50a4034e6.- CVE-2026-43500 (RxRPC patch): authored by Hyunwoo Kim (@v4bel). Submitted to the netdev mailing list at
afKV2zGR6rrelPC7@v4bel, pending merge.This repository is a formatted mirror of those patches, collected here for convenience in
git am-ready format. All credit goes to the original authors. Original research and PoC: https://github.com/V4bel/dirtyfrag
4.10 (commit cac2661c53f3, 2017-01-17) up to 6.x pre-f4c50a4034e66.4 (commit 2dc334f1a63a, 2023-06-08) up to upstream (no patch merged yet)git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
# Apply patch 1 (ESP — CVE-2026-43284)
git am 0001-net-xfrm-fix-page-cache-write-via-esp-splice-CVE-2026-43284.patch
# Apply patch 2 (RxRPC — CVE-2026-43500)
git am 0002-net-rxrpc-fix-page-cache-write-via-rxkad-splice-CVE-2026-43500.patch
patch (if git am fails due to context drift)patch -p1 < 0001-net-xfrm-fix-page-cache-write-via-esp-splice-CVE-2026-43284.patch
patch -p1 < 0002-net-rxrpc-fix-page-cache-write-via-rxkad-splice-CVE-2026-43500.patch
If you cannot apply the patch immediately, blacklist the vulnerable modules:
sudo sh -c "printf 'install esp4 /bin/false\ninstall esp6 /bin/false\ninstall rxrpc /bin/false\n' \
> /etc/modprobe.d/dirtyfrag.conf && \
rmmod esp4 esp6 rxrpc 2>/dev/null; \
echo 3 > /proc/sys/vm/drop_caches"
Warning: Removing
esp4/esp6disables IPsec ESP. Evaluate the impact before applying on production systems.
Both variants share the same root cause: the kernel's zero-copy splice() path plants a read-only page-cache page directly into an skb frag without copy-on-write semantics. Subsequent in-place crypto operations then write into that page-cache page, permanently modifying the cached file content.
splice(file_fd → pipe → socket)
│
▼
skb->frags[0].page = &page_cache_page_P <- no CoW!
│
▼
[esp_input / rxkad_verify_packet_1]
in-place AEAD/fcrypt decrypt src == dst == &P
│
▼
STORE to page_cache_page_P <- arbitrary write to read-only file cache
| File | CVE | Subsystem | Status |
|---|
0001-net-xfrm-fix-page-cache-write-via-esp-splice-CVE-2026-43284.patch | CVE-2026-43284 | net/ipv4/esp4.c, net/ipv6/esp6.c, net/ipv4/ip_output.c, net/ipv6/ip6_output.c | ✅ Merged in mainline (f4c50a4034e6) |
0002-net-rxrpc-fix-page-cache-write-via-rxkad-splice-CVE-2026-43500.patch | CVE-2026-43500 | net/rxrpc/call_event.c, net/rxrpc/conn_event.c | ⏳ Submitted to netdev ML (afKV2zGR6rrelPC7@v4bel), pending merge |
| Variant | Approach |
|---|
| ESP | Mark splice frags with SKBFL_SHARED_FRAG; check this flag in esp_input()/esp6_input() to force skb_cow_data() before in-place crypto |
| RxRPC | Extend skb_cloned() gate to (skb_cloned(skb) || skb->data_len) so non-linear skbs (which may contain splice frags) are always copied before in-place decryption |