CVE-2026-143002: misc: vmw_vmci: wait for callbacks in event unsubscribe
In the Linux kernel, the following vulnerability has been resolved:
misc: vmwvmci: wait for callbacks in event unsubscribe
eventdeliver() calls the callbacks of the subscribers inside an RCU read side critical section. vmcieventunsubscribe() used to call synchronizercu() before it freed the subscription. This did more than to protect the struct vmcisubscription: when the function returned, no callback was running any more, and its callers rely on that.
vmcitransportfreeresources() unsubscribes from VMCIEVENTQPPEERDETACH and frees the struct vmcitransport, which is the callback data, a few lines later:
CPU0 CPU1 eventdeliver() rcureadlock() vmcitransportpeerdetachcb() vmcieventunsubscribe() listdelrcu(&s->node) kvfreercumightsleep(s) kfree(transport) spinlockbh(&trans->lock)
The event is sent when the peer of the queue pair detaches, so the other end of a vsock connection chooses the time. vmcitransportexit() and vmciguestremovedevice() unsubscribe callbacks which are gone with their module.
kvfreercumightsleep() only waits for a grace period if it cannot allocate memory. Bring the synchronizercu() back. The cleanup work of the vmci transport now waits for one grace period per socket again.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Restore synchronize_rcu() in vmci_event_unsubscribe() before freeing the subscription, so outstanding RCU callbacks have finished.
Event History
Frequently Asked Questions
What attacker-controlled action can trigger the unsafe timing?
The event is generated when the peer of a queue pair detaches. The other end of a vsock connection chooses when that detach occurs, allowing it to influence the timing of the callback relative to cleanup.
Which resources can be freed while a callback is still active?
vmci_transport_free_resources() unsubscribes from the VMCI_EVENT_QP_PEER_DETACH event and then frees the associated vmci_transport structure, which is callback data. The affected cleanup behavior could therefore leave a callback accessing transport data after that data has been freed.