{"id":"CVE-2024-56697","summary":"drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()","details":"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.","modified":"2026-03-20T12:40:58.417823Z","published":"2024-12-28T09:46:20.728Z","related":["USN-7276-1","USN-7277-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/56xxx/CVE-2024-56697.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/a1144da794adedb9447437c57d69add56494309d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d14bea4e094871226ea69772d69dab8b7b5f4915"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e8f1dbaa0437eba4e8c1d6a6d81eca2e2ce3d197"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/56xxx/CVE-2024-56697.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56697"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b194d21b9bcc15b50df1bc3ff7428e51c2918a6f"},{"fixed":"d14bea4e094871226ea69772d69dab8b7b5f4915"},{"fixed":"e8f1dbaa0437eba4e8c1d6a6d81eca2e2ce3d197"},{"fixed":"a1144da794adedb9447437c57d69add56494309d"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-56697.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}