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.
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Thu, 13 Feb 2025 00:30:00 +0000

Type Values Removed Values Added
Metrics threat_severity

Low

threat_severity

Moderate


Wed, 08 Jan 2025 17:15:00 +0000

Type Values Removed Values Added
First Time appeared Linux
Linux linux Kernel
Weaknesses CWE-476
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel

Mon, 30 Dec 2024 01:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Low


Sat, 28 Dec 2024 10:00:00 +0000

Type Values Removed Values Added
Description 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.
Title drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()
References

cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2025-05-04T10:02:36.873Z

Reserved: 2024-12-27T15:00:39.850Z

Link: CVE-2024-56697

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Analyzed

Published: 2024-12-28T10:15:16.043

Modified: 2025-01-08T16:45:54.327

Link: CVE-2024-56697

cve-icon Redhat

Severity : Moderate

Publid Date: 2024-12-28T00:00:00Z

Links: CVE-2024-56697 - Bugzilla

cve-icon OpenCVE Enrichment

No data.