Skip to content
Heist/ feed
Back to feed
UnratedFix available

regulator: max20086: fix invalid memory access

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.140, 6.12.30, 6.14.8, 6.6.92
CVEs
CVE-2025-38027
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 08:46 UTC · Revision 1

Source evidence

regulator: max20086: fix invalid memory access

core-osv · Original source

Published 18 Jun 2025, 09:28 UTC

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.

osv:CVE-2025-38027

Kernel

Fixed versions: 6.1.140, 6.6.92, 6.12.30, 6.14.8

Complete source record
{
  "id": "6cee937de413729511ff41e676db1267508b4cf6216f7e6c3713673fffdeca9b",
  "url": "https://osv.dev/vulnerability/CVE-2025-38027",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "regulator: max20086: fix invalid memory access",
    "summary": "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.",
    "evidence": "osv:CVE-2025-38027",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.140",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.92",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.30",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.14.8",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-38027",
      "aliases": [
        "CVE-2025-38027"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "bfff546aae50ae68ed395bf0e0848188d27b0ba3"
                },
                {
                  "fixed": "6ba30f7aa2c550b2ac04f16b81a19a8c045b8660"
                },
                {
                  "fixed": "7bddac8603d4e396872c2fbf4403ec08e7b1d7c8"
                },
                {
                  "fixed": "d2a9a92bb4cc7568cff68241b0051dc7268bdc68"
                },
                {
                  "fixed": "5578ab04bd7732f470fc614bbc0a924900399fb8"
                },
                {
                  "fixed": "6b0cd72757c69bc2d45da42b41023e288d02e772"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38027.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.17.0"
                },
                {
                  "fixed": "6.1.140"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.92"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.30"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.14.8"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38027.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:34.109002377Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/5578ab04bd7732f470fc614bbc0a924900399fb8",
        "https://git.kernel.org/stable/c/6b0cd72757c69bc2d45da42b41023e288d02e772",
        "https://git.kernel.org/stable/c/6ba30f7aa2c550b2ac04f16b81a19a8c045b8660",
        "https://git.kernel.org/stable/c/7bddac8603d4e396872c2fbf4403ec08e7b1d7c8",
        "https://git.kernel.org/stable/c/d2a9a92bb4cc7568cff68241b0051dc7268bdc68",
        "https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38027.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-38027",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38027.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-38027",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 501235,
  "published_at": "2025-06-18T09:28:32.546+00:00"
}