{"id":"CVE-2024-56697","aliases":["CVE-2024-56697"],"related":[],"kind":"vulnerability","state":"published","title":"drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()\n\nFix two issues with memory allocation in amdgpu_discovery_get_nps_info()\nfor mem_ranges:\n\n - Add a check for allocation failure to avoid dereferencing a null\n   pointer.\n\n - As suggested by Christophe, use kvcalloc() for memory allocation,\n   which checks for multiplication overflow.\n\nAdditionally, assign the output parameters nps_type and range_cnt after\nthe kvcalloc() call to prevent modifying the output parameters in case\nof an error return.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()\n\nFix two issues with memory allocation in amdgpu_discovery_get_nps_info()\nfor mem_ranges:\n\n - Add a check for allocation failure to avoid dereferencing a null\n   pointer.\n\n - As suggested by Christophe, use kvcalloc() for memory allocation,\n   which checks for multiplication overflow.\n\nAdditionally, assign the output parameters nps_type and range_cnt after\nthe kvcalloc() call to prevent modifying the output parameters in case\nof an error return.","source":"cvelist"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-12-28T09:46:20.728Z","modified":"2026-06-17T08:12:46.220Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"b194d21b9bcc15b50df1bc3ff7428e51c2918a6f","fixed":"d14bea4e094871226ea69772d69dab8b7b5f4915","status":"affected"},{"type":"git","introduced":"b194d21b9bcc15b50df1bc3ff7428e51c2918a6f","fixed":"e8f1dbaa0437eba4e8c1d6a6d81eca2e2ce3d197","status":"affected"},{"type":"git","introduced":"b194d21b9bcc15b50df1bc3ff7428e51c2918a6f","fixed":"a1144da794adedb9447437c57d69add56494309d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.11","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.11","status":"unaffected"},{"type":"semver","introduced":"6.11.11","lastAffected":"6.11.*","status":"unaffected"},{"type":"semver","introduced":"6.12.2","lastAffected":"6.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.11","fixed":"6.11.11"},{"status":"affected","introduced":"6.12","fixed":"6.12.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/d14bea4e094871226ea69772d69dab8b7b5f4915","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e8f1dbaa0437eba4e8c1d6a6d81eca2e2ce3d197","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a1144da794adedb9447437c57d69add56494309d","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-10-01T19:59:01.596Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-56697","url":"https://www.cve.org/CVERecord?id=CVE-2024-56697","licence":"CVE Terms of Use","modified":"2026-05-11T20:57:30.172Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-56697","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56697","licence":"Public domain","modified":"2026-06-17T08:12:46.220Z"}],"updatedAt":"2026-11-25T22:58:50.537Z","epss":{"score":0.00206,"percentile":0.11203,"date":"2026-12-01T12:00:22.000Z"}}