CVE-2025-38395
regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods
Check your servers for CVE-2025-38395
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-38395 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 12.4% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from d6cd33ad71029a3f77ba1686caf55d4dea58d916, before a3cd5ae7befbac849e0e0529c94ca04e8093cfd2 affected from d6cd33ad71029a3f77ba1686caf55d4dea58d916, before 9fe71972869faed1f8f9b3beb9040f9c1b300c79 affected from d6cd33ad71029a3f77ba1686caf55d4dea58d916, before 56738cbac3bbb1d39a71a07f57484dec1db8b239 affected from d6cd33ad71029a3f77ba1686caf55d4dea58d916, before a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a affected from d6cd33ad71029a3f77ba1686caf55d4dea58d916, before 24418bc77a66cb5be9f5a837431ba3674ed8b52f affected from d6cd33ad71029a3f77ba1686caf55d4dea58d916, before e4d19e5d71b217940e33f2ef6c6962b7b68c5606 affected from d6cd33ad71029a3f77ba1686caf55d4dea58d916, before 3830ab97cda9599872625cc0dc7b00160193634f affected from d6cd33ad71029a3f77ba1686caf55d4dea58d916, before c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3
Other versions: unaffected
|
| Linux |
affected 5.1 unaffected before 5.1 unaffected from 5.4.296 up to and including 5.4.* unaffected from 5.10.240 up to and including 5.10.* unaffected from 5.15.187 up to and including 5.15.* unaffected from 6.1.144 up to and including 6.1.* unaffected from 6.6.97 up to and including 6.6.* unaffected from 6.12.37 up to and including 6.12.* unaffected from 6.15.6 up to and including 6.15.* unaffected 6.16 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-38395 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-38395
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-38395
trivy image --scanners vuln IMAGE | grep CVE-2025-38395
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/a3cd5ae7befbac849e0e0529c94ca04e8093cfd2 git.kernel.org
- https://git.kernel.org/stable/c/9fe71972869faed1f8f9b3beb9040f9c1b300c79 git.kernel.org
- https://git.kernel.org/stable/c/56738cbac3bbb1d39a71a07f57484dec1db8b239 git.kernel.org
- https://git.kernel.org/stable/c/a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a git.kernel.org
- https://git.kernel.org/stable/c/24418bc77a66cb5be9f5a837431ba3674ed8b52f git.kernel.org
- https://git.kernel.org/stable/c/e4d19e5d71b217940e33f2ef6c6962b7b68c5606 git.kernel.org
- https://git.kernel.org/stable/c/3830ab97cda9599872625cc0dc7b00160193634f git.kernel.org
- https://git.kernel.org/stable/c/c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3 git.kernel.org
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html lists.debian.org
- https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html lists.debian.org
Source: the record CVE-2025-38395 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse