Skip to content

CVE-2025-38027 regulator: max20086: fix invalid memory access

HighCVSS 7.1 EPSS 0.21%
Published
Updated
Exploit status
No public exploit known
Technology
Linux KernelUbuntuDebian

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.

Upgrade path

7 packages: 6 fixed.

PackageAffectedFixed inStatus
debian/linux(Debian 12) < 6.1.140-1; = 6.1.27-1; = 6.1.37-1; = 6.1.38-1 +37 more 6.1.140-1 Fixed
debian/linux(Debian 13) < 6.12.30-1 6.12.30-1 Fixed
debian/linux(Debian 14) < 6.12.30-1 6.12.30-1 Fixed
Linux kernel < 6.1.140; < 6.6.92; < 6.12.30; < 6.14.8 +17 more 6.1.140, 6.6.92, 6.12.30, 6.14.8, 6.15, 6b0cd72757c69bc2d45da42b41023e288d02e772, 6ba30f7aa2c550b2ac04f16b81a19a8c045b8660, 7bddac8603d4e396872c2fbf4403ec08e7b1d7c8, 5578ab04bd7732f470fc614bbc0a924900399fb8, d2a9a92bb4cc7568cff68241b0051dc7268bdc68 Fixed
ubuntu/linux(Ubuntu 24.04) < 6.8.0-100.100 6.8.0-100.100 Fixed
ubuntu/linux-raspi(Ubuntu 24.04) < 6.8.0-1047.51 6.8.0-1047.51 Fixed
debian linux = 11.0 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
debian/linux(Debian:12) < 6.1.140-1 6.1.140-1
debian/linux(Debian:12) = 6.1.106-1 No fix listed
debian/linux(Debian:12) = 6.1.106-2 No fix listed
debian/linux(Debian:12) = 6.1.106-3 No fix listed
debian/linux(Debian:12) = 6.1.112-1 No fix listed
debian/linux(Debian:12) = 6.1.115-1 No fix listed
debian/linux(Debian:12) = 6.1.119-1 No fix listed
debian/linux(Debian:12) = 6.1.123-1 No fix listed
debian/linux(Debian:12) = 6.1.124-1 No fix listed
debian/linux(Debian:12) = 6.1.128-1 No fix listed
debian/linux(Debian:12) = 6.1.129-1 No fix listed
debian/linux(Debian:12) = 6.1.133-1 No fix listed
debian/linux(Debian:12) = 6.1.135-1 No fix listed
debian/linux(Debian:12) = 6.1.137-1 No fix listed
debian/linux(Debian:12) = 6.1.139-1 No fix listed
debian/linux(Debian:12) = 6.1.27-1 No fix listed
debian/linux(Debian:12) = 6.1.37-1 No fix listed
debian/linux(Debian:12) = 6.1.38-1 No fix listed
debian/linux(Debian:12) = 6.1.38-2 No fix listed
debian/linux(Debian:12) = 6.1.38-2~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.38-3 No fix listed
debian/linux(Debian:12) = 6.1.38-4 No fix listed
debian/linux(Debian:12) = 6.1.38-4~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.52-1 No fix listed
debian/linux(Debian:12) = 6.1.55-1 No fix listed
Show 42 more
ProductAffected versionsFixed in
debian/linux(Debian:12) = 6.1.55-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.64-1 No fix listed
debian/linux(Debian:12) = 6.1.66-1 No fix listed
debian/linux(Debian:12) = 6.1.67-1 No fix listed
debian/linux(Debian:12) = 6.1.69-1 No fix listed
debian/linux(Debian:12) = 6.1.69-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.76-1 No fix listed
debian/linux(Debian:12) = 6.1.76-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.82-1 No fix listed
debian/linux(Debian:12) = 6.1.85-1 No fix listed
debian/linux(Debian:12) = 6.1.90-1 No fix listed
debian/linux(Debian:12) = 6.1.90-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.94-1 No fix listed
debian/linux(Debian:12) = 6.1.94-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.98-1 No fix listed
debian/linux(Debian:12) = 6.1.99-1 No fix listed
debian/linux(Debian:13) < 6.12.30-1 6.12.30-1
debian/linux(Debian:14) < 6.12.30-1 6.12.30-1
Linux kernel >= bfff546aae50ae68ed395bf0e0848188d27b0ba3, < 6ba30f7aa2c550b2ac04f16b81a19a8c045b8660 6ba30f7aa2c550b2ac04f16b81a19a8c045b8660
Linux kernel >= bfff546aae50ae68ed395bf0e0848188d27b0ba3, < 7bddac8603d4e396872c2fbf4403ec08e7b1d7c8 7bddac8603d4e396872c2fbf4403ec08e7b1d7c8
Linux kernel >= bfff546aae50ae68ed395bf0e0848188d27b0ba3, < d2a9a92bb4cc7568cff68241b0051dc7268bdc68 d2a9a92bb4cc7568cff68241b0051dc7268bdc68
Linux kernel >= bfff546aae50ae68ed395bf0e0848188d27b0ba3, < 5578ab04bd7732f470fc614bbc0a924900399fb8 5578ab04bd7732f470fc614bbc0a924900399fb8
Linux kernel >= bfff546aae50ae68ed395bf0e0848188d27b0ba3, < 6b0cd72757c69bc2d45da42b41023e288d02e772 6b0cd72757c69bc2d45da42b41023e288d02e772
Linux kernel = 5.17 No fix listed
Linux kernel < 6.1.140 6.1.140
Linux kernel < 6.6.92 6.6.92
Linux kernel < 6.12.30 6.12.30
Linux kernel < 6.14.8 6.14.8
Linux kernel < 6.15 6.15
ubuntu/linux(Ubuntu:24.04) < 6.8.0-100.100 6.8.0-100.100
ubuntu/linux-raspi(Ubuntu:24.04) < 6.8.0-1047.51 6.8.0-1047.51
Linux kernel >= 5.17, < 6.1.140 6.1.140
Linux kernel >= 6.2, < 6.6.92 6.6.92
Linux kernel >= 6.7, < 6.12.30 6.12.30
Linux kernel >= 6.13, < 6.14.8 6.14.8
Linux kernel = 6.15-rc1 No fix listed
Linux kernel = 6.15-rc2 No fix listed
Linux kernel = 6.15-rc3 No fix listed
Linux kernel = 6.15-rc4 No fix listed
Linux kernel = 6.15-rc5 No fix listed
Linux kernel = 6.15-rc6 No fix listed
debian linux = 11.0 No fix listed

References