CVE-2025-38395

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.16:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.16:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.16:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.16:rc4:*:*:*:*:*:*

Configuration 2 (hide)

cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*

History

23 Dec 2025, 19:33

Type Values Removed Values Added
References () https://git.kernel.org/stable/c/24418bc77a66cb5be9f5a837431ba3674ed8b52f - () https://git.kernel.org/stable/c/24418bc77a66cb5be9f5a837431ba3674ed8b52f - Patch
References () https://git.kernel.org/stable/c/3830ab97cda9599872625cc0dc7b00160193634f - () https://git.kernel.org/stable/c/3830ab97cda9599872625cc0dc7b00160193634f - Patch
References () https://git.kernel.org/stable/c/56738cbac3bbb1d39a71a07f57484dec1db8b239 - () https://git.kernel.org/stable/c/56738cbac3bbb1d39a71a07f57484dec1db8b239 - Patch
References () https://git.kernel.org/stable/c/9fe71972869faed1f8f9b3beb9040f9c1b300c79 - () https://git.kernel.org/stable/c/9fe71972869faed1f8f9b3beb9040f9c1b300c79 - Patch
References () https://git.kernel.org/stable/c/a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a - () https://git.kernel.org/stable/c/a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a - Patch
References () https://git.kernel.org/stable/c/a3cd5ae7befbac849e0e0529c94ca04e8093cfd2 - () https://git.kernel.org/stable/c/a3cd5ae7befbac849e0e0529c94ca04e8093cfd2 - Patch
References () https://git.kernel.org/stable/c/c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3 - () https://git.kernel.org/stable/c/c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3 - Patch
References () https://git.kernel.org/stable/c/e4d19e5d71b217940e33f2ef6c6962b7b68c5606 - () https://git.kernel.org/stable/c/e4d19e5d71b217940e33f2ef6c6962b7b68c5606 - Patch
References () https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html - () https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html - Third Party Advisory
References () https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html - () https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html - Third Party Advisory
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.1
CWE CWE-125
CPE cpe:2.3:o:linux:linux_kernel:6.16:rc2:*:*:*:*:*:*
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.16:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.16:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.16:rc4:*:*:*:*:*:*
First Time Linux
Debian
Debian debian Linux
Linux linux Kernel

03 Nov 2025, 18:16

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: regulator: gpio: Se corrige el acceso fuera de los límites a drvdata::gpiods. drvdata::gpiods debe contener una matriz de punteros 'gpio_desc'. Sin embargo, la memoria solo está asignada a un puntero. Esto provocará un acceso fuera de los límites más adelante en el código si 'config::ngpios' es > 1. Por lo tanto, corrija el código para asignar suficiente memoria para contener 'config::ngpios' de descriptores GPIO. Además, mueva la comprobación de fallos de asignación de memoria a un valor inferior a la asignación para que sea más legible.
References
  • () https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html -
  • () https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html -

25 Jul 2025, 13:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-07-25 13:15

Updated : 2025-12-23 19:33


NVD link : CVE-2025-38395

Mitre link : CVE-2025-38395

CVE.ORG link : CVE-2025-38395


JSON object : View

Products Affected

debian

  • debian_linux

linux

  • linux_kernel
CWE
CWE-125

Out-of-bounds Read