CVE-2026-97501: pinctrl: mediatek: paris: bypass pinctrl GPIO layer in set GPIO direction

Published Sep 24, 2026
·
Updated

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

pinctrl: mediatek: paris: bypass pinctrl GPIO layer in set GPIO direction

pinctrlgpiodirectioninput() / pinctrlgpiodirectionoutput() take the pinctrl mutex. This causes a gpiochip operations to need to sleep. Worse yet, the .cansleep field in the gpiochip is not set. This causes the shared GPIO proxy to trip over, as it uses gpiodcansleep() to check whether it can use a spinlock or needs a mutex. In this case, it ends up taking a spinlock, then calls pinctrlgpiodirectionoutput(), which takes a mutex. This causes a huge warning.

While this class of Mediatek hardware does not have separate clear/set registers, the pinctrl context has a spinlock that is taken whenever a register read-modify-write is done. Also, once the GPIO function is selected / muxed in, further GPIO operations do not involve pinctrl operations or state. The GPIO direction and level values do not require toggling the pinmux or any other pin config options.

Switch to directly calling mtkpinmuxgpiosetdirection() in the GPIO set direction callbacks to avoid taking the pinctrl mutex. Drop the .gpiosetdirection field in mtkpmxops to signal we are no longer using the pinctrl GPIO layer for setting the direction.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Bypass the pinctrl GPIO layer when setting GPIO direction by directly calling mtk_pinmux_gpio_set_direction(); stop using the .gpio_set_direction field in mtk_pmxops.

    Linux kernel Mediatek Paris pinctrl GPIO GPIO direction callbacks = directly call mtk_pinmux_gpio_set_direction()

Event History

Sep 24, 2026
CVE Published
via MITRE·04:04 PM
Data Sourced
via MITRE·04:04 PM
Description
Data Sourced
via NVD·05:17 PM
Description

Frequently Asked Questions

1

What systems are exposed to this issue?

Systems using the affected MediaTek Paris pinctrl GPIO implementation are exposed when GPIO direction callbacks are invoked. The problem is specifically relevant where GPIO operations are used through the shared GPIO proxy.

2

What conditions trigger the warning?

The shared GPIO proxy checks gpiod_cansleep() and may take a spinlock because the gpiochip does not advertise that its operations can sleep. A subsequent GPIO direction operation then calls into pinctrl code that takes a mutex, producing a warning from sleeping while under the spinlock.

3

Is changing pin multiplexing required to set GPIO direction on this hardware?

No. After the GPIO function has been selected or muxed, direction and level changes do not require changing pinmux state or other pin configuration options. The fix directly uses the MediaTek pinmux GPIO direction helper instead of the pinctrl GPIO direction layer.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203