]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:21 +0000 (10:14 +0100)
commit4701493ba37654b3c38b526f6591cf0b02aa172f
tree738192bfe4de91310989299638acf1be424b88e6
parent244e4e60e375903c6a25b01a9ce25bd0cd5efe4c
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>
drivers/platform/chrome/cros_ec_ishtp.c