Bug 2383433 (CVE-2025-38395) - CVE-2025-38395 kernel: regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods
Summary: CVE-2025-38395 kernel: regulator: gpio: Fix the out-of-bounds access to drvda...
Keywords:
Status: NEW
Alias: CVE-2025-38395
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-25 14:04 UTC by OSIDB Bzimport
Modified: 2025-07-27 08:17 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-07-25 14:04:32 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.