Bug 2334671 (CVE-2024-56697) - CVE-2024-56697 kernel: drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()
Summary: CVE-2024-56697 kernel: drm/amdgpu: Fix the memory allocation issue in amdgpu_...
Keywords:
Status: NEW
Alias: CVE-2024-56697
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: 2024-12-28 10:01 UTC by OSIDB Bzimport
Modified: 2025-01-21 12:12 UTC (History)
4 users (show)

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


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-12-28 10:01:41 UTC
In the Linux kernel, the following vulnerability has been resolved:

drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()

Fix two issues with memory allocation in amdgpu_discovery_get_nps_info()
for mem_ranges:

 - Add a check for allocation failure to avoid dereferencing a null
   pointer.

 - As suggested by Christophe, use kvcalloc() for memory allocation,
   which checks for multiplication overflow.

Additionally, assign the output parameters nps_type and range_cnt after
the kvcalloc() call to prevent modifying the output parameters in case
of an error return.

Comment 1 Avinash Hanwate 2024-12-29 08:47:06 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024122836-CVE-2024-56697-062c@gregkh/T


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