CVE-2026-99835: Linux kernel packet sockets charge an oversized TX_RING frame to socket memory before rejecting it, saturating a refcount and freeing a live socket

ByLinuxtastic

December 3, 2026 #CVE, #Linux Kernel

Packet sockets with a memory-mapped transmit ring let a process queue raw frames for a device without a system call per frame. The kernel CNA record says the ring’s frame builder “adds the full non-linear payload length to skb->truesize and sk_wmem_alloc before checking MAX_SKB_FRAGS. With PACKET_VNET_HDR, userspace can submit a ring-sized frame even when it greatly exceeds the device MTU. A near-INT_MAX frame can saturate sk_wmem_alloc before the fragment loop rejects it. A subsequent refcount_add(0x40000001) can temporarily turn REFCOUNT_SATURATED into 1. A concurrent TX completion can then drop that apparent last reference and free the still-live packet socket.” The CNA and Red Hat score it 7.8; Red Hat notes it needs CAP_NET_RAW, which “systems with unprivileged user namespaces enabled” let a local user obtain. Upgrade to a kernel at or above 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.63 or 7.3.4 and reboot; on a shared host that cannot yet, disabling unprivileged user namespaces removes the path for ordinary users.

CVE-2026-99835 at a glance.

ComponentLinux kernel, AF_PACKET (net/packet/af_packet.c): tpacket_fill_skb(), the TX_RING frame builder, with PACKET_VNET_HDR
Affected versionsevery kernel since the transmit ring was added (Fixes: 69e3c75f4d54, “net: TX_RING and packet mmap”, 2.6.31): 2.6.31 up to 5.10 before 5.10.275, 5.15 before 5.15.226, 6.1 before 6.1.193, 6.6 before 6.6.163, 6.12 before 6.12.117, 6.18 before 6.18.63, 7.3 before 7.3.4 and 7.4 before 7.4-rc1 (note the 6.12, 6.18 and 7.3 fix points are two releases earlier than the rest of the 30 November set)
Fixed inmainline 7.4-rc1 (commit dc4dd12f, the one Debian cites) and stable 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.63, 7.3.4. One file, +6/−6: the remaining payload plus the initial page offset is checked against MAX_SKB_FRAGS pages before any accounting, with a rate-limited warning and -EFAULT; the per-iteration check inside the fragment loop is removed
SeverityKernel CNA CVSS 3.1 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H); NVD shows the CNA metric only; Red Hat Important, 7.8 on the same vector (draft, CWE-911), bug 2586520 “Use-after-free in packet sockets via oversized transmit ring frames”
Exploited in the wildNot on the CISA KEV catalogue (2026.11.30). EPSS: no score yet on 2 December 2026 (the API had no entry)
Who is exposedAny host where a local process can open a packet socket: that needs CAP_NET_RAW, which root and network daemons have and which an unprivileged user gets inside a user namespace wherever those are enabled (kernel.unprivileged_userns_clone or user.max_user_namespaces non-zero, the default on most desktops and many servers). Containers running as root with NET_RAW in their capability set, the Docker default, are in the path too
PublishedCVE record 30 November 2026 (kernel CNA); this page built 2 December 2026, last updated 2 December 2026

What it is

A TX_RING packet socket maps a ring of frame slots into the process, and the kernel’s tpacket_fill_skb() turns each slot into a socket buffer: it copies or maps the payload into page fragments, charges the bytes to skb->truesize and to the socket’s write-memory counter sk_wmem_alloc, and hands the buffer to the device. With the PACKET_VNET_HDR option the frame carries a virtio header and may legitimately exceed the MTU, because the device or the host is expected to segment it.

The record traces the chain from there. The accounting happened before the builder checked whether the payload fits in MAX_SKB_FRAGS pages, so a frame near INT_MAX bytes was charged in full before being rejected, and sk_wmem_alloc, a saturating refcount, pinned at REFCOUNT_SATURATED. The saturated state is meant to be sticky, but a following refcount_add(0x40000001) wraps it momentarily to 1, and if a transmit completion on another CPU drops a reference in that window, it looks like the last one: the packet socket is freed while still in use, before refcount_warn_saturate() restores the counter. That is a use-after-free on a socket structure, triggerable by anyone who can create the socket and drive the ring.

The fix, by Kyle Zeng with Eric Dumazet’s edits and reviewed by Willem de Bruijn, moves the fragment-budget check to the top of the function, including the initial page offset in the arithmetic, and rejects the frame with a rate-limited warning and the same -EFAULT before a byte is accounted; the old check inside the loop goes away. The record says this “preserves the accepted packet sizes and error code”. The commit carries Cc: stable, which is why it reached 6.12.117, 6.18.63 and 7.3.4 ahead of the other fixes in this batch. git.kernel.org refuses automated readers, so the commit was read on GitHub.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 2 December 2026; the link in the row is the tracker page, which will be newer than this one. Because the fix landed in stable two releases earlier than the rest of the set, trixie’s current kernel already has it.

