diff options
| author | Tzung-Bi Shih <tzungbi@kernel.org> | 2025-10-31 06:39:00 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-01-08 12:14:21 +0300 |
| commit | 4701493ba37654b3c38b526f6591cf0b02aa172f (patch) | |
| tree | 738192bfe4de91310989299638acf1be424b88e6 | |
| parent | 244e4e60e375903c6a25b01a9ce25bd0cd5efe4c (diff) | |
| download | linux-4701493ba37654b3c38b526f6591cf0b02aa172f.tar.xz | |
platform/chrome: cros_ec_ishtp: Fix UAF after unbinding driver
commit 944edca81e7aea15f83cf9a13a6ab67f711e8abd upstream.
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: 26a14267aff2 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/platform/chrome/cros_ec_ishtp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/chrome/cros_ec_ishtp.c b/drivers/platform/chrome/cros_ec_ishtp.c index 5ac37bd024c8..91d96f169421 100644 --- a/drivers/platform/chrome/cros_ec_ishtp.c +++ b/drivers/platform/chrome/cros_ec_ishtp.c @@ -671,6 +671,7 @@ static void cros_ec_ishtp_remove(struct ishtp_cl_device *cl_device) cancel_work_sync(&client_data->work_ishtp_reset); cancel_work_sync(&client_data->work_ec_evt); + cros_ec_unregister(client_data->ec_dev); cros_ish_deinit(cros_ish_cl); ishtp_put_device(cl_device); } |
