Looking for mitigation steps? Jump ahead ↓
The Short Version
What: A Linux local privilege escalation called pedit COW (CVE-2026-46331), a missing-bounds-check write in the kernel’s act_pedit traffic-control action. tcf_pedit_act() computes its copy-on-write range once before it edits packet headers, misses the runtime offset that typed keys add at execution time, and ends up writing into a page it never made private – a partial COW that lands in the shared page cache.
Impact: A public, author-verified proof of concept gives any local unprivileged user a turnkey path to a root shell on affected systems where the act_pedit action is reachable and unprivileged user namespaces are available. The PoC poisons the cached image of setuid-root /bin/su and walks straight to root. Red Hat rates the flaw Important.
Status: This is an N-day, not a same-day surprise. The fix was developed in the open on the netdev list as a routine data-corruption patch (subject “net/sched: fix pedit partial COW leading to page cache corruption”), with no CVE and no security framing. The kernel.org CNA assigned CVE-2026-46331 at merge time on June 16, 2026 – weeks after the exploitable detail was already public – and a weaponized PoC dropped June 17. Mainline and stable are fixed; Red Hat and AlmaLinux have shipped errata.
Severity: Local attack vector, low complexity once the prerequisites are present, no user interaction, deterministic page-cache corruption to root, and working public exploit code. Bug class: out-of-bounds write leading to memory corruption and local privilege escalation. CVSS was not finalized at publication; Red Hat’s Important rating is the number to act on.
Do this now: Deploy a vendor-fixed kernel where one exists (RHEL 8/9/10, AlmaLinux 8, Debian 13) and reboot. The KernelCare rebootless patch is still in testing and has not landed on any feed yet, so do not wait on it. Until you can patch, block act_pedit from loading if you do not use tc pedit rules, and/or restrict unprivileged user namespaces. Commands and trade-offs are below.
Don’t want to schedule another emergency reboot? KernelCare applies Linux kernel patches without reboots, downtime, or disruptions.
Update (2026-07-02, 15:00 UTC): KernelCare rebootless patches have now shipped. They are on the stable feed and ePortal for RHEL 8/10, AlmaLinux/CloudLinux 8 and 10, Debian 13, and Ubuntu 22.04. RHEL 9, AlmaLinux/CloudLinux 9, Rocky Linux 9, and Oracle Linux 9 have reached the main feed, with ePortal publication following.
The Long Version
CVE-2026-46331 is another Linux page-cache corruption bug that turns a kernel write mistake into a practical local-to-root path. It sits in the traffic-control subsystem, specifically in the act_pedit packet-editing action that tc uses to rewrite header bytes on packets in flight.
The unsettling part is not only the bug. It is how it surfaced.
The upstream patch was discussed publicly as a data-corruption fix, with no CVE and no obvious security framing. The CVE arrived later, at merge time on June 16, and a public weaponized PoC followed the next day. That makes pedit COW an N-day in the way that matters to defenders: the exploitable technical detail was visible on a public mailing list before most teams had a CVE, a scanner rule, a vendor advisory, or a patch process attached to it.
We did not catch this one through our own monitoring. It came in through a customer escalation – it was never on oss-security, and the kernel CNA stream is not currently on our watchlist. That gap is its own lesson about fix-first, CVE-later kernel bugs, and it is one of the reasons this post exists.
Am I Affected?
Treat a host as exposed if all of the following hold:
- The kernel carries the vulnerable act_pedit code path.
- The act_pedit module is loaded or can be auto-loaded on demand.
- Unprivileged user namespaces are enabled, giving an attacker the namespace-local CAP_NET_ADMIN the exploit needs.
- An untrusted or partially trusted local user can run code on the box.
act_pedit auto-loads the moment a pedit tc action is configured, so an empty lsmod is not the all-clear it looks like. Check all three conditions:
# Is the module loaded right now?
lsmod | grep -w act_pedit
# Can it be loaded on demand?
modinfo act_pedit 2>/dev/null | head -n 1
# Are unprivileged user namespaces available?
sysctl user.max_user_namespaces kernel.unprivileged_userns_clone 2>/dev/null
You can also confirm whether you actually use the action: tc actions list action pedit returns empty on hosts that are not running pedit rules today. Empty output does not make you safe – an attacker who can insert a rule from inside a namespace still reaches the code path – but it tells you whether the recommended module-blacklist mitigation is safe to apply.
On RHEL and Debian, unprivileged userns is open by default. On Ubuntu it is gated by kernel.apparmor_restrict_unprivileged_userns / _unconfined, but that gate is a hardening control, not a kernel fix – the PoC bypasses it with an aa-exec trick on 24.04. Ubuntu 26.04 reports “FAIL” against the PoC for the same AppArmor reason while the kernel underneath stays vulnerable.
What pedit COW Is
pedit is short for packet editor – a traffic-control action that lets administrators rewrite fields in packet headers as packets move through configured tc filters and actions. The vulnerable function is tcf_pedit_act() in net/sched/act_pedit.c.
It belongs to the same family as Dirty Pipe, Copy Fail, and Dirty Frag: a kernel routine writes into a page it does not exclusively own, and the write lands in a page-cache entry that backs a file on disk. What is new here is the entry point. Instead of a crypto fast path or a zero-copy decryption path, the trigger is a packet-editing action that an unprivileged process can configure from inside a user namespace.
At a high level, the bug comes from calculating the writable packet range too early. Before modifying packet data, the kernel calls skb_ensure_writable() to make the target bytes private. tcf_pedit_act() computed that range once, before the loop over edit keys, using a precomputed hint called tcfp_off_max_hint. The hint did not account for the runtime header offset that typed keys add – those keys resolve their offsets against the L2/L3/L4 headers at execution time, so the real write offset is only known once the loop is running. Part of the destination is therefore never made private. That is a partial copy-on-write, and writing into the un-COW’d region is an out-of-bounds, cross-page write.
Because the skb can reference zero-copy pages pulled in via sendfile, that out-of-bounds write can land in shared page-cache memory backing a real file. The kernel believes it has made the packet memory safe to modify; in reality, the later write reaches outside the region it actually privatized.
How the Exploit Actually Works
The public PoC (sgkdev/packet_edit_meme) chains four ordinary pieces – the act_pedit action, socket buffers that can reference zero-copy pages, unprivileged user namespaces, and the page cache – and needs no heap shaping or race window.
- Namespace and capability. From an unprivileged user namespace, the attacker takes namespace-local CAP_NET_ADMIN – enough to configure traffic-control actions inside the namespace they control.
- Traffic-control binding. They configure a pedit action with typed keys whose runtime offset lands outside the range tcf_pedit_act() made writable, triggering the partial-COW write.
- Page-cache targeting. By feeding zero-copy file references into the network stack, they aim that out-of-bounds write at the cached ELF image of setuid-root /bin/su.
- Payload. They overwrite the cached entry point with shellcode equivalent to setgid(0), setuid(0), execve(“/bin/sh”).
- Root. They leave the namespace and run su. The shared page cache serves the poisoned image, and the shellcode runs as root.
The on-disk binary never changes. The corruption lives only in the page cache, which is why file hashing and disk forensics can come back clean while a root shell is already open. The single prerequisite that matters is unprivileged user namespaces with CAP_NET_ADMIN – open by default on RHEL and Debian, gated on Ubuntu.
What the upstream fix changes
The merged fix (subject “net/sched: act_pedit: extend the writable skb range per key”) restructures the COW path so the writable range tracks the real offset:
- It moves skb_ensure_writable() inside the per-key loop, where the actual write offset is known.
- It adds overflow checking on the offset arithmetic and guards offset_valid() against INT_MIN, where negation is undefined.
- For negative offsets – think Ethernet-header edits at ingress – it uses skb_cow() to COW the headroom instead.
- It linearizes skbs carrying shared frags up front, so a zero-copy page cannot be silently corrupted.
It is a self-contained change to one function. The KernelCare rebootless patch is a genuine port of this upstream fix rather than a conservative kpatch equivalent: it rebuilds the COW path inside tcf_pedit_act() with the same per-key skb_ensure_writable() / skb_cow() logic and offset guards.
Why This Bug Was Easy to Miss
pedit-cow was never handed to defenders as a named emergency. It looked like a networking data-corruption fix, and it moved through the tree as one.
That matters because most patch workflows watch CVE feeds, vendor advisories, oss-security, and scanner updates. This issue traveled a path where the security implication only became obvious later: the patch was visible first, the CVE arrived at merge, and the PoC followed within a day. For kernel bugs in this class, fix-first, CVE-later opens a window where attackers and specialized researchers understand exploitability before ordinary enterprise patch processes even register the issue.
The practical takeaway: treat public kernel fixes touching page-cache corruption, partial COW, zero-copy writes, and writable-skb-range handling as potentially security-relevant before a CVE or PoC appears.
Who Is Affected
Exposure comes down to three things: whether act_pedit can load, whether unprivileged userns is permitted, and whether your distribution has shipped a fixed kernel.
Confirmed exploitable by the public PoC (author-verified, unprivileged to root):
- RHEL 10.0 on 6.12.0-228.el10 – no flag needed; userns open by default
- Debian 13 trixie on 6.12.90+deb13.1 – no flag needed
- Ubuntu 24.04.4 on 6.17.0-22 – requires the –ubuntu aa-exec userns bypass
Ubuntu 26.04 (7.0.0-14) returns “FAIL,” but that is the AppArmor userns hardening doing its job, not a fixed kernel. The kernel underneath is still vulnerable.
Vendor-fixed (deploy the patched kernel and reboot):
- RHEL 10 – RHSA-2026:27288
- RHEL 9 – RHSA-2026:27789
- RHEL 8 – RHSA-2026:27353; the AlmaLinux 8 rebuild is ALSA-2026:27353 (released June 22). RHSA-2026:27355 is the 8.8 EUS/TUS variant.
- Debian 13 trixie – DSA-6355-1 (issued June 21)
Plus mainline and the stable backports.
Affected but not yet vendor-fixed – the hosts where interim mitigation is the only lever today, and where rebootless patch coverage matters most once it ships:
- Debian 11 and 12
- Ubuntu bionic through noble (24.04.4 is a confirmed PoC target)
Not affected or still open:
- RHEL 7 / CentOS 7 – not affected.
- Oracle UEK 6 and UEK 7 – status open in our dev thread.
Mitigate Now
The safest path is protecting the running kernel immediately. There are three practical levers, in order of preference.
1. Patch or rebootless patch
Install the vendor-fixed kernel where one exists and reboot as soon as operationally possible. Prioritize hosts where partially trusted code runs: Kubernetes nodes, CI/CD runners, shared hosting, developer and build systems, multi-tenant platforms, and container hosts that accept untrusted workloads.
KernelCare rebootless patches for CVE-2026-46331 are in active development and testing against the upstream fix. As of the latest coverage status, nothing had been released to the test, main, or ePortal feeds yet. Once a build lands, verify it:
kcarectl --patch-info | grep -i 'CVE-2026-46331'
kcarectl --info | grep kpatch-build-time # build dated on or after the release
2. Block act_pedit if you do not use it
act_pedit auto-loads the moment a pedit tc action is configured. If you run no tc pedit rules – most hosts do not – stop it from loading.
Red Hat’s bulletin (RHSB-2026-008) suggests a boot-time blacklist:
echo 'blacklist act_pedit' > /etc/modprobe.d/blacklist-act-pedit.conf
A blacklist only prevents automatic loading at boot. Because act_pedit can be auto-loaded on demand the moment a rule references it, the more reliable block is an install override that points the module at /bin/true:
echo 'install act_pedit /bin/true' | sudo tee /etc/modprobe.d/disable-act_pedit.conf
Then check whether it is loaded and unload it only if no active traffic rule depends on it:
lsmod | grep -w act_pedit && sudo rmmod act_pedit
lsmod | grep -w act_pedit || echo "act_pedit not loaded"
Revert by removing the file:
sudo rm /etc/modprobe.d/disable-act_pedit.conf
Blast radius: any traffic-control configuration using action pedit will fail to load while the block is active. Some container/CNI and QoS setups depend on it, so do not apply this on hosts that need tc pedit rules. Confirm with tc actions list action pedit before rolling out broadly.
3. Restrict unprivileged user namespaces
The exploit needs an unprivileged user namespace to obtain namespace-local CAP_NET_ADMIN. Closing unprivileged userns breaks the public chain regardless of module state.
# EL family:
sudo sysctl -w user.max_user_namespaces=0
echo 'user.max_user_namespaces = 0' | sudo tee /etc/sysctl.d/99-pedit-cow.conf
# Debian / Ubuntu:
sudo sysctl -w kernel.unprivileged_userns_clone=0
echo 'kernel.unprivileged_userns_clone = 0' | sudo tee /etc/sysctl.d/99-pedit-cow.conf
On Ubuntu you can instead tighten the existing AppArmor controls (kernel.apparmor_restrict_unprivileged_userns / _unconfined), which is what blocks the PoC on 26.04 out of the box.
Compatibility note: unprivileged user namespaces are required by rootless container runtimes, several CI sandboxes, unprivileged unshare(1), sandboxed browsers, and Flatpak. Acceptable on hardened or hosting workloads, disruptive on developer and container hosts. Test before broad rollout.
Decision moment
If the host runs no tc pedit rules → block act_pedit; it is the narrower change. If it needs pedit but not rootless containers or unprivileged unshare → restrict userns instead. If it needs both → patch or rebootless patch is the only real answer; isolate untrusted local execution until then.
KernelCare Rebootless Patch
Status as of 2026-06-23, 18:30 UTC: in active testing under umbrella ticket KCARE-27230. No release on the test, main, or ePortal feeds yet. Per-distro work is tracked under KCARE-27167 (EL10), KCARE-27223 (EL9), KCARE-27159 (EL8), and KCARE-27204 (Debian 13).
Once a build lands on the test feed, apply it with:
kcarectl --update --prefix test
After validation it arrives on the next scheduled run, or pull it on demand:
kcarectl --update
Verify:
kcarectl --patch-info | grep -i 'CVE-2026-46331'
Detection
There is no reliable post-compromise signature for pedit-cow. The corruption lives in the page cache, the on-disk binary is untouched, and the evidence disappears once cached pages are evicted or the system reboots. File-integrity checks are a weak signal here.
The behavioral signals worth hunting:
- Unexpected act_pedit module loads on hosts that do not run traffic-control packet editing.
- Unusual tc activity by users or processes that never normally configure networking.
- Creation of unprivileged user namespaces shortly before setuid-binary execution.
- su, sudo, or shell execution that follows traffic-control activity with no legitimate reason.
Audit tc execution and module loads:
auditctl -w /sbin/tc -p x -k tc_exec
auditctl -w /usr/sbin/tc -p x -k tc_exec
grep act_pedit /proc/modules
If you suspect exploitation, drop the page cache to force pristine bytes to reload from disk:
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
Treat that as containment, not remediation. If an attacker already reached root, eviction does not remove persistence they established afterward. Any host where an untrusted local user had shell access during the exposure window should be treated as potentially compromised.
Why Bugs Like pedit-cow Keep Coming Back
pedit-cow, Dirty Pipe, Copy Fail, and Dirty Frag differ in the details but share one pattern: a performance-oriented fast path making a wrong assumption about whether a page is safe to write. In each case a write reached a page the kernel believed it owned, and the page cache became the victim because it is shared by design – every reader of a file sees the same physical page, so a single bad write into it can become visible to privileged code reading executable bytes.
These bugs are dangerous precisely because they convert “local memory corruption” into something practical. An attacker does not have to defeat file permissions or modify anything on disk. They only need to corrupt the cached copy long enough for privileged code to read or execute it.
The deeper fix is not “stop optimizing.” It is stronger page-ownership guarantees throughout the kernel’s memory-handling paths – slow work, because it touches the most performance-sensitive parts of the kernel. pedit-cow will not be the last bug in this family. It also shows why same-day response keeps getting harder: a vulnerability can travel from an ordinary-looking patch, to a CVE, to a public root exploit before many organizations have a clean operational picture.
Prioritized Remediation Checklist
- Patch. Deploy the vendor-fixed kernel (RHEL 8/9/10, AlmaLinux 8, Debian 13) and reboot. Do not wait on the KernelCare rebootless patch – it is not on any feed yet.
- Mitigate where you can’t patch. Block act_pedit if you run no tc pedit rules, or restrict unprivileged userns if you can spare it.
- Audit local access. Review who has shell on shared hosts, CI/CD runners, build servers, and multi-tenant systems. Revoke what is not needed for the duration.
- Hunt. Run the detection heuristics against the exposure window, starting from the late-May mailing-list posting onward.
- Reboot after patching. This flushes any potentially poisoned cached pages along with the old kernel.
References
- NVD – CVE-2026-46331: https://nvd.nist.gov/vuln/detail/CVE-2026-46331
- CVE.org record – CVE-2026-46331
- GitHub Advisory GHSA-cr2w-747q-47qc
- Red Hat RHSB-2026-008 – Traffic Control Privilege Escalation, and the Red Hat CVE page
- Vendor errata: RHSA-2026:27288 (RHEL 10), RHSA-2026:27789 (RHEL 9), RHSA-2026:27353 (RHEL 8 = AlmaLinux ALSA-2026:27353; RHSA-2026:27355 is the 8.8 EUS/TUS variant), DSA-6355-1 (Debian 13)
- Debian Security Tracker – CVE-2026-46331
- Public PoC (Massimiliano Oldani, 2026-06-17): https://github.com/sgkdev/packet_edit_meme
- netdev thread: v2 and v3 lkml mirrors; thread root on spinics
- Stable fix commits (git.kernel.org/stable/c/<hash>): 899ee91156e5, 2bec122b9fb9, 3dee9d0c198f, b198ed4e5258
- KernelCare tracking: umbrella KCARE-27230; rebootless patch CL gerrit 256818; per-distro KCARE-27167 / 27223 / 27159 / 27204
Patch every kernel, no reboot required. If you are not yet a KernelCare user, now is a good time to see how rebootless patching protects critical Linux systems without emergency maintenance windows or downtime.