CVE-2026-31688

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
27/04/2026
Last modified:
27/04/2026

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> driver core: enforce device_lock for driver_match_device()<br /> <br /> Currently, driver_match_device() is called from three sites. One site<br /> (__device_attach_driver) holds device_lock(dev), but the other two<br /> (bind_store and __driver_attach) do not. This inconsistency means that<br /> bus match() callbacks are not guaranteed to be called with the lock<br /> held.<br /> <br /> Fix this by introducing driver_match_device_locked(), which guarantees<br /> holding the device lock using a scoped guard. Replace the unlocked calls<br /> in bind_store() and __driver_attach() with this new helper. Also add a<br /> lock assertion to driver_match_device() to enforce this guarantee.<br /> <br /> This consistency also fixes a known race condition. The driver_override<br /> implementation relies on the device_lock, so the missing lock led to the<br /> use-after-free (UAF) reported in Bugzilla for buses using this field.<br /> <br /> Stress testing the two newly locked paths for 24 hours with<br /> CONFIG_PROVE_LOCKING and CONFIG_LOCKDEP enabled showed no UAF recurrence<br /> and no lockdep warnings.

Impact