{"id":"CVE-2025-38395","aliases":["CVE-2025-38395"],"related":[],"kind":"vulnerability","state":"published","title":"regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nregulator: gpio: Fix the out-of-bounds access to drvdata::gpiods\n\ndrvdata::gpiods is supposed to hold an array of 'gpio_desc' pointers. But\nthe memory is allocated for only one pointer. This will lead to\nout-of-bounds access later in the code if 'config::ngpios' is > 1. So\nfix the code to allocate enough memory to hold 'config::ngpios' of GPIO\ndescriptors.\n\nWhile at it, also move the check for memory allocation failure to be below\nthe allocation to make it more readable.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nregulator: gpio: Fix the out-of-bounds access to drvdata::gpiods\n\ndrvdata::gpiods is supposed to hold an array of 'gpio_desc' pointers. But\nthe memory is allocated for only one pointer. This will lead to\nout-of-bounds access later in the code if 'config::ngpios' is > 1. So\nfix the code to allocate enough memory to hold 'config::ngpios' of GPIO\ndescriptors.\n\nWhile at it, also move the check for memory allocation failure to be below\nthe allocation to make it more readable.","source":"cvelist"},{"lang":"es","text":"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 &gt; 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.","source":"nvd"}],"published":"2025-07-25T12:53:39.933Z","modified":"2026-08-05T12:01:33.139Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.4,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.4,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","score":7.1,"rating":"HIGH"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"type":"git","introduced":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","fixed":"a3cd5ae7befbac849e0e0529c94ca04e8093cfd2","status":"affected"},{"type":"git","introduced":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","fixed":"9fe71972869faed1f8f9b3beb9040f9c1b300c79","status":"affected"},{"type":"git","introduced":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","fixed":"56738cbac3bbb1d39a71a07f57484dec1db8b239","status":"affected"},{"type":"git","introduced":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","fixed":"a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a","status":"affected"},{"type":"git","introduced":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","fixed":"24418bc77a66cb5be9f5a837431ba3674ed8b52f","status":"affected"},{"type":"git","introduced":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","fixed":"e4d19e5d71b217940e33f2ef6c6962b7b68c5606","status":"affected"},{"type":"git","introduced":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","fixed":"3830ab97cda9599872625cc0dc7b00160193634f","status":"affected"},{"type":"git","introduced":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","fixed":"c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.1","status":"unaffected"},{"type":"semver","introduced":"5.4.296","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.240","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.187","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.144","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.97","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.37","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.6","lastAffected":"6.15.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.16","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.1","fixed":"5.4.296"},{"status":"affected","introduced":"5.5","fixed":"5.10.240"},{"status":"affected","introduced":"5.11","fixed":"5.15.187"},{"status":"affected","introduced":"5.16","fixed":"6.1.144"},{"status":"affected","introduced":"6.2","fixed":"6.6.97"},{"status":"affected","introduced":"6.7","fixed":"6.12.37"},{"status":"affected","introduced":"6.13","fixed":"6.15.6"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/a3cd5ae7befbac849e0e0529c94ca04e8093cfd2","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9fe71972869faed1f8f9b3beb9040f9c1b300c79","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/56738cbac3bbb1d39a71a07f57484dec1db8b239","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/24418bc77a66cb5be9f5a837431ba3674ed8b52f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e4d19e5d71b217940e33f2ef6c6962b7b68c5606","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3830ab97cda9599872625cc0dc7b00160193634f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38395","url":"https://www.cve.org/CVERecord?id=CVE-2025-38395","licence":"CVE Terms of Use","modified":"2026-08-05T12:01:33.139Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38395","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38395","licence":"Public domain","modified":"2026-07-30T06:23:11.813Z"}],"updatedAt":"2026-11-25T22:59:01.688Z","epss":{"score":0.00214,"percentile":0.12421,"date":"2026-12-01T12:00:22.000Z"}}