CVE-2026-23337: pinctrl: pinconf-generic: Fix memory leak in pinconf_generic_parse_dt_config()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: pinconf-generic: Fix memory leak in pinconf_generic_parse_dt_config()
In pinconf_generic_parse_dt_config(), if parse_dt_cfg() fails, it returns directly. This bypasses the cleanup logic and results in a memory leak of the cfg buffer.
Fix this by jumping to the out label on failure, ensuring kfree(cfg) is called before returning.
The Linux kernel CVE team has assigned CVE-2026-23337 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.19 with commit 90a18c512884adb49ddc2fb30e94594169aae808 and fixed in 6.19.7 with commit 63ee429780a5d43b5b4406c6128109b0f47cf2f1 Issue introduced in 6.19 with commit 90a18c512884adb49ddc2fb30e94594169aae808 and fixed in 7.0-rc3 with commit 7a648d598cb8e8c62af3f0e020a25820a3f3a9a7
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-23337
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/pinctrl/pinconf-generic.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/63ee429780a5d43b5b4406c6128109b0f47cf2f1 https://git.kernel.org/stable/c/7a648d598cb8e8c62af3f0e020a25820a3f3a9a7