]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/chrome: cros_ec_ishtp: Fix UAF after unbinding driver
authorTzung-Bi Shih <tzungbi@kernel.org>
Fri, 31 Oct 2025 03:39:00 +0000 (03:39 +0000)
committerTzung-Bi Shih <tzungbi@kernel.org>
Mon, 10 Nov 2025 06:29:54 +0000 (06:29 +0000)
commit944edca81e7aea15f83cf9a13a6ab67f711e8abd
treeb151072a0cc00335c91c4b9dde15873408b66815
parentc862381bd03ad4d999e0f1b3f8d1119ed7aa2e96
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: 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>
drivers/platform/chrome/cros_ec_ishtp.c