Files
linux/drivers/bus/fsl-mc
Danilo Krummrich 6c8dfb0362 bus: fsl-mc: use generic driver_override infrastructure
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]

Tested-by: Ioana Ciornei <[email protected]>
Acked-by: Ioana Ciornei <[email protected]>
Acked-by: Christophe Leroy (CS GROUP) <[email protected]>
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: 1f86a00c11 ("bus/fsl-mc: add support for 'driver_override' in the mc-bus")
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Danilo Krummrich <[email protected]>
2026-04-04 20:41:25 +02:00
..
2025-03-21 09:46:08 +01:00
2025-10-24 21:39:27 +02:00