linux-stable/drivers/hid/intel-ish-hid/ipc
Reka Norman 8ae2f2b0a2 HID: intel-ish-hid: ipc: Fix potential use-after-free in work function
When a reset notify IPC message is received, the ISR schedules a work
function and passes the ISHTP device to it via a global pointer
ishtp_dev. If ish_probe() fails, the devm-managed device resources
including ishtp_dev are freed, but the work is not cancelled, causing a
use-after-free when the work function tries to access ishtp_dev. Use
devm_work_autocancel() instead, so that the work is automatically
cancelled if probe fails.

Signed-off-by: Reka Norman <rekanorman@chromium.org>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2023-03-03 15:06:11 +01:00
..
hw-ish-regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
hw-ish.h HID: intel-ish-hid: ipc: Add Meteor Lake PCI device ID 2022-08-25 15:03:15 +02:00
ipc.c HID: intel-ish-hid: ipc: Fix potential use-after-free in work function 2023-03-03 15:06:11 +01:00
pci-ish.c HID: intel-ish-hid: ipc: Add Meteor Lake PCI device ID 2022-08-25 15:03:15 +02:00