Skip to contentSkip to conversation

CVE-2026-92482: pinctrl: mediatek: use devm_gpiochip_add_data() for GPIO chip

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

pinctrl: mediatek: use devm_gpiochip_add_data() for GPIO chip

The gpio_chip is allocated with device-managed memory but registered with the non-managed gpiochip_add_data(). This was harmless while the drivers were built-in, but once they can be built as modules and unbound/rmmod'd, devm frees the gpio_chip's memory while it is still registered, causing a use-after-free.

Register it with devm_gpiochip_add_data() so it shares the same device-managed lifecycle, which also lets the manual gpiochip_remove() error paths go away.

The Linux kernel CVE team has assigned CVE-2026-92482 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.1 with commit a6df410d420aa4ff316797d352f69e7ebae5ff98 and fixed in 7.2.6 with commit b8fa1098ee9f627d38bdf7c0ef6c1a6058a4165b
	Issue introduced in 4.1 with commit a6df410d420aa4ff316797d352f69e7ebae5ff98 and fixed in 7.3-rc1 with commit 9c650317ba553d297f3fc5f0ae40ec53d86f9dab

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-92482

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/pinctrl/mediatek/pinctrl-moore.c drivers/pinctrl/mediatek/pinctrl-mtk-common.c drivers/pinctrl/mediatek/pinctrl-paris.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/b8fa1098ee9f627d38bdf7c0ef6c1a6058a4165b
	https://git.kernel.org/stable/c/9c650317ba553d297f3fc5f0ae40ec53d86f9dab