summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-core.c
diff options
context:
space:
mode:
authorReka Norman <rekanorman@chromium.org>2023-02-27 03:49:38 +0100
committerJiri Kosina <jkosina@suse.cz>2023-03-03 15:06:11 +0100
commit8ae2f2b0a28416ed2f6d8478ac8b9f7862f36785 (patch)
treef3397f7ce08e9f227b65be0b84604ac98f8ce3ca /drivers/hid/hid-core.c
parentHID: logitech-hidpp: Add support for Logitech MX Master 3S mouse (diff)
downloadlinux-8ae2f2b0a28416ed2f6d8478ac8b9f7862f36785.tar.xz
linux-8ae2f2b0a28416ed2f6d8478ac8b9f7862f36785.zip
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>
Diffstat (limited to 'drivers/hid/hid-core.c')
0 files changed, 0 insertions, 0 deletions