CVE-2026-31504
HighIn 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.
CVSS 3.1 score
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness type
CWE-416CVE-2026-31504 is a Use After Free vulnerability
What is Use After Free?
The product references memory after it has been freed, which may cause it to crash, use unexpected values, or execute code. Learn more on MITRE CWE
Affected versions
Linux kernel versions
3.1
and later are affected. Fixed in
5.10.253,
5.15.203,
6.1.168,
6.6.131,
6.12.80,
6.18.21,
6.19.11,
7.0
and their respective stable series.
References
The following references provide additional information about CVE-2026-31504 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/1b4c03f8892d955385c202009af7485364731bb9
-
PatchKernel patch commithttps://git.kernel.org/stable/c/42156f93d123436f2a27c468f18c966b7e5db796
-
PatchKernel patch commithttps://git.kernel.org/stable/c/42cfd7898eeed290c9fb73f732af1f7d6b0a703e
Frequently asked questions
-
What is CVE-2026-31504?
CVE-2026-31504 is a High severity Linux kernel vulnerability with a CVSS score of 7.8 out of 10 , classified as an Use After Free flaw (CWE-416) . It affects Linux kernel versions from 3.1 onward and has been patched in 5.10.253, 5.15.203, 6.1.168 and others. CVE-2026-31504 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2026-31504?
CVE-2026-31504 has a CVSS score of 7.8 out of 10, rated High severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. -
Is there a patch available for CVE-2026-31504?
Yes — CVE-2026-31504 has been patched. Fixed versions include 5.10.253, 5.15.203, 6.1.168 and others. If you are running Linux kernel 3.1 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2026-31504 actively exploited?
No — CVE-2026-31504 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Use After Free (CWE-416)?
The product references memory after it has been freed, which may cause it to crash, use unexpected values, or execute code. View CWE-416 on MITRE CWE →