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

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 8% of CVEs (2026-12-01)
- Published: 2026-11-30T13:35:53.917Z
- Modified: 2026-11-30T14:19:36.830Z
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 34acc5a8adfb76f2de63c8b8317397fb72b0aec8 before 8f8c5606c125cba00e491dad0da071e9b59feba5; from 34acc5a8adfb76f2de63c8b8317397fb72b0aec8 before 707855c21198c6a0b73efa053ac4fe733cbe1985; 7.2 (not affected: before 7.2; from 7.3.6 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/8f8c5606c125cba00e491dad0da071e9b59feba5>
- <https://git.kernel.org/stable/c/707855c21198c6a0b73efa053ac4fe733cbe1985>

## Sources

- CVE List: [CVE-2026-139561](https://www.cve.org/CVERecord?id=CVE-2026-139561), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-139561](https://nvd.nist.gov/vuln/detail/CVE-2026-139561), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-139561 · Whole record: https://cve.day/CVE-2026-139561.json · Rebuilt by cve.day 2026-11-30T14:33:14.269Z
