CVE-2025-38395: regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods

Published Jul 25, 2025
·
Updated

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 'gpiodesc' 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 Software

16 affected componentsFixes available
Linux Kernel
Linux Linux kernel>=5.1<5.4.296
Linux Linux kernel>=5.5<5.10.240
Linux Linux kernel>=5.11<5.15.187
Linux Linux kernel>=5.16<6.1.144
Linux Linux kernel>=6.2<6.6.97
Linux Linux kernel>=6.7<6.12.37
Linux Linux kernel>=6.13<6.15.6
Linux Linux kernel=6.16-rc1
Linux Linux kernel=6.16-rc2
Linux Linux kernel=6.16-rc3
Linux Linux kernel=6.16-rc4
Debian Debian Linux=11.0
Microsoft azl3 kernel 6.6.96.2-1
Microsoft azl3 kernel 6.6.96.2-2
Microsoft cbl2 kernel 5.15.186.1-1

Event History

Jul 25, 2025
CVE Published
via MITRE·12:53 PM
Data Sourced
via MITRE·12:53 PM
DescriptionSeverity
Data Sourced
via NVD·01:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Sep 3, 2025
Data Sourced
via Microsoft·11:15 PM
DescriptionSeverityWeaknessAffected Software
Sep 4, 2025
Updated
via Microsoft·06:15 AM
SeverityAffected Software
Updated
via Microsoft·06:15 AM
DescriptionSeverity
Nov 6, 58546
Event
via MITRE·06:42 AM

Frequently Asked Questions

1

What is the severity of CVE-2025-38395?

CVE-2025-38395 has been classified as a medium-severity vulnerability due to the potential for out-of-bounds memory access.

2

What are the potential impacts of CVE-2025-38395?

An attacker could exploit CVE-2025-38395 to cause memory corruption, leading to system instability or a denial of service.

3

How do I fix CVE-2025-38395?

To mitigate CVE-2025-38395, you should update to the latest version of the Linux kernel where the vulnerability has been patched.

4

Who is affected by CVE-2025-38395?

CVE-2025-38395 affects all distributions of the Linux kernel that utilize the vulnerable regulator GPIO implementation.

5

What versions of the Linux kernel are impacted by CVE-2025-38395?

All versions prior to the patch release are likely impacted, so checking your current kernel version is crucial.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203