KernelScan.io

HIGH Introduced in 6.18

devres Revoker Race

CVE-2026-89764

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI6.2MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: rust: devres: fix race between concurrent revokers There is a potential race condition when two paths try to revoke a Devres concurrently. The driver core's devres_release_all() calls Revocable::revoke() via the release callback, while Devres::drop() calls revoke_nosync() on another CPU. The revoker that does not claim the is_available swap returns immediately, but the revoker that did may still be executing drop_in_place() on the inner data. This can cause a use-after-free when the other revoker's caller proceeds to drop adjacent resources that drop_in_place() still references (e.g., Devres<DmaMappedSgt> racing with SGTable freeing the backing sg_table and pages). Fix this by adding a Completion. The release callback signals the Completion after revoke() finishes, and Devres::drop() waits for it when it loses the is_available swap. This ensures the wrapped object is fully torn down before Devres::drop() returns.

02

Engine v0.6.0

Risk summary

A race condition in the Rust device resource management abstraction allows a use-after-free when two paths concurrently revoke a device-managed resource during driver teardown. An attacker with root privileges who can trigger device unbinding (or physical device removal) could exploit the timing window to corrupt kernel heap memory, potentially leading to kernel code execution or a crash.

Affectedrust/kernel/devres.rs (rust devres abstraction)

Vulnerability analysis

When a device is being unbound or a device-managed resource is being freed, two kernel paths can try to clean up the same object at the same time. One path starts destroying the object while the other path returns immediately, wrongly believing the cleanup is finished. The caller that returned early can then free related memory — such as the backing pages for a scatter-gather table — while the first path is still using it, causing a use-after-free. The fix ensures the early-return path waits until the object is fully destroyed before proceeding. The bug can be triggered by a local root user unbinding a device through sysfs, or by physically removing a hot-pluggable device.

03

BranchIntroducedFixed inPatch commit
6.186.186.18.56e7930d857cc7
7.26.187.2.4c7e3d57c705a
mainline6.187.3acc516dfa197