Skip to main content
Vulnerability Database/CVE-2026-97501

CVE-2026-97501: Linux Kernel Privilege Escalation Vulnerability

CVE-2026-97501 is a privilege escalation vulnerability in the Linux kernel pinctrl subsystem affecting Mediatek hardware GPIO operations. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-97501 Overview

CVE-2026-97501 is a locking defect in the Linux kernel's MediaTek paris pinctrl driver. The driver's GPIO set-direction callbacks route through pinctrl_gpio_direction_input() and pinctrl_gpio_direction_output(), which acquire the pinctrl mutex. The GPIO chip, however, does not advertise .can_sleep, so callers assume operations are safe under a spinlock. When the shared GPIO proxy consults gpiod_cansleep(), it takes a spinlock and then calls into code that sleeps on a mutex, generating a sleeping-while-atomic warning. The kernel maintainers resolved the issue by bypassing the pinctrl GPIO layer and calling mtk_pinmux_gpio_set_direction() directly.

Critical Impact

The bug produces kernel warnings and potential lock-order violations on MediaTek platforms using the paris pinctrl driver with the shared GPIO proxy, affecting system stability on affected ARM SoCs.

Affected Products

  • Linux kernel versions containing the MediaTek paris pinctrl driver prior to the fix
  • MediaTek SoC platforms using pinctrl-paris with the shared GPIO proxy
  • Stable kernel branches referenced by commits 428b031dad39 and c87c9046c4e0

Discovery Timeline

  • 2026-09-24 - CVE-2026-97501 published to NVD
  • 2026-09-28 - Last updated in NVD database

Technical Details for CVE-2026-97501

Vulnerability Analysis

The MediaTek paris pinctrl driver registers GPIO direction callbacks that invoke pinctrl_gpio_direction_input() and pinctrl_gpio_direction_output(). Both helpers acquire the pinctrl mutex, meaning the GPIO operations may sleep. The driver's gpio_chip structure does not set .can_sleep, so consumers believe these calls are safe to execute from atomic contexts.

The shared GPIO proxy evaluates gpiod_cansleep() to choose between a spinlock and a mutex. Because .can_sleep is false, the proxy takes a spinlock and then calls into the pinctrl path, which attempts to acquire a mutex. The kernel emits a warning for sleeping inside atomic context, and the resulting lock order is incorrect.

MediaTek hardware in this class lacks separate clear and set registers, but the pinctrl context already uses a spinlock for register read-modify-write sequences. Once a pin is muxed to a GPIO function, further direction and level changes do not require pinmux state changes. The fix calls mtk_pinmux_gpio_set_direction() directly and drops .gpio_set_direction from mtk_pmxops.

Root Cause

The root cause is an improper locking choice [CWE-667] in the GPIO direction callbacks. The driver forced a mutex-protected pinctrl path for operations that only required the existing register spinlock, creating a sleep-in-atomic-context condition when invoked by the shared GPIO proxy.

Attack Vector

The issue is a stability and correctness defect rather than a remotely reachable vulnerability. Triggering requires local kernel code paths that exercise GPIO direction changes through the shared GPIO proxy on MediaTek platforms. No evidence of exploitation exists, and the EPSS score remains very low.

No verified exploitation code is available. Refer to the upstream commits for implementation details of the fix.

Detection Methods for CVE-2026-97501

Indicators of Compromise

  • Kernel log messages reporting BUG: sleeping function called from invalid context originating from pinctrl_gpio_direction_input or pinctrl_gpio_direction_output
  • Lockdep warnings referencing the MediaTek paris pinctrl driver and the shared GPIO proxy
  • Repeated backtraces involving mtk_pinmux_gpio_set_direction under spinlock-held call stacks

Detection Strategies

  • Collect dmesg output from MediaTek-based Linux devices and search for pinctrl mutex warnings
  • Build and boot test kernels with CONFIG_DEBUG_ATOMIC_SLEEP and CONFIG_PROVE_LOCKING to surface the defect during QA
  • Correlate kernel version strings against the fixed commits 428b031dad39 and c87c9046c4e0

Monitoring Recommendations

  • Forward kernel ring buffer logs from embedded and IoT MediaTek devices to a central log platform for warning triage
  • Track kernel package versions across MediaTek-based fleets and flag hosts running unpatched kernels
  • Alert on repeated WARN_ON events in GPIO or pinctrl subsystems that may indicate the defect is being exercised in production

How to Mitigate CVE-2026-97501

Immediate Actions Required

  • Identify Linux systems running MediaTek SoCs with the pinctrl-paris driver enabled
  • Apply the upstream fix commits 428b031dad39 and c87c9046c4e0 or upgrade to a stable kernel release containing them
  • Rebuild and redeploy custom kernels for embedded MediaTek devices after validation

Patch Information

The upstream Linux kernel maintainers resolved the defect by switching the GPIO direction callbacks to call mtk_pinmux_gpio_set_direction() directly and dropping the .gpio_set_direction field in mtk_pmxops. See the Kernel Git Commit 428b031dad39 and the Kernel Git Commit c87c9046c4e0 for the merged changes.

Workarounds

  • No supported runtime workaround exists; the fix requires a kernel update
  • Where patching is delayed, avoid kernel configurations that exercise the shared GPIO proxy against pinctrl-paris on affected hardware
  • Restrict access to privileged interfaces that can trigger GPIO direction changes on vulnerable kernels
bash
# Verify kernel version and check for fixed commits on a MediaTek host
uname -r
zcat /proc/config.gz | grep -E 'PINCTRL_MTK|PINCTRL_PARIS'
dmesg | grep -iE 'pinctrl|sleeping function|gpio'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.