# CVE-2026-139561: pinctrl: pinctrl-generic-mux: Fix provider resource leak on re-parse


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 30 Nov 2026
- **Updated:** 30 Nov 2026
- **Also known as:** DEBIAN-CVE-2026-139561, GHSA-jr4p-7qf8-9ww3, UBUNTU-CVE-2026-139561

## What is CVE-2026-139561?

CVE-2026-139561 is a vulnerability in Linux, published on 30 Nov 2026. 

### Official 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.

## Which versions are affected by CVE-2026-139561?


## How do I fix CVE-2026-139561?

Upgrade to a fixed version.

## Is CVE-2026-139561 being exploited?

There is no known exploitation of CVE-2026-139561 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-139561 and fix it if it is affected.

What it is: CVE-2026-139561 is a vulnerability in Linux, published on 30 Nov 2026. 
Exploitation: There is no known exploitation of CVE-2026-139561 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-139561/ (Markdown: https://insights.sbomify.com/CVE-2026-139561/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-139561
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-139561
- OSV: https://osv.dev/vulnerability/CVE-2026-139561

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-139561/
Summaries are generated and may contain mistakes; the official description above is the record.
