CVE-2026-31504
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2026-31504 is a use-after-free (UAF) race condition vulnerability in the Linux kernel's packet socket implementation, specifically within the packet_release() function. It affects the Linux kernel from version 3.1 through multiple stable branches, with fixed versions including 5.10.253, 5.15.203, 6.1.168, 6.6.131, 6.12.80, 6.18.21, and 6.19.11. The vulnerability was disclosed on April 22, 2026, and was discovered through an AI-assisted audit (using Claude Code) following a related bug, CVE-2025-38617. It carries a CVSS v3.1 base score of 7.8 (High) (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is a race condition (CWE-364) combined with a use-after-free condition (CWE-416) in the Linux kernel's net/packet subsystem. When packet_release() is called to close a packet socket, it does not zero the po->num field while holding bind_lock. After bind_lock is released, a concurrent packet_notifier(NETDEV_UP) event — which has already found the socket in sklist — can re-register the socket hook by calling __fanout_link(sk, po). This re-registration adds the socket back into the fanout group's f->arr[] array and increments f->num_members, but critically does not increment f->sk_ref, leaving a dangling pointer in the fanout array that can be dereferenced after the socket is freed. The fix zeroes po->num inside packet_release() while bind_lock is held, closing the race window (GitHub Advisory).

Impact

Successful exploitation allows a local attacker with low privileges to cause memory corruption via the dangling pointer left in the fanout array, potentially leading to arbitrary code execution, kernel information disclosure, or a system crash (denial of service). All three security dimensions — confidentiality, integrity, and availability — are rated HIGH in the CVSS assessment. Exploitation could enable privilege escalation to root on affected systems, with potential for lateral movement in multi-tenant or containerized environments where packet sockets are accessible (GitHub Advisory, Red Hat Bugzilla).

Exploitability

As of the time of disclosure, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (GitHub Advisory). The EPSS score is approximately 0.024% (0.000240), reflecting a low probability of near-term exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires precise timing to trigger the race condition and a specifically configured packet socket with fanout enabled, raising the practical bar for attackers.

Exploitation steps

  1. Gain local access: Obtain a low-privilege local user account on a vulnerable Linux system (kernel versions 3.1.1 through the unpatched stable branches).
  2. Create a fanout packet socket: Use socket(AF_PACKET, SOCK_RAW, ...) to create a raw packet socket and join it to a fanout group using setsockopt(SO_PACKET_FANOUT), binding it to a specific network interface.
  3. Trigger concurrent NETDEV_UP event: Arrange for the bound network interface to go down and come back up (e.g., via ip link set <iface> down/up) concurrently with closing the socket, to generate a NETDEV_UP notification.
  4. Race packet_release() with packet_notifier(): Close the fanout socket (triggering packet_release()) while the concurrent NETDEV_UP notifier is processing. If the race is won, __fanout_link() re-adds the freed socket into f->arr[], creating a dangling pointer.
  5. Exploit the UAF: Trigger a subsequent kernel operation that dereferences the dangling pointer in the fanout array to achieve memory corruption, potentially leading to privilege escalation or kernel crash.

Indicators of compromise

  • Logs: Kernel oops or BUG messages in /var/log/kern.log or dmesg referencing packet_release, fanout_release, or __fanout_link with use-after-free or null pointer dereference traces.
  • Logs: KASAN (Kernel Address Sanitizer) reports indicating use-after-free in net/packet/af_packet.c around packet_release() or fanout functions.
  • Process: Unusual processes repeatedly creating and closing AF_PACKET raw sockets (visible via ss -a or /proc/net/packet) combined with rapid interface state changes.
  • Network: Repeated ip link set or equivalent interface up/down cycling on a specific interface correlated with packet socket activity from a low-privilege user.
  • File System: Unexpected privilege escalation artifacts (new SUID binaries, modified /etc/passwd, new cron entries) following kernel memory corruption exploitation.

Mitigation and workarounds

Apply the official kernel patches immediately. Fixed versions are: 5.10.253, 5.15.203, 6.1.168, 6.6.131, 6.12.80, 6.18.21, and 6.19.11 (GitHub Advisory). Distribution-specific updates are available from Ubuntu (USN-8280-1, USN-8277-2, USN-8279-2, USN-8280-2, USN-8305-1, USN-8351-1, USN-8361-1, USN-8374-1), SUSE (SUSE-SU-2026:2068-1, SUSE-SU-2026:2111-1, SUSE-SU-2026:2195-1, SUSE-SU-2026:2217-1, SUSE-SU-2026:2238-1), Amazon Linux 2023, Debian, and openSUSE. As a temporary workaround, restrict unprivileged user access to AF_PACKET socket creation by setting net.core.rmem_default restrictions or using seccomp/AppArmor/SELinux policies to block socket(AF_PACKET, ...) calls for untrusted users where operationally feasible (Red Hat Bugzilla).

Community reactions

The vulnerability was noted as being discovered through an AI-assisted code audit using Claude Code, following a related bug (CVE-2025-38617), which drew some attention in the Linux kernel security community as an example of AI-assisted vulnerability research. Multiple Linux distributions (Ubuntu, SUSE, Amazon Linux, Debian, openSUSE) responded promptly with security advisories and updated kernel packages. No significant broader media coverage or notable researcher commentary beyond standard distribution security notices has been observed.

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-64597CRITICAL9.8
  • Linux Kernel logoLinux Kernel
  • linux-aws-5.4
NoYesAug 06, 2026
CVE-2026-68480HIGH8.8
  • Linux Kernel logoLinux Kernel
  • kernel-modules-partner
NoYesAug 06, 2026
CVE-2026-64598HIGH8.8
  • Linux Kernel logoLinux Kernel
  • linux-gcp-6.8
NoYesAug 06, 2026
CVE-2026-64604HIGH7.7
  • Linux Kernel logoLinux Kernel
  • linux-riscv-5.15
NoYesAug 06, 2026
CVE-2026-64603NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-intel-iotg-5.15
NoYesAug 06, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management