5.5medium
drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()
- Severity
- 5.5medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.21% (higher than 11% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from b194d21b9bcc15b50df1bc3ff7428e51c2918a6f before d14bea4e094871226ea69772d69dab8b7b5f4915, from b194d21b9bcc15b50df1bc3ff7428e51c2918a6f before e8f1dbaa0437eba4e8c1d6a6d81eca2e2ce3d197, from b194d21b9bcc15b50df1bc3ff7428e51c2918a6f before a1144da794adedb9447437c57d69add56494309d, 6.11 Not affected: before 6.11, from 6.11.11 up to 6.11.*, from 6.12.2 up to 6.12.*, from 6.13 up to * | CVE List |
| linux linux_kernel | from 6.11 before 6.11.11, from 6.12 before 6.12.2 | NVD |
All scores
| CISA-ADP | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: drm/amdgpu: Corrige el problema de asignación de memoria en amdgpu_discovery_get_nps_info() Corrige dos problemas con la asignación de memoria en amdgpu_discovery_get_nps_info() para mem_ranges: - Añade una comprobación de fallos de asignación para evitar desreferenciar un puntero nulo. - Como lo sugirió Christophe, utiliza kvcalloc() para la asignación de memoria, que comprueba si hay desbordamiento de multiplicación. Además, asigna los parámetros de salida nps_type y range_cnt después de la llamada a kvcalloc() para evitar modificar los parámetros de salida en caso de que se devuelva un error.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-56697 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2024-56697 changed 2026-06-17 | Public domain |