CVE-2025-38027

Source
https://cve.org/CVERecord?id=CVE-2025-38027
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38027.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38027
Downstream
Related
Published
2025-06-18T09:28:32.546Z
Modified
2026-03-11T07:52:37.709794Z
Summary
regulator: max20086: fix invalid memory access
Details

In the Linux kernel, the following vulnerability has been resolved:

regulator: max20086: fix invalid memory access

max20086parseregulatorsdt() calls ofregulatormatch() using an array of struct ofregulator_match allocated on the stack for the matches argument.

ofregulatormatch() calls devmofregulatorputmatches(), which calls devresalloc() to allocate a struct devmofregulatormatches which will be de-allocated using devmofregulatorputmatches().

struct devmofregulator_matches is populated with the stack allocated matches array.

If the device fails to probe, devmofregulatorputmatches() will be called and will try to call ofnodeput() on that stack pointer, generating the following dmesg entries:

max20086 6-0028: Failed to read DEVICEID reg: -121 kobject: '\xc0$\xa5\x03' (000000002cebcb7a): is not initialized, yet kobjectput() is being called.

Followed by a stack trace matching the call flow described above.

Switch to allocating the matches array using devm_kcalloc() to avoid accessing the stack pointer long after it's out of scope.

This also has the advantage of allowing multiple max20086 to probe without overriding the data stored inside the global ofregulatormatch.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38027.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
bfff546aae50ae68ed395bf0e0848188d27b0ba3
Fixed
6ba30f7aa2c550b2ac04f16b81a19a8c045b8660
Fixed
7bddac8603d4e396872c2fbf4403ec08e7b1d7c8
Fixed
d2a9a92bb4cc7568cff68241b0051dc7268bdc68
Fixed
5578ab04bd7732f470fc614bbc0a924900399fb8
Fixed
6b0cd72757c69bc2d45da42b41023e288d02e772

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38027.json"