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: 2026-06-29 18:26 UTC (History)
2 users (show)

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.

Comment 1 Jon Moroney 2025-07-25 18:30:06 UTC Comment hidden (spam)

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