CVE-2025-38395: regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods
In the Linux kernel, the following vulnerability has been resolved:
regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods
drvdata::gpiods is supposed to hold an array of 'gpio_desc' pointers. But
the memory is allocated for only one pointer. This will lead to
out-of-bounds access later in the code if 'config::ngpios' is > 1. So
fix the code to allocate enough memory to hold 'config::ngpios' of GPIO
descriptors.
While at it, also move the check for memory allocation failure to be below
the allocation to make it more readable.
Security readout for executives and security teams
Plain-English summary
A Linux GPIO regulator driver allocates space for one GPIO pointer even when multiple pointers are required. On systems configured with more than one regulator GPIO, later accesses can exceed the allocation and corrupt kernel memory, potentially affecting confidentiality, integrity, or availability.
Executive priority
Prioritize affected embedded, appliance, and hardware-control systems after confirming multi-GPIO regulator use. Treat confirmed exposure as high priority because kernel memory corruption can have system-wide consequences. Broad emergency action across all Linux systems is not supported without configuration evidence or active exploitation.
Technical view
The gpio-regulator driver underallocates drvdata::gpiods, creating an out-of-bounds access when config::ngpios exceeds one. The published fix sizes the allocation for all GPIO descriptor pointers. CVSS 3.1 is 8.4 with a local attack vector, no privileges, and no user interaction, although vulnerable hardware and configuration appear necessary.
Likely exposure
Exposure is most likely on Linux systems using the GPIO regulator driver with config::ngpios greater than one, particularly hardware-oriented or embedded deployments. Installed kernel version alone is insufficient to establish vulnerability because distributions may backport fixes. The bundled version data is ambiguous and should be checked against vendor advisories and patch status.
Exploitation context
The supplied record does not establish active exploitation, and the CVE is not listed as KEV in the bundle. The local CVSS vector limits direct remote exposure, but successful triggering could corrupt kernel memory with high impact. The exact practical trigger path and exploitability are not documented in the supplied evidence.
Researcher notes
The root cause is allocation of storage for one gpio_desc pointer rather than config::ngpios pointers. Important research questions remain: reachable trigger conditions, affected configuration sources, and whether corruption is reliably controllable. The supplied affected-version presentation lacks clear range semantics, so commit ancestry or distribution backport analysis is preferable to simple version matching.
Mitigation direction
Apply a vendor-supported kernel update containing the referenced stable fix.
For Debian systems, review the cited LTS advisories and install the applicable security update.
Prioritize devices using gpio-regulator configurations with more than one GPIO.
If patching is delayed, consult vendor guidance for supported configuration-level mitigations.
Validation and detection
Inventory kernel builds and identify systems using the GPIO regulator driver.
Check regulator configuration for config::ngpios values greater than one.
Confirm the installed kernel package includes the applicable referenced stable commit or vendor backport.
Review vendor security advisories because package versions may not match upstream kernel versions.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-38395 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
11Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.