CVE-2025-38395
regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < a3cd5ae7befbac849e0e0529c94ca04e8093cfd2; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 9fe71972869faed1f8f9b3beb9040f9c1b300c79; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 56738cbac3bbb1d39a71a07f57484dec1db8b239; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 24418bc77a66cb5be9f5a837431ba3674ed8b52f; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < e4d19e5d71b217940e33f2ef6c6962b7b68c5606; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 3830ab97cda9599872625cc0dc7b00160193634f; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3
- Anyone running Linux 5.1
Vulnerability facts
- Affected
- Linux >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < a3cd5ae7befbac849e0e0529c94ca04e8093cfd2; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 9fe71972869faed1f8f9b3beb9040f9c1b300c79; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 56738cbac3bbb1d39a71a07f57484dec1db8b239; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 24418bc77a66cb5be9f5a837431ba3674ed8b52f; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < e4d19e5d71b217940e33f2ef6c6962b7b68c5606; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 3830ab97cda9599872625cc0dc7b00160193634f; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3; Linux 5.1
- Fixed in
- Linux 9fe71972869faed1f8f9b3beb9040f9c1b300c79, Linux 56738cbac3bbb1d39a71a07f57484dec1db8b239, Linux 24418bc77a66cb5be9f5a837431ba3674ed8b52f, Linux 3830ab97cda9599872625cc0dc7b00160193634f
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 8.4 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.32% chance of exploitation in 30 days (percentile 18, 2026-11-26)
- CWE
- CWE-125
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < a3cd5ae7befbac849e0e0529c94ca04e8093cfd2; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 9fe71972869faed1f8f9b3beb9040f9c1b300c79; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 56738cbac3bbb1d39a71a07f57484dec1db8b239; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 24418bc77a66cb5be9f5a837431ba3674ed8b52f; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < e4d19e5d71b217940e33f2ef6c6962b7b68c5606; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 3830ab97cda9599872625cc0dc7b00160193634f; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3 | — | cvelist |
| Linux | 5.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-38395. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-38395.md Affected: Linux >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < a3cd5ae7befbac849e0e0529c94ca04e8093cfd2; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 9fe71972869faed1f8f9b3beb9040f9c1b300c79; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 56738cbac3bbb1d39a71a07f57484dec1db8b239; >= d6cd33ad71029a3f77ba168… Fixed in: Linux 9fe71972869faed1f8f9b3beb9040f9c1b300c79, Linux 56738cbac3bbb1d39a71a07f57484dec1db8b239, Linux 24418bc77a66cb5be9f5a837431ba3674ed8b52f, Linux 3830ab97cda9599872625cc0dc7b00160193634f Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/a3cd5ae7befbac849e0e0529c94ca04e8093cfd2
- https://git.kernel.org/stable/c/9fe71972869faed1f8f9b3beb9040f9c1b300c79
- https://git.kernel.org/stable/c/56738cbac3bbb1d39a71a07f57484dec1db8b239
- https://git.kernel.org/stable/c/a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a
- https://git.kernel.org/stable/c/24418bc77a66cb5be9f5a837431ba3674ed8b52f
- https://git.kernel.org/stable/c/e4d19e5d71b217940e33f2ef6c6962b7b68c5606
- https://git.kernel.org/stable/c/3830ab97cda9599872625cc0dc7b00160193634f
- https://git.kernel.org/stable/c/c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3
FAQ
Is CVE-2025-38395 being exploited?
There is no confirmed exploitation: CVE-2025-38395 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-38395?
High: CVSS 8.4 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-38395?
Linux >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < a3cd5ae7befbac849e0e0529c94ca04e8093cfd2; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 9fe71972869faed1f8f9b3beb9040f9c1b300c79; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 56738cbac3bbb1d39a71a07f57484dec1db8b239; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 24418bc77a66cb5be9f5a837431ba3674ed8b52f; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < e4d19e5d71b217940e33f2ef6c6962b7b68c5606; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < 3830ab97cda9599872625cc0dc7b00160193634f; >= d6cd33ad71029a3f77ba1686caf55d4dea58d916, < c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3; Linux 5.1.
Is there a fix for CVE-2025-38395?
Yes. Fixed in Linux 9fe71972869faed1f8f9b3beb9040f9c1b300c79, Linux 56738cbac3bbb1d39a71a07f57484dec1db8b239, Linux 24418bc77a66cb5be9f5a837431ba3674ed8b52f, Linux 3830ab97cda9599872625cc0dc7b00160193634f. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2025-38395?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.