CVE-2026-139561

pinctrl: pinctrl-generic-mux: Fix provider resource leak on re-parse

Published Nov 30, 2026 CVSS n/a EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

pinctrl: pinctrl-generic-mux: Fix provider resource leak on re-parse

The pinctrl core re-parses a consumer's pinctrl on every probe attempt
(pinctrl_bind_pins() runs before the driver's probe(), and again on each
deferred-probe retry or re-bind), so .dt_node_to_map() must be side-effect
free and safe to call repeatedly.

mux_pinmux_dt_node_to_map() instead allocated provider-side resources on
every call - the mux_pin_function, the group name table and a mux_state
reference, plus a group name and a pinctrl_generic_add_group()
registration via pinctrl_generic_to_map(). All of these are allocated
with devm_*() against the provider device, so they live for the provider's
lifetime and are only released when the provider itself is unbound. The
.dt_free_map() path never touches them; it frees the per-consumer
pinctrl_map only. Every re-parse therefore adds another set of
provider-side allocations that are never reclaimed, so a consumer that
repeatedly defers probe or is re-bound leaks memory and mux_state
references on the provider without bound.

The groups and functions of a board-level mux are static and fully
described by the device tree, so build them once at probe time in the new
mux_pinctrl_probe_dt(). mux_pinmux_dt_node_to_map() then only looks up the
already registered group and builds the per-consumer mux map, which the
core frees via .dt_free_map. As the mux has no pin electrical
configuration, no config map is emitted.

Analysis

AI-generated

Technical impact

The Linux kernel’s pinctrl core re‑parses a consumer’s pinctrl on every probe attempt and during each deferred‑probe retry. In the original code, each re‑parse allocated provider‑side resources—mux_pin_function tables, group name tables, and mux_state references—using devm_*() against the provider device. Those allocations are tied to the provider’s lifetime and are never freed when the consumer’s pinctrl_map is released, producing a memory and reference leak on the provider. The resource leak is a classic instance of CWE‑401 (Unchecked Free or Memory Leak).

Affected Systems

Linux kernel; the vulnerability exists in any configuration that loads the pinctrl generic mux driver and allows consumer drivers to defer or retry probes. Exact kernel versions are not listed, so all current releases prior to the commit that fixes the issue are potentially affected.

Risk and Exploitability

This weakness does not provide direct remote code execution or privilege escalation. However, repeated re‑parses by consumer drivers can deplete kernel memory and exhaust kernel reference counters, potentially leading to degraded performance or a denial‑of‑service. The EPSS score is not available, and the issue is not listed in CISA KEV, indicating no known exploitation at this time. The primary risk is stability rather than confidentiality or integrity.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a revision that contains the commit patching the pinctrl‑generic‑mux provider resource leak. The advisory URLs reference the relevant kernel commits and the fix can be applied through standard distribution updates or by building from source.
  • If a kernel upgrade cannot be performed immediately, configure consumer pinctrl drivers to avoid deferred probing or reduce re‑bind attempts. This may involve adjusting driver initialization order or disabling retry mechanisms where supported.
  • Disable pinctrl‑generic‑mux support in the kernel configuration if the target hardware does not use board‑level muxing, or remove unused consumer drivers to prevent the leak from being triggered.

Generated by OpenCVE AI on December 1, 2026 at 17:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-401
Type Values Removed Values Added
Weaknesses CWE-401
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: pinctrl: pinctrl-generic-mux: Fix provider resource leak on re-parse The pinctrl core re-parses a consumer's pinctrl on every probe attempt (pinctrl_bind_pins() runs before the driver's probe(), and again on each deferred-probe retry or re-bind), so .dt_node_to_map() must be side-effect free and safe to call repeatedly. mux_pinmux_dt_node_to_map() instead allocated provider-side resources on every call - the mux_pin_function, the group name table and a mux_state reference, plus a group name and a pinctrl_generic_add_group() registration via pinctrl_generic_to_map(). All of these are allocated with devm_*() against the provider device, so they live for the provider's lifetime and are only released when the provider itself is unbound. The .dt_free_map() path never touches them; it frees the per-consumer pinctrl_map only. Every re-parse therefore adds another set of provider-side allocations that are never reclaimed, so a consumer that repeatedly defers probe or is re-bound leaks memory and mux_state references on the provider without bound. The groups and functions of a board-level mux are static and fully described by the device tree, so build them once at probe time in the new mux_pinctrl_probe_dt(). mux_pinmux_dt_node_to_map() then only looks up the already registered group and builds the per-consumer mux map, which the core frees via .dt_free_map. As the mux has no pin electrical configuration, no config map is emitted.
Title pinctrl: pinctrl-generic-mux: Fix provider resource leak on re-parse
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

No weakness.

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:35 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM