On 3/24/26 01:59, Danilo Krummrich wrote:
When a driver is probed through __driver_attach(), the bus' match()
callback is called without the device lock held, thus accessing the
driver_override field without a lock, which can cause a UAF.

Fix this by using the driver-core driver_override infrastructure taking
care of proper locking internally.

Note that calling match() from __driver_attach() without the device lock
held is intentional. [1]

Link:https://lore.kernel.org/driver-core/[email protected]/ 
[1]
Reported-by: Gui-Dong Han<[email protected]>
Closes:https://bugzilla.kernel.org/show_bug.cgi?id=220789
Fixes: ebc3d1791503 ("s390/cio: introduce driver_override on the css bus")
Signed-off-by: Danilo Krummrich<[email protected]>
---

Thank you Danilo.

Reviewed-by: Vineeth Vijayan <[email protected]>

Reply via email to