pinctrl: devicetree: don't free uninitialized dev_name on error path

Summary

CVECVE-2026-74519
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-08-15 13:17:57 UTC
Updated2026-08-15 13:17:57 UTC
DescriptionIn the Linux kernel, the following vulnerability has been resolved: pinctrl: devicetree: don't free uninitialized dev_name on error path dt_remember_or_free_map() duplicates dev_name for each map entry. If kstrdup_const() fails, dt_free_map() frees dev_name in all num_maps entries, including entries that have not been initialized. Some pinctrl drivers, including pinctrl-imx, allocate the map with kmalloc() and leave dev_name for the core to initialize. The untouched entries therefore contain uninitialized data which is passed to kfree_const(). Reproduced on qemu's mcimx6ul-evk (pinctrl-imx) with failslab injection while binding the pinctrl-consuming device, under KASAN: BUG: KASAN: double-free in dt_free_map+0x34/0xa4 Free of addr c425a900 by task init/1 kfree from dt_free_map+0x34/0xa4 dt_free_map from dt_remember_or_free_map+0x184/0x198 dt_remember_or_free_map from pinctrl_dt_to_map+0x33c/0x4c8 pinctrl_dt_to_map from create_pinctrl+0x9c/0x5c0 Initialize all dev_name fields to NULL before duplicating the device name, making the full-map cleanup safe after a partial failure.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected be4c60b563edee3712d392aaeb0943a768df7023 929f6396baade89999ec8a1281232c101cbc727d git Not specified
CNA Linux Linux affected be4c60b563edee3712d392aaeb0943a768df7023 321fe3584a8298386938130d138191aa35040b75 git Not specified
CNA Linux Linux affected be4c60b563edee3712d392aaeb0943a768df7023 ad0ad3c228b6f76fde10f32047e0ec5fbc109dc8 git Not specified
CNA Linux Linux affected be4c60b563edee3712d392aaeb0943a768df7023 9d00a5ac7cd3d32ae61140f4b8a62f136de84e7d git Not specified
CNA Linux Linux affected be4c60b563edee3712d392aaeb0943a768df7023 015b5bcbcb622b32317642be91a7f79aa5413649 git Not specified
CNA Linux Linux affected 03f69244302d7954f42f528ea2d45903ebbf59f3 git Not specified
CNA Linux Linux affected 77440c3a37203e3f4667d06e37f76ef3968d2d8c git Not specified
CNA Linux Linux affected 679c4f27b8958b65bb51d1c3dfdbf3befe4a33a3 git Not specified
CNA Linux Linux affected f88ac1330779c5bfdd79f7d7f7d4d3343c782f92 git Not specified
CNA Linux Linux affected f739a699db7d5a5cf39ca3ce2c84e4fe4a8f4c5d git Not specified
CNA Linux Linux affected 4.4.244 4.5 semver Not specified
CNA Linux Linux affected 4.9.244 4.10 semver Not specified
CNA Linux Linux affected 4.14.161 4.15 semver Not specified
CNA Linux Linux affected 4.19.92 4.20 semver Not specified
CNA Linux Linux affected 5.4.7 5.5 semver Not specified
CNA Linux Linux affected 5.5 Not specified
CNA Linux Linux unaffected 5.5 semver Not specified
CNA Linux Linux unaffected 6.6.151 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.103 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.44 6.18.* semver Not specified
CNA Linux Linux unaffected 7.1.8 7.1.* semver Not specified
CNA Linux Linux unaffected 7.2-rc6 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/9d00a5ac7cd3d32ae61140f4b8a62f136de84e7d 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/015b5bcbcb622b32317642be91a7f79aa5413649 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/321fe3584a8298386938130d138191aa35040b75 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/929f6396baade89999ec8a1281232c101cbc727d 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/ad0ad3c228b6f76fde10f32047e0ec5fbc109dc8 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report