Files
linux/drivers/misc/mei
Hans de Goede 612c8d21ce mei: bus: Check for still connected devices in mei_cl_bus_dev_release()
[ Upstream commit 35e8a426b1 ]

mei_cl_bus_dev_release() also frees the mei-client (struct mei_cl)
belonging to the device being released.

If there are bugs like the just fixed bug in the ACE/CSI2 mei drivers,
the mei-client being freed might still be part of the mei_device's
file_list and iterating over this list after the freeing will then trigger
a use-afer-free bug.

Add a check to mei_cl_bus_dev_release() to make sure that the to-be-freed
mei-client is not on the mei_device's file_list.

Signed-off-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250623085052.12347-11-hansg@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-20 18:30:25 +02:00
..
2024-10-29 04:01:40 +01:00
2022-11-23 19:43:33 +01:00
2021-02-06 15:48:11 +01:00
2025-05-02 07:59:09 +02:00
2023-12-15 17:02:15 +01:00
2024-09-27 08:18:43 -07:00
2022-09-12 15:23:11 +03:00
2025-05-02 07:59:09 +02:00
2025-08-15 12:13:35 +02:00