Skip to main content
Meet us at Black Hat USA 2026— Las Vegas, August 1–6Book a Meeting
Mallory
UnratedPublic exploit

PEdit-CoW

IdentifiersCVE-2026-46331CWE-787

CVE-2026-46331 is a Linux kernel vulnerability in the net/sched traffic-control packet editing path, specifically act_pedit and the function tcf_pedit_act(). The bug stems from incorrect copy-on-write range handling: tcf_pedit_act() computed the writable range for skb_ensure_writable() once before iterating over edit keys, using tcfp_off_max_hint, but that hint did not include runtime header offsets introduced by typed keys. As a result, part of the eventual write region could remain outside the copied/writable area, leading to a partial COW condition and an out-of-bounds write into shared backing memory, including page-cache pages. The upstream fix moved skb_ensure_writable() into the per-key loop so the actual write offset is known at the time of validation, added overflow checks for offset arithmetic, used skb_cow() for negative offsets such as Ethernet-header edits at ingress to ensure headroom is copied, and hardened offset_valid() against INT_MIN negation edge cases.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can corrupt shared page-cache memory and thereby compromise system integrity. Public reporting and PoC material indicate this primitive can be turned into local privilege escalation to root by overwriting the cached in-memory image of a setuid-root binary such as /bin/su without modifying the on-disk file. This can evade file-integrity checks that only inspect disk contents. Red Hat also noted the flaw may be used to crash the system, so impact includes privilege escalation and potential denial of service.

Mitigation

If you can’t patch tonight, do this now.

If a patched kernel cannot be deployed immediately, block or blacklist the act_pedit kernel module to prevent the vulnerable packet-editing action from being used. Red Hat guidance also indicates checking whether act_pedit is currently loaded and unloading it or rebooting after blacklisting so the mitigation takes effect. Where operationally acceptable, restricting unprivileged user namespaces can further reduce exploitability on systems where attackers would otherwise obtain namespace-local CAP_NET_ADMIN.

Remediation

Patch, then assume compromise.

Upgrade to a Linux kernel release containing the upstream fix. The fix is reported upstream in mainline v7.1-rc7, with downstream vendor kernels receiving backports. Apply the vendor-provided kernel update for the affected distribution or product rather than cherry-picking individual commits. The remediation specifically includes the act_pedit changes that validate writability per key, add offset overflow checks, use skb_cow() for negative offsets/headroom cases, and guard offset_valid() against INT_MIN.
PUBLIC EXPLOITS

Exploits

2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).

VALID 2 / 3 TOTALView more in app
CVE-2026-46331MaturityPoCVerified exploit

This repository is a compact local privilege escalation proof-of-concept for CVE-2026-46331. It contains two files: a single C exploit source file and a README describing the vulnerability and impact. The main file, CVE-2026-46331.c, is a standalone Linux exploit that builds raw NETLINK_ROUTE messages to configure traffic-control state in the kernel, specifically matchall/pedit-related objects in net/sched. It uses loopback traffic on 127.0.0.1:4445 to exercise the vulnerable act_pedit path and appears to include an integrated write primitive ('pedit_primitive') with calibration support via /tmp/.pedit_calib. The exploit then locates a setuid-root su binary, parses its ELF entry point, and repeatedly writes shellcode into that entry offset through the corruption primitive. After successful corruption, it execve()s the modified su binary to obtain root code execution. This is not a scanner or detector; it is an actual exploit with a hardcoded payload, making it operational rather than a bare PoC. No external C2 or remote infrastructure is present; the exploit is entirely local and relies on vulnerable kernel behavior plus the presence of a usable setuid-root su target.

0xBlackashDisclosed Jun 26, 2026cmarkdownlocal
packet_edit_memeMaturityPoCVerified exploit

Repository contains a standalone local Linux privilege-escalation exploit for CVE-2026-46331 plus a reusable primitive and a verification harness. Structure: (1) pedit_primitive.c/.h implement the core page-cache overwrite primitive by configuring tc/netlink state on the loopback interface and abusing net/sched act_pedit to write beyond a stale COW range into page-cache-backed data sent via sendfile; setup() prepares loopback networking, opens a local TCP listener on 127.0.0.1:4445, and calibrates the file-offset delta using /tmp/.pedit_calib. api_fd_write() exposes the primitive as bounded 4-byte-slot writes to an arbitrary file descriptor, including O_RDONLY descriptors. (2) test_cve.c is a non-privilege-escalation testcase that creates /tmp/cve_target, reopens it read-only, performs 10 overwrite attempts at varying offsets/sizes, and verifies that the page cache changed despite only holding an O_RDONLY fd. (3) packet_edit_meme.c weaponizes the primitive into unprivileged local root: it locates a setuid-root su binary, parses ELF headers to find the executable entry-point file offset, forks a child that unshares user and network namespaces, maps itself to uid/gid 0 inside the namespace, calls setup(), and writes x86_64 shellcode over the cached su entry point. The parent then execves su from the initial namespace, causing the setuid-root binary to execute the injected shellcode and spawn an interactive root /bin/sh. Ubuntu-specific logic optionally re-execs through aa-exec with profiles trinity/chrome/flatpak to bypass AppArmor userns restrictions. Overall, this is a real exploit repository, not just a detector: it provides both a generic arbitrary page-cache overwrite primitive and an operational local root exploit payload.

sgkdevDisclosed Jun 17, 2026cmakefilelocal
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
LinuxLinux Kerneloperating_system
Rocky LinuxKerneloperating_system
Rocky LinuxKernel-Rtoperating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

ACTIVITY FEED

Recent activity

48 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity37

Community discussion across Reddit, Mastodon, and other social sources.