Linux kernel dropped node refcount update in rust_binder thread exit
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.577.2.117.3In the Linux kernel, the following vulnerability has been resolved:
rust_binder: reschedule node refcount update on thread exit
When a thread exits via BINDER_THREAD_EXIT, its pending work items are cancelled. If a thread exits while holding a pending node refcount increment (e.g. pushed as deferred work to that thread), the refcount increment was previously dropped because Node::cancel() and NodeWrapper::cancel() were no-ops.
Dropping the refcount update leaves the node's delivery state and count state desynchronized, and userspace will not receive the notification, which can cause the node to never be freed from the process's nodes tree when all external references are dropped.
Fix this by implementing DeliverToRead::cancel() for Node and NodeWrapper to move the pending refcount update to the process's work queue on thread exit so another thread can deliver it to userspace.
From the CVE record · Linux
In the Linux kernel’s rust_binder component, a pending node refcount update can be dropped when a thread exits via BINDER_THREAD_EXIT. Under that condition, userspace may miss a notification and the node may remain in the process’s nodes tree after all external references are dropped. The input does not establish an attacker access requirement or a separate user-interaction requirement.
Engineers running Linux kernels with rust_binder should check their versions against the vendor advisory; affected versions were not provided.