CVE-2026-98397: platform/x86: x86-android-tablets: hold device reference for secondary fwnode teardown
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
platform/x86: x86-android-tablets: hold device reference for secondary fwnode teardown
In gpio_secondary_fwnode_init(), acpi_bus_find_device_by_name() returns a device reference, but the local dev variable is declared with __free(put_device), dropping the reference at the end of each iteration. Meanwhile, devm_add_action_or_reset() saves the dev pointer for gpio_secondary_unset() without incrementing its reference count, which could lead to a use-after-free during driver teardown if the device is released in the interim.
Acquire an explicit device reference with get_device() when registering the devres action, and drop it with put_device() inside gpio_secondary_unset().
The Linux kernel CVE team has assigned CVE-2026-98397 to this issue.
Affected and fixed versions
===========================
Issue introduced in 7.2 with commit 1448c2d2ca5cc7f4ea6694e6bc809946de0a751c and fixed in 7.2.7 with commit c62b6e081119f2ab03cfcafde1f83c0f50e8e726 Issue introduced in 7.2 with commit 1448c2d2ca5cc7f4ea6694e6bc809946de0a751c and fixed in 7.3-rc3 with commit 144113b0a70fa18033a747ee5db6803308f7688c
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98397
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/platform/x86/x86-android-tablets/core.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/c62b6e081119f2ab03cfcafde1f83c0f50e8e726 https://git.kernel.org/stable/c/144113b0a70fa18033a747ee5db6803308f7688c