
Cloud Vulnerability DB
A community-led vulnerabilities database
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).
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).
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).
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.
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.ip link set <iface> down/up) concurrently with closing the socket, to generate a NETDEV_UP notification.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./var/log/kern.log or dmesg referencing packet_release, fanout_release, or __fanout_link with use-after-free or null pointer dereference traces.net/packet/af_packet.c around packet_release() or fanout functions.AF_PACKET raw sockets (visible via ss -a or /proc/net/packet) combined with rapid interface state changes.ip link set or equivalent interface up/down cycling on a specific interface correlated with packet socket activity from a low-privilege user./etc/passwd, new cron entries) following kernel memory corruption exploitation.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).
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.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."