CVE-2025-38027 Details
Description
In the Linux kernel, the following vulnerability has been resolved: regulator: max20086: fix invalid memory access max20086_parse_regulators_dt() calls of_regulator_match() using an array of struct of_regulator_match allocated on the stack for the matches argument. of_regulator_match() calls devm_of_regulator_put_matches(), which calls devres_alloc() to allocate a struct devm_of_regulator_matches which will be de-allocated using devm_of_regulator_put_matches(). struct devm_of_regulator_matches is populated with the stack allocated matches array. If the device fails to probe, devm_of_regulator_put_matches() will be called and will try to call of_node_put() on that stack pointer, generating the following dmesg entries: max20086 6-0028: Failed to read DEVICE_ID reg: -121 kobject: '\xc0$\xa5\x03' (000000002cebcb7a): is not initialized, yet kobject_put() 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 of_regulator_match.
A vulnerability in the Linux kernel's handling of the max20086 regulator can lead to invalid memory access. The issue arises in the 'max20086_parse_regulators_dt' function, which uses an array of 'of_regulator_match' structures allocated on the stack. This array is passed to 'of_regulator_match', which in turn calls 'devm_of_regulator_put_matches()' to deallocate the memory. If the device probing fails, 'devm_of_regulator_put_matches()' attempts to access the stack-allocated array, leading to a crash and a stack trace that reveals the call flow. The vulnerability can be reproduced by causing the device probe to fail, which triggers the invalid memory access.
The vulnerability has been addressed by changing the allocation of the 'matches' array to use 'devm_kcalloc()', which prevents the stack pointer from being accessed after it has gone out of scope. This modification also allows multiple max20086 devices to be probed simultaneously without data conflicts.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/5578ab04bd7732f470fc614bbc0a924900399fb8 | kernel.org | Patch |
| https://git.kernel.org/stable/c/6b0cd72757c69bc2d45da42b41023e288d02e772 | kernel.org | Patch |
| https://git.kernel.org/stable/c/6ba30f7aa2c550b2ac04f16b81a19a8c045b8660 | kernel.org | Patch |
| https://git.kernel.org/stable/c/7bddac8603d4e396872c2fbf4403ec08e7b1d7c8 | kernel.org | Patch |
| https://git.kernel.org/stable/c/d2a9a92bb4cc7568cff68241b0051dc7268bdc68 | kernel.org | Patch |
| https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html | CVE | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-125 | Out-of-bounds Read | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 5.17, < 6.1.140 >= 6.2, < 6.6.92 >= 6.7, < 6.12.30 >= 6.13, < 6.14.8 6.15 rc1 6.15 rc2 6.15 rc3 6.15 rc4 6.15 rc5 6.15 rc6 |
CPE
Remediation
| |
| debian debian linux | 11.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| Dec 18, 2025 | Initial Analysis | [email protected] |
| Nov 3, 2025 | CVE Modified | CVE |
| Jun 18, 2025 | New CVE Received | kernel.org |