Files
linux-stable-mirror/include/linux
Danilo Krummrich 492349e5e4 driver core: platform: use generic driver_override infrastructure
[ Upstream commit 2b38efc05b ]

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/DGRGTIRHA62X.3RY09D9SOK77P@kernel.org/ [1]
Reported-by: Gui-Dong Han <hanguidong02@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220789
Fixes: 3d713e0e38 ("driver core: platform: add device binding path 'driver_override'")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20260303115720.48783-5-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: David Sauerwein <dssauerw@amazon.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-06-01 17:43:04 +02:00
..
2026-03-04 07:19:34 -05:00
2026-03-04 07:20:03 -05:00
2025-11-02 22:14:42 +09:00
2026-03-25 11:05:40 +01:00
2025-09-11 17:20:27 +02:00
2026-01-11 15:22:07 +01:00
2025-07-06 11:00:16 +02:00
2026-01-11 15:21:37 +01:00
2026-05-23 13:03:24 +02:00
2025-08-15 12:08:42 +02:00
2026-01-11 15:21:52 +01:00
2026-03-04 07:19:32 -05:00
2025-08-01 09:47:30 +01:00
2026-01-11 15:22:20 +01:00