DistributionStatusFixed package
AlpineNot consulted for this page: the Alpine tracker refused the automated reader on 2 December 2026—
Debianbookworm (6.1.176-1, security 6.1.192-3) vulnerable; trixie fixed in 6.12.117-1 (security 6.12.118-1); fixed in forky and sid (7.3.4-1); no DSAtrixie 6.12.117-1; unstable 7.3.4-1
UbuntuNot consulted for this page: the Ubuntu CVE page refused the automated reader on 2 December 2026 (client error); the Ubuntu row will be filled when the page can be read—
RHEL, Rocky, Alma, CentOS StreamImportant, 7.8 (bug 2586520, CWE-911); kernel affected on RHEL 6, 7, 8, 9 and 10 (and kernel-rt on 7, 8, 9); OpenShift 4 and 5 CoreOS affected; no errata on 2 December 2026nothing released on 2 December 2026
openSUSE/SLENot consulted: suse.com refused the automated reader on 2 December 2026 (client error)—
Fedora, Arch; self-built kernelsNot consulted; upstream stable versions apply5.10.275 / 5.15.226 / 6.1.193 / 6.6.163 / 6.12.117 / 6.18.63 / 7.3.4 or later

How to check

Two questions: is the running kernel below the fixed version for its series, and can an unprivileged local user obtain CAP_NET_RAW here, which in practice means whether unprivileged user namespaces are enabled or containers carry the capability.

# 1. the running kernel against the fixed version for its series
uname -r        # fixed: 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.63, 7.3.4 or later

# 2. can an ordinary user get CAP_NET_RAW through a user namespace
sysctl user.max_user_namespaces                  # 0 = no user namespaces at all
sysctl kernel.unprivileged_userns_clone 2>/dev/null   # Debian/Ubuntu knob; 0 = root only
sysctl kernel.apparmor_restrict_unprivileged_userns 2>/dev/null   # Ubuntu 24.04+: 1 = restricted

# 3. who already holds the capability outright
getcap -r /usr/bin /usr/sbin 2>/dev/null | grep net_raw
docker info 2>/dev/null | grep -i -A1 'Default Runtime'   # Docker containers get NET_RAW by default

A kernel at or above the fixed version is done. If user.max_user_namespaces is 0, or the Debian and Ubuntu knobs restrict unprivileged namespaces, an ordinary user cannot reach CAP_NET_RAW and the path is limited to root, to binaries with the file capability and to containers whose capability set includes it. On a default desktop or an unhardened server the namespace knob is open and any local user is in the path. The log signature is a refcount_t: saturated; leaking memory or refcount_t: underflow warning from refcount_warn_saturate with af_packet frames in the trace, followed by a use-after-free splat if KASAN is on.

How to fix it

Install the fixed kernel and reboot. Debian trixie, forky and sid already had it; bookworm, Ubuntu and Red Hat had it pending on 2 December. The record lists no mitigation; taking CAP_NET_RAW away from unprivileged users is the operational one.

# Debian trixie / forky / sid (bookworm once a security update names this CVE)
apt update && apt install linux-image-amd64 && systemctl reboot
# Ubuntu, RHEL family, SUSE: when the pending builds land
apt update && apt full-upgrade && systemctl reboot
dnf update kernel && systemctl reboot
zypper patch && systemctl reboot
# Interim on a shared host: keep unprivileged users out of user namespaces until the kernel is fixed
sysctl -w user.max_user_namespaces=0                   # any distribution (breaks rootless Podman/Flatpak)
sysctl -w kernel.unprivileged_userns_clone=0           # Debian/Ubuntu
sysctl -w kernel.apparmor_restrict_unprivileged_userns=1   # Ubuntu 24.04+
# containers: drop the capability where it is not needed
docker run --cap-drop NET_RAW ...

Setting user.max_user_namespaces to 0 also stops rootless Podman, Flatpak sandboxes and browser sandboxes that rely on namespaces, so on a desktop it is a real cost; the Ubuntu AppArmor knob is the gentler option there. Dropping NET_RAW from containers is cheap and almost always safe, since few workloads need raw sockets. What not to do: do not treat “no one here has a packet socket open” as a check; the trigger creates its own socket, and the question is who is allowed to.

Sources

  • CVE-2026-99835 at CVE.org — the kernel CNA record: the “adds the full non-linear payload length to skb->truesize and sk_wmem_alloc before checking MAX_SKB_FRAGS” and “free the still-live packet socket” sentences, the 2.6.31 lower bound, the git ranges with the earlier 6.12.117/6.18.63/7.3.4 fix points, the single file (30 November 2026)
  • Fix commit dc4dd12f (mainline, 7.4-rc1) and the stable backports in the record; git.kernel.org refuses automated readers, so it was read on GitHub: Kyle Zeng with Eric Dumazet’s edits, committed by Jakub Kicinski, Reviewed-by Willem de Bruijn, Fixes: 69e3c75f4d54 (“net: TX_RING and packet mmap”), Cc: stable yes, one file +6/−6
  • NVD entry — Received on 30 November 2026; shows the CNA’s 7.8 as its only metric, no NVD score or CWE on 2 December
  • Distribution trackers: Debian (bookworm vulnerable, trixie fixed in 6.12.117-1, forky and sid fixed in 7.3.4-1) · Ubuntu (page refused the automated reader on 2 December) · Red Hat (Important 7.8, bug 2586520, kernel affected on RHEL 6-10) · SUSE and Alpine (both refused the automated reader on 2 December)
  • CISA KEV catalogue 2026.11.30, not listed · EPSS no score yet on 2 December 2026

Related reading

This advisory page was assembled from the primary sources listed above on 2 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.