linux/drivers/misc/mei
Hans de Goede 6f2a6ef86b 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>
History 2025-08-28 16:25:54 +02:00
..
hdcp misc/mei/hdcp: Use correct macros to initialize uuid_le 2023-03-10 09:33:33 +01:00
pxp mei: pxp: Use correct macros to initialize uuid_le 2023-03-10 09:33:33 +01:00
bus-fixup.c mei: bus-fixup:upon error print return values of send and receive 2023-03-11 13:55:35 +01:00
bus.c mei: bus: Check for still connected devices in mei_cl_bus_dev_release() 2025-08-28 16:25:54 +02:00
client.c misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write 2023-12-13 18:39:23 +01:00
client.h mei: constify passed buffers and structures 2021-07-29 17:08:04 +02:00
debugfs.c mei: debugfs: add pxp mode to devstate in debugfs 2022-09-12 15:23:11 +03:00
dma-ring.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
gsc-me.c Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
hbm.c Merge tag 'drm-intel-gt-next-2022-09-16' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2022-09-21 07:42:47 +10:00
hbm.h mei: implement client dma setup. 2021-02-06 15:48:11 +01:00
hw-me-regs.h mei: me: add panther lake H DID 2025-05-02 07:46:57 +02:00
hw-me.c Merge tag 'drm-intel-gt-next-2022-09-16' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2022-09-21 07:42:47 +10:00
hw-me.h mei: extend timeouts on slow devices 2022-09-12 15:23:10 +03:00
hw-txe-regs.h mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hw-txe.c Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
hw-txe.h mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hw.h mei: extend timeouts on slow devices 2022-09-12 15:23:10 +03:00
init.c mei: drop ready bits check after start 2022-09-12 15:23:11 +03:00
interrupt.c mei: avoid iterator usage outside of list_for_each_entry 2022-03-18 13:48:30 +01:00
Kconfig mei: add support for graphics system controller (gsc) devices 2022-04-21 11:34:09 -07:00
main.c mei: demote client disconnect warning on suspend to debug 2024-07-25 09:49:12 +02:00
Makefile mei: add support for graphics system controller (gsc) devices 2022-04-21 11:34:09 -07:00
mei-trace.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
mei-trace.h treewide: Add missing semicolons to __assign_str uses 2021-06-30 09:19:14 -04:00
mei_dev.h mei: gsc: setup gsc extended operational memory 2022-09-12 15:23:11 +03:00
mkhi.h mei: mkhi: add memory ready command 2022-09-12 15:23:11 +03:00
pci-me.c mei: me: add panther lake H DID 2025-05-02 07:46:57 +02:00
pci-txe.c mei: Remove usage of the deprecated "pci-dma-compat.h" API 2021-09-21 17:33:41 +02:00