]> 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>
Mon, 19 Jan 2026 12:09:52 +0000 (13:09 +0100)
commite1da6e399df976dd04c7c73ec008bc81da368a95
tree115f2a477f4be944be69849b3009a82fecd547ce
parentd0fd1f732ea8063cecd07a3879b7d815c7ee71ed
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