⚠️

سلب مسئولیت و اخلاق حرفه‌ای

این مطالب صرفاً برای اهداف آموزشی، پژوهشی و افزایش آگاهی امنیتی ارائه شده‌اند. هرگونه استفاده غیرمجاز، غیرقانونی یا سوءاستفاده از اطلاعات، ابزارها و روش‌های مطرح‌شده، کاملاً بر عهده مخاطب است. نویسنده و منتشرکننده هیچ مسئولیتی در قبال خسارات، آسیب‌ها یا پیامدهای ناشی از استفاده نادرست از این مطالب نخواهند داشت.

CVE-2026-143002: Linux Kernel VMCI Event-Subscribe Race Resurfaces a Kernel Use-After-Free Risk | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-143002: Linux Kernel VMCI Event-Subscribe Race Resurfaces a Kernel Use-After-Free Risk

Executive summary

CVE-2026-143002 describes a race condition in the misc: vmw_vmci subsystem of the Linux kernel. The defect sits in the interaction between event delivery and event-unsubscribe paths, and a peer-detach event over a VMCI queue pair can cause vmci_transport_peer_detach_cb() to continue running after vmci_event_unsubscribe() has already returned and the owning struct vmci_transport has been freed. The upstream resolution reintroduces synchronize_rcu() inside vmci_event_unsubscribe() so the cleanup path once again waits for outstanding callbacks to drain.

Technical background

VMCI is the paravirtualized communication interface used between VMware guest kernels and the host. The Linux side exposes a transport layer (the vmci_transport) used by vsock sockets built on top of VMCI queue pairs. Subscribers attach to events such as VMCI_EVENT_QP_PEER_DETACH, which fires when the other side of a queue pair tears the connection down. Because VMCI is invoked from kernel context and from event-driven paths, subscription lifetime must be synchronized carefully with code that walks the subscriber list.

The mechanism in question is:

  • event_deliver() walks the subscriber list inside an RCU read-side critical section and invokes each callback.

  • vmci_event_unsubscribe() previously called synchronize_rcu() before freeing the struct vmci_subscription, which not only protected the subscription object itself but also guaranteed that no callback was still executing when the function returned. Several callers depend on that latter guarantee.

  • The cleanup logic was changed to use kvfree_rcu_mightsleep(), which only waits for a grace period when it cannot allocate memory for an internal bounce buffer. After that change, vmci_event_unsubscribe() could return while a detached callback was still active.

The race window

The advisory sketches the problematic interleaving on two CPUs:

  • CPU0 enters event_deliver(), takes the RCU read lock, and begins executing vmci_transport_peer_detach_cb() against a still-live struct vmci_transport.

  • CPU1 simultaneously calls vmci_event_unsubscribe(), removes the subscription node with list_del_rcu(&s->node), schedules the subscription for deferred free via kvfree_rcu_mightsleep(s), and then immediately kfree()s the transport. A later spin_lock_bh(&trans->lock) inside the still-running callback operates on memory that is no longer owned by the kernel.

This is a classic callback-lifetime bug: the read-side critical section that protects the callback is observed correctly, but the caller that owns the callback data assumes a stronger synchronization guarantee than the primitives actually provide. The peer controls the timing of VMCI_EVENT_QP_PEER_DETACH, which means a remote endpoint can decide when the relevant detach event is delivered, narrowing the timing dependency but not guaranteeing reachability from an unprivileged guest.

Affected systems

  • Component: Linux kernel, misc: vmw_vmci driver, specifically the vmci_event_unsubscribe(), event_deliver(), and vmci_transport_free_resources() paths tied to VMCI_EVENT_QP_PEER_DETACH.

  • Subsystems relied on: the VMCI transport and the vsock socket family when VMCI-backed.

  • Affected kernel versions: the advisory does not enumerate the precise set of vulnerable upstream releases. Operators should treat this as affecting any kernel tree that carries the modified vmci_event_unsubscribe() path without the reinstated synchronize_rcu() and should consult their distribution vendor or the upstream commit referenced from CVE-2026-143002 for a version range.

  • Exposure surface: hosts and guests that enable VMCI and use VMCI-backed vsock connections. Systems without VMCI, without VMware hypervisor integration, or where the transport is not loaded are not reachable through this code path.

Mitigation

  • Primary mitigation: apply the upstream fix that brings synchronize_rcu() back into vmci_event_unsubscribe(). The advisory states that the cleanup path will once again wait for an RCU grace period per socket. Distribution vendors should be checked for backported patches referencing CVE-2026-143002.

  • Workaround if patching is delayed: where the workload does not require VMCI, disable VMCI / the VMCI-backed vsock transport so that the affected code path is not exercised. Restrict the ability of untrusted local guests to repeatedly create and tear down VMCI queue pairs if VMCI must remain enabled.

  • Detection and monitoring: watch for kernel warnings, KASAN use-after-free reports, or hangs and crashes referencing vmci_transport_peer_detach_cb, vmci_event_unsubscribe, event_deliver, the VMCI driver, or vsock socket teardown. Correlate these with VMCI queue-pair detach events and rapid vsock connect/disconnect churn inside guests. Absence of such signals does not rule out the vulnerability, because the race may complete without an obvious diagnostic.

What is and is not known

  • Known: the upstream description of the defect, the code locations involved, the fix strategy, and the trigger event (VMCI_EVENT_QP_PEER_DETACH).

  • Not specified in the available advisory: a definitive set of vulnerable kernel versions, a CVSS vector or score, the upstream commit hash of the fix, vendor backport lists, or any proof-of-concept or exploitation evidence.

  • The item is not listed on the CISA KEV catalog based on the source intelligence available here.

Because the supplied intelligence does not include a CVSS score, no KEV listing, and no exploitation evidence, the practical risk is currently assessed as low. The underlying defect is technically exploitable in principle, but the conditions required to win the race deterministically, repeat it from an unprivileged guest, and chain it into a stable privilege-escalation primitive are not demonstrated by the advisory alone.

منابع

·
← اخبار