{"id":"CVE-2026-139561","state":"PUBLISHED","title":"pinctrl: pinctrl-generic-mux: Fix provider resource leak on re-parse","description":"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.","publishedAt":"2026-11-30T13:35:53.917Z","updatedAt":"2026-11-30T13:35:53.917Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"34acc5a8adfb76f2de63c8b8317397fb72b0aec8","status":"affected","lessThan":"8f8c5606c125cba00e491dad0da071e9b59feba5","versionType":"git"},{"version":"34acc5a8adfb76f2de63c8b8317397fb72b0aec8","status":"affected","lessThan":"707855c21198c6a0b73efa053ac4fe733cbe1985","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pinctrl/pinctrl-generic-mux.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.2","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pinctrl/pinctrl-generic-mux.c"]}],"references":["https://git.kernel.org/stable/c/8f8c5606c125cba00e491dad0da071e9b59feba5","https://git.kernel.org/stable/c/707855c21198c6a0b73efa053ac4fe733cbe1985"],"weaknesses":[],"ingestedAt":"2026-11-30T13:52:04.503Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139561.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139561","state":"PUBLISHED","datePublished":"2026-11-30T13:35:53.917Z","dateUpdated":"2026-11-30T13:35:53.917Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.940Z"},"containers":{"cna":{"title":"pinctrl: pinctrl-generic-mux: Fix provider resource leak on re-parse","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"34acc5a8adfb76f2de63c8b8317397fb72b0aec8","status":"affected","lessThan":"8f8c5606c125cba00e491dad0da071e9b59feba5","versionType":"git"},{"version":"34acc5a8adfb76f2de63c8b8317397fb72b0aec8","status":"affected","lessThan":"707855c21198c6a0b73efa053ac4fe733cbe1985","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pinctrl/pinctrl-generic-mux.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.2","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pinctrl/pinctrl-generic-mux.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/8f8c5606c125cba00e491dad0da071e9b59feba5"},{"url":"https://git.kernel.org/stable/c/707855c21198c6a0b73efa053ac4fe733cbe1985"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:35:53.917Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.2","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.2","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}