{"id":"CVE-2026-139561","aliases":["CVE-2026-139561"],"related":[],"kind":"vulnerability","state":"published","title":"pinctrl: pinctrl-generic-mux: Fix provider resource leak on re-parse","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\npinctrl: pinctrl-generic-mux: Fix provider resource leak on re-parse\n\nThe pinctrl core re-parses a consumer's pinctrl on every probe attempt\n(pinctrl_bind_pins() runs before the driver's probe(), and again on each\ndeferred-probe retry or re-bind), so .dt_node_to_map() must be side-effect\nfree and safe to call repeatedly.\n\nmux_pinmux_dt_node_to_map() instead allocated provider-side resources on\nevery call - the mux_pin_function, the group name table and a mux_state\nreference, plus a group name and a pinctrl_generic_add_group()\nregistration via pinctrl_generic_to_map(). All of these are allocated\nwith devm_*() against the provider device, so they live for the provider's\nlifetime and are only released when the provider itself is unbound. The\n.dt_free_map() path never touches them; it frees the per-consumer\npinctrl_map only. Every re-parse therefore adds another set of\nprovider-side allocations that are never reclaimed, so a consumer that\nrepeatedly defers probe or is re-bound leaks memory and mux_state\nreferences on the provider without bound.\n\nThe groups and functions of a board-level mux are static and fully\ndescribed by the device tree, so build them once at probe time in the new\nmux_pinctrl_probe_dt(). mux_pinmux_dt_node_to_map() then only looks up the\nalready registered group and builds the per-consumer mux map, which the\ncore frees via .dt_free_map. As the mux has no pin electrical\nconfiguration, no config map is emitted.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\npinctrl: pinctrl-generic-mux: Fix provider resource leak on re-parse\n\nThe pinctrl core re-parses a consumer's pinctrl on every probe attempt\n(pinctrl_bind_pins() runs before the driver's probe(), and again on each\ndeferred-probe retry or re-bind), so .dt_node_to_map() must be side-effect\nfree and safe to call repeatedly.\n\nmux_pinmux_dt_node_to_map() instead allocated provider-side resources on\nevery call - the mux_pin_function, the group name table and a mux_state\nreference, plus a group name and a pinctrl_generic_add_group()\nregistration via pinctrl_generic_to_map(). All of these are allocated\nwith devm_*() against the provider device, so they live for the provider's\nlifetime and are only released when the provider itself is unbound. The\n.dt_free_map() path never touches them; it frees the per-consumer\npinctrl_map only. Every re-parse therefore adds another set of\nprovider-side allocations that are never reclaimed, so a consumer that\nrepeatedly defers probe or is re-bound leaks memory and mux_state\nreferences on the provider without bound.\n\nThe groups and functions of a board-level mux are static and fully\ndescribed by the device tree, so build them once at probe time in the new\nmux_pinctrl_probe_dt(). mux_pinmux_dt_node_to_map() then only looks up the\nalready registered group and builds the per-consumer mux map, which the\ncore frees via .dt_free_map. As the mux has no pin electrical\nconfiguration, no config map is emitted.","source":"cvelist"}],"published":"2026-11-30T13:35:53.917Z","modified":"2026-11-30T14:19:36.830Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"34acc5a8adfb76f2de63c8b8317397fb72b0aec8","fixed":"8f8c5606c125cba00e491dad0da071e9b59feba5","status":"affected"},{"type":"git","introduced":"34acc5a8adfb76f2de63c8b8317397fb72b0aec8","fixed":"707855c21198c6a0b73efa053ac4fe733cbe1985","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"7.2","status":"affected"},{"type":"semver","introduced":"0","fixed":"7.2","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/8f8c5606c125cba00e491dad0da071e9b59feba5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/707855c21198c6a0b73efa053ac4fe733cbe1985","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139561","url":"https://www.cve.org/CVERecord?id=CVE-2026-139561","licence":"CVE Terms of Use","modified":"2026-11-30T13:35:53.917Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139561","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139561","licence":"Public domain","modified":"2026-11-30T14:19:36.830Z"}],"updatedAt":"2026-11-30T14:33:14.269Z","epss":{"score":0.00189,"percentile":0.08959,"date":"2026-12-01T12:00:22.000Z"}}