CVE-2026-99257: gpio: shared: gracefully handle no-device lookup of shared GPIOs
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
gpio: shared: gracefully handle no-device lookup of shared GPIOs
We use platform lookup tables for shared GPIOs. This mechanism needs a struct device to work so fwnode-based lookup with no device associated currently causes a NULL-pointer deference.
Adding this functionality will require a larger rework and it has never worked anyway so add a check that allows the kernel to gracefully handle this situation with an error ahead of implementing that functionality as a new feature.
The Linux kernel CVE team has assigned CVE-2026-99257 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.19 with commit a060b8c511abb0997381b397e52149a5e3e5259a and fixed in 7.2.13 with commit 7f9eb6aaf9a3ab7fa2b7dcc38660c27db12d4ec1 Issue introduced in 6.19 with commit a060b8c511abb0997381b397e52149a5e3e5259a and fixed in 7.3 with commit cf73c3fc03c43a8a86fd487c62390b4744eff9ec
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-99257
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/gpio/gpiolib-shared.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/7f9eb6aaf9a3ab7fa2b7dcc38660c27db12d4ec1 https://git.kernel.org/stable/c/cf73c3fc03c43a8a86fd487c62390b4744eff9ec