Skip to content

Commit 944edca

Browse files
author
Tzung-Bi Shih
committed
platform/chrome: cros_ec_ishtp: Fix UAF after unbinding driver
After unbinding the driver, another kthread `cros_ec_console_log_work` is still accessing the device, resulting an UAF and crash. The driver doesn't unregister the EC device in .remove() which should shutdown sub-devices synchronously. Fix it. Fixes: 26a1426 ("platform/chrome: Add ChromeOS EC ISHTP driver") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20251031033900.3577394-1-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
1 parent c862381 commit 944edca

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/platform/chrome/cros_ec_ishtp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,7 @@ static void cros_ec_ishtp_remove(struct ishtp_cl_device *cl_device)
667667

668668
cancel_work_sync(&client_data->work_ishtp_reset);
669669
cancel_work_sync(&client_data->work_ec_evt);
670+
cros_ec_unregister(client_data->ec_dev);
670671
cros_ish_deinit(cros_ish_cl);
671672
ishtp_put_device(cl_device);
672673
}

0 commit comments

Comments
 (0)