CVE-2026-31504: net: fix fanout UAF in packet_release() via NETDEV_UP race
In the Linux kernel, the following vulnerability has been resolved:
net: fix fanout UAF in packet_release() via NETDEV_UP race
`packet_release()` has a race window where `NETDEV_UP` can re-register a
socket into a fanout group's `arr[]` array. The re-registration is not
cleaned up by `fanout_release()`, leaving a dangling pointer in the fanout
array.
`packet_release()` does NOT zero `po->num` in its `bind_lock` section.
After releasing `bind_lock`, `po->num` is still non-zero and `po->ifindex`
still matches the bound device. A concurrent `packet_notifier(NETDEV_UP)`
that already found the socket in `sklist` can re-register the hook.
For fanout sockets, this re-registration calls `__fanout_link(sk, po)`
which adds the socket back into `f->arr[]` and increments `f->num_members`,
but does NOT increment `f->sk_ref`.
The fix sets `po->num` to zero in `packet_release` while `bind_lock` is
held to prevent NETDEV_UP from linking, preventing the race window.
This bug was found following an additional audit with Claude Code based
on CVE-2025-38617.
Security readout for executives and security teams
Plain-English summary
A race in the Linux kernel’s packet-socket cleanup can leave a freed socket referenced by a fanout group. A local, low-privileged attacker able to reach the relevant packet-socket behavior could potentially corrupt kernel memory, threatening confidentiality, integrity, and availability. The supplied evidence does not establish active exploitation.
Executive priority
Treat this as a high-priority kernel update for multi-user hosts, container platforms, and appliances exposing relevant local packet-socket capabilities. It is not evidenced as an emergency internet-scale threat, but possible kernel compromise warrants prompt exposure assessment and deployment through normal tested maintenance procedures.
Technical view
During packet_release(), a concurrent NETDEV_UP notification can relink a socket into the fanout array after cleanup has begun, without increasing the associated reference count. This leaves a dangling pointer and creates a use-after-free condition. The fix clears po->num while bind_lock is held, preventing the relink race.
Likely exposure
Exposure is limited to Linux systems where a local account or workload can exercise the affected packet fanout socket path during network-device activation. The supplied affected-version encoding is ambiguous and should not be interpreted as clean version ranges. Confirm exposure using distribution or appliance-vendor advisories and backport records.
Exploitation context
CVSS 3.1 is 7.8: local access, low complexity, low privileges, no user interaction, and potentially high confidentiality, integrity, and availability impact. The CVE is not listed as KEV in the bundle, and no supplied source establishes active exploitation, a public exploit, or reliable real-world exploitation.
Researcher notes
The security defect is a fanout-array use-after-free caused by asymmetric relinking and reference accounting during a NETDEV_UP race. Practical exploitability is not demonstrated in the supplied evidence. Version applicability needs vendor confirmation because the record’s version list mixes releases and commit identifiers without clearly expressed ranges.
Mitigation direction
Install the applicable vendor kernel update containing this fix or an equivalent backport.
Prioritize shared systems where untrusted local users or workloads can access packet fanout sockets.
If updates are unavailable, obtain product-specific mitigation guidance from the Linux distribution or appliance vendor.
Validation and detection
Record each system’s kernel release, distribution build, and vendor patch level.
Check vendor advisories or changelogs for CVE-2026-31504 or the referenced stable commits.
Verify the applied patch clears po->num inside packet_release() while bind_lock is held.
Reassess systems after reboot to confirm the updated kernel is running.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2026-31504 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
11Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.