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>
History 2025-08-20 18:30:25 +02:00
..
gsc_proxy drm: move i915_component.h under include/drm/intel 2024-05-31 16:11:00 +03:00
hdcp drm: move i915_hdcp_interface.h under include/drm/intel 2024-05-31 16:11:36 +03:00
pxp Merge drm/drm-next into drm-intel-next 2024-06-19 11:38:31 +03:00
bus-fixup.c mei: bus-fixup: set timeout for MKHI send operations 2024-06-24 16:40:29 +02:00
bus.c mei: bus: Check for still connected devices in mei_cl_bus_dev_release() 2025-08-20 18:30:25 +02:00
client.c mei: use kvmalloc for read buffer 2024-10-29 04:01:40 +01:00
client.h mei: add timeout to send 2022-11-23 19:43:33 +01:00
debugfs.c mei: debugfs: add pxp mode to devstate in debugfs 2022-09-12 15:23:11 +03:00
dma-ring.c misc: mei: dma-ring.c: fix kernel-doc warnings 2023-10-18 10:01:33 +02:00
gsc-me.c mei: gsc: remove unnecessary NULL pointer checks 2024-03-05 14:28:02 +00:00
hbm.c misc: mei: hbm.c: fix kernel-doc warnings 2023-10-18 10:01:33 +02: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:59:09 +02:00
hw-me.c mei: me: emit error only if reset was unexpected 2023-10-18 10:01:34 +02:00
hw-me.h mei: docs: add missing entries to kdoc in struct mei_cfg_idx 2023-10-18 10:01:33 +02: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: Avoid a bunch of -Wflex-array-member-not-at-end warnings 2024-04-11 15:13:30 +02:00
init.c mei: me: emit error only if reset was unexpected 2023-10-18 10:01:34 +02:00
interrupt.c misc: mei: interrupt.c: fix kernel-doc warnings 2023-10-18 10:01:34 +02:00
Kconfig mei: rework Kconfig dependencies 2023-12-15 17:02:15 +01:00
main.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
Makefile mei: Add MEI hardware support for IVSC device 2023-12-07 11:41:40 +09:00
mei-trace.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
mei-trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
mei_dev.h mei: me: emit error only if reset was unexpected 2023-10-18 10:01:34 +02: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:59:09 +02:00
pci-txe.c mei: txe: remove unnecessary NULL pointer checks 2024-03-05 14:28:02 +00:00
platform-vsc.c mei: vsc: Unset the event callback on remove and probe errors 2025-08-15 12:13:35 +02:00
vsc-fw-loader.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
vsc-tp.c mei: vsc: Event notifier fixes 2025-08-15 12:13:35 +02:00
vsc-tp.h mei: vsc: Unregister interrupt handler for system suspend 2024-04-11 15:15:53 +02:00