]> 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>
Fri, 2 Jan 2026 11:57:19 +0000 (12:57 +0100)
commit24a2062257bbdfc831de5ed21c27b04b5bdf2437
treec5415904c9dbd96bceee584ae70b284ec2cbdbcd
parentf73b74dafa3c888c62618c3b8c39fba3b058cfc0
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