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

CVE-2026-74519
HIGH 7.8

At a glance

Source
NVD
EPSS
EPSS 0.15 % · percentile 4 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Received

Description

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

References

Scores

VersionScoreVectorScored by
CVSS 3.1HIGH 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux
CVSS 3.1HIGH 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HNVD · 416baaa9-dc9f-4396-8d5f-8c081fb06d67 (Secondary)

European references

CERT-FR advisories

Affected products

ProductVersions
Linux · Linuxaffected be4c60b563edee3712d392aaeb0943a768df7023 < e3cfb22bad363bebcfd55d909e12d499cb8c5490 ; affected be4c60b563edee3712d392aaeb0943a768df7023 < 1586423da2739a80871ef6240016fcb9c7339bfb ; affected be4c60b563edee3712d392aaeb0943a768df7023 < dec5f0a8080502908dec5e35597c7ae07d533a3b ; affected be4c60b563edee3712d392aaeb0943a768df7023 < 929f6396baade89999ec8a1281232c101cbc727d ; affected be4c60b563edee3712d392aaeb0943a768df7023 < 321fe3584a8298386938130d138191aa35040b75 ; affected be4c60b563edee3712d392aaeb0943a768df7023 < ad0ad3c228b6f76fde10f32047e0ec5fbc109dc8
Linux · Linuxaffected 5.5 ; unaffected 0 < 5.5 ; unaffected 5.10.265 ≤ 5.10.* ; unaffected 5.15.216 ≤ 5.15.* ; unaffected 6.1.183 ≤ 6.1.* ; unaffected 6.6.151 ≤ 6.6.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD