{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-38395","id":"CVE-2025-38395","title":"regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods","description":"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::n","descriptionLong":"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.","published":"2025-07-25T12:53:39.933Z","updated":"2026-10-28T02:31:06.193681522Z","reserved":"2025-04-16T04:51:24.011Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},"metrics":[{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","lessThan":"a3cd5ae7befbac849e0e0529c94ca04e8093cfd2","status":"affected","versionType":"git"},{"version":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","lessThan":"9fe71972869faed1f8f9b3beb9040f9c1b300c79","status":"affected","versionType":"git"},{"version":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","lessThan":"56738cbac3bbb1d39a71a07f57484dec1db8b239","status":"affected","versionType":"git"},{"version":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","lessThan":"a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a","status":"affected","versionType":"git"},{"version":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","lessThan":"24418bc77a66cb5be9f5a837431ba3674ed8b52f","status":"affected","versionType":"git"},{"version":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","lessThan":"e4d19e5d71b217940e33f2ef6c6962b7b68c5606","status":"affected","versionType":"git"},{"version":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","lessThan":"3830ab97cda9599872625cc0dc7b00160193634f","status":"affected","versionType":"git"},{"version":"d6cd33ad71029a3f77ba1686caf55d4dea58d916","lessThan":"c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.1","status":"affected"},{"version":"0","lessThan":"5.1","status":"unaffected","versionType":"semver"},{"version":"5.4.296","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.240","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.187","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.144","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.97","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.37","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.15.6","lessThanOrEqual":"6.15.*","status":"unaffected","versionType":"semver"},{"version":"6.16","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-125"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/a3cd5ae7befbac849e0e0529c94ca04e8093cfd2","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/9fe71972869faed1f8f9b3beb9040f9c1b300c79","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/56738cbac3bbb1d39a71a07f57484dec1db8b239","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/a1e12fac214d4f49fcb186dbdf9c5592e7fa0a7a","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/24418bc77a66cb5be9f5a837431ba3674ed8b52f","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/e4d19e5d71b217940e33f2ef6c6962b7b68c5606","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/3830ab97cda9599872625cc0dc7b00160193634f","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3","tags":["Patch","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["Third Party Advisory","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38395.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38395","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00209,"epssPercentile":0.11193,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-38395","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38395","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-38395","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-38395","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}