CVE-2024-56697
JSON

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 packageVersionsReported by
Linux Linuxfrom 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_kernelfrom 6.11 before 6.11.11, from 6.12 before 6.12.2NVD

All scores

CISA-ADP5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-476

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

SourceRecordLicence
CVE ListCVE-2024-56697 changed 2026-05-11CVE Terms of Use
NVDCVE-2024-56697 changed 2026-06-17Public domain