In the Linux kernel, the following vulnerability has been resolved:
driver core: enforce devicelock for drivermatch_device()
Currently, drivermatchdevice() is called from three sites. One site (__deviceattachdriver) holds devicelock(dev), but the other two (bindstore and _driverattach) do not. This inconsistency means that bus match() callbacks are not guaranteed to be called with the lock held.
Fix this by introducing drivermatchdevicelocked(), which guarantees holding the device lock using a scoped guard. Replace the unlocked calls in bindstore() and _driverattach() with this new helper. Also add a lock assertion to drivermatchdevice() to enforce this guarantee.
This consistency also fixes a known race condition. The driveroverride implementation relies on the devicelock, so the missing lock led to the use-after-free (UAF) reported in Bugzilla for buses using this field.
Stress testing the two newly locked paths for 24 hours with CONFIGPROVELOCKING and CONFIG_LOCKDEP enabled showed no UAF recurrence and no lockdep warnings.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31688.json",
"cna_assigner": "Linux"
}