linux/drivers/hid/intel-ish-hid
Ryan Lin feb4bcfd40 HID: intel-ish-hid: fix NULL-ptr-deref in ishtp_bus_remove_all_clients
[ Upstream commit 56f7db581e ]

During a warm reset flow, the cl->device pointer may be NULL if the
reset occurs while clients are still being enumerated. Accessing
cl->device->reference_count without a NULL check leads to a kernel panic.

This issue was identified during multi-unit warm reboot stress clycles.
Add a defensive NULL check for cl->device to ensure stability under
such intensive testing conditions.

KASAN: null-ptr-deref in range [0000000000000000-0000000000000007]
Workqueue: ish_fw_update_wq fw_reset_work_fn

Call Trace:
 ishtp_bus_remove_all_clients+0xbe/0x130 [intel_ishtp]
 ishtp_reset_handler+0x85/0x1a0 [intel_ishtp]
 fw_reset_work_fn+0x8a/0xc0 [intel_ish_ipc]

Fixes: 3703f53b99 ("HID: intel_ish-hid: ISH Transport layer")
Signed-off-by: Ryan Lin <ryan.lin@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-02-26 14:59:14 -08:00
..
ipc HID: intel-ish-hid: Fix -Wcast-function-type-strict in devm_ishtp_alloc_workqueue() 2026-01-23 11:21:36 +01:00
ishtp HID: intel-ish-hid: fix NULL-ptr-deref in ishtp_bus_remove_all_clients 2026-02-26 14:59:14 -08:00
ishtp-fw-loader.c Merge branch 'for-6.13/core' into for-linus 2024-11-18 21:58:55 +01:00
ishtp-hid-client.c HID: intel-ish-hid: Reset enum_devices_done before enumeration 2026-02-11 13:41:48 +01:00
ishtp-hid.c HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove() 2025-02-19 10:09:27 +01:00
ishtp-hid.h HID: ishtp-hid-client: replace fake-flex arrays with flex-array members 2024-10-08 08:52:27 +02:00
Kconfig HID: intel-thc: fix CONFIG_HID dependency 2025-02-03 10:56:43 +01:00
Makefile Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00