CVE-2025-40214
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-40214 is a Linux kernel vulnerability in the AF_UNIX garbage collector (GC) caused by an uninitialized scc_index field in the unix_add_edge() function. Under specific conditions involving cyclic socket references and multi-stage socket passing between processes, the GC can incorrectly garbage-collect the receive queue of an alive in-flight socket. The vulnerability was published on December 4, 2025, and affects the Linux kernel across multiple stable branches. It carries an estimated CVSS severity of Medium and has been incorporated into the Android June 2026 security bulletin (Red Hat CVE, Android Bulletin).

Technical details

The root cause is an improper initialization defect (CWE-908: Use of Uninitialized Resource) in the AF_UNIX socket dependency graph management code. When unix_add_edge() allocates a new vertex for a socket and links it to unix_unvisited_vertices, the scc_index field is not initialized. This causes unix_walk_scc_fast() — invoked when unix_graph_grouped is true — to operate on stale index values, leading it to incorrectly classify an alive in-flight socket's SCC and subsequently garbage-collect its receive queue. Exploitation requires a precise three-stage sequence: (1) creating a cyclic reference with many sockets and triggering GC, (2) passing sockets between embryo and self-referencing sockets and triggering GC again, and (3) accepting the embryo socket, passing it further, closing the in-flight socket, and triggering GC a final time (Red Hat CVE, CIRCL).

Impact

Successful exploitation allows a local user to cause the kernel to incorrectly free data structures belonging to active AF_UNIX sockets, resulting in data loss from the affected socket's receive queue and potential kernel instability or crash. The primary impact is a denial of service — either through loss of in-flight IPC data or kernel panic — with no evidence of confidentiality or integrity compromise beyond the affected socket data. The vulnerability is confined to the local system and does not enable remote code execution or lateral movement (Red Hat CVE).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the time of reporting. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.018% (0.000180), reflecting very low probability of near-term exploitation. Exploitation requires local access and a complex, multi-step sequence of AF_UNIX socket operations, significantly raising the bar for practical abuse (Red Hat CVE, Feedly).

Exploitation steps

  1. Setup — Create cyclic reference: As a local user, create a large number of AF_UNIX sockets forming a single cyclic reference graph, then close() all of them and trigger garbage collection (e.g., by sending a file descriptor over a socket).
  2. Stage 2 — Establish in-flight sockets: Create a listener socket (sk-A) and an embryo (sk-B). Pass sk-A to sk-B, and pass a self-referencing socket (sk-X) to itself. Trigger GC again so that sk-A and sk-X are grouped into separate SCCs with scc_index values set, and unix_graph_grouped becomes true.
  3. Stage 3 — Trigger the bug: Call accept() on the embryo sk-B (step 3-a), then pass sk-B to another socket sk-C (step 3-b). At this point, unix_add_edge() allocates a new vertex for sk-B without initializing scc_index. Close the in-flight sk-A (step 3-c), decrementing its file refcount to 1.
  4. Trigger incorrect GC: Trigger GC a final time (step 3-d). Because unix_graph_grouped is true, unix_walk_scc_fast() is invoked and uses the uninitialized scc_index of sk-B's vertex, causing it to misclassify the SCC and garbage-collect the receive queue of the still-alive in-flight socket, resulting in data loss or kernel instability (Red Hat CVE).

Indicators of compromise

  • Logs: Kernel logs (dmesg / /var/log/kern.log) showing unexpected warnings or BUG traces related to af_unix, unix_gc, or unix_walk_scc_fast; messages such as WARN_ON or BUG: unable to handle kernel NULL pointer dereference in the AF_UNIX subsystem.
  • Process Behavior: Unusual local processes creating large numbers of AF_UNIX sockets in rapid succession, or processes repeatedly calling sendmsg() with SCM_RIGHTS to pass file descriptors between sockets in complex patterns.
  • System Stability: Unexpected kernel panics or system instability on hosts with heavy AF_UNIX IPC usage, particularly following sequences of socket creation, passing, and closure.

Mitigation and workarounds

Apply the kernel patches that initialize scc_index in unix_add_edge(), available in multiple stable kernel branches via commits to the stable kernel tree (e.g., commits 1aa7e40e, 4cd8d755, 60e6489f, 20003fbb, db81ad20). Downstream distributions including Ubuntu (USN-8014-1), Debian (DLA-4436-1), SUSE, and Red Hat have issued or are tracking updated kernel packages. For Android devices, the June 2026 security patch level addresses this issue. As a temporary workaround where patching is not immediately feasible, restrict untrusted local users from creating or manipulating AF_UNIX sockets using security policies (e.g., seccomp, AppArmor, or SELinux) (Ubuntu Advisory, Debian LTS, Android Bulletin).

Community reactions

Red Hat has acknowledged the vulnerability and assigned it a Deferred status, indicating it is tracked but not yet addressed in all supported products (Red Hat CVE). The Android June 2026 security bulletin includes this CVE, prompting coverage from technology outlets such as Heise noting critical Android patch day activity (Heise). No significant independent researcher commentary or social media discussion specific to this CVE 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-74730CRITICAL9.8
  • Linux Kernel logoLinux Kernel
  • linux
NoYesAug 22, 2026
CVE-2026-74733HIGH7.8
  • Linux Kernel logoLinux Kernel
  • kernel-64k-debug-devel-matched
NoYesAug 22, 2026
CVE-2026-74726HIGH7.3
  • Linux Kernel logoLinux Kernel
  • kernel
NoYesAug 22, 2026
CVE-2026-74732MEDIUM5.5
  • Linux Kernel logoLinux Kernel
  • kernel-selftests-internal
NoYesAug 22, 2026
CVE-2026-74728NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-debug-modules-core
NoNoAug 22, 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