CVE-2024-56697: drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: Fix the memory allocation issue in amdgpudiscoverygetnpsinfo()
Fix two issues with memory allocation in amdgpudiscoverygetnpsinfo() for memranges:
- 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 npstype and rangecnt after the kvcalloc() call to prevent modifying the output parameters in case of an error return.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-56697?
CVE-2024-56697 has a moderate severity level due to memory allocation issues that could impact system stability.
How do I fix CVE-2024-56697?
To fix CVE-2024-56697, update your Linux kernel to version 6.11.11 or 6.12.2 or later.
What versions of the Linux kernel are affected by CVE-2024-56697?
CVE-2024-56697 affects Linux kernel versions from 6.11 to 6.11.11 and from 6.12 to 6.12.2.
What component is impacted by CVE-2024-56697?
CVE-2024-56697 impacts the AMD GPU driver in the Linux kernel.
What type of vulnerability is CVE-2024-56697?
CVE-2024-56697 is a memory allocation vulnerability in the amdgpu driver.