{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-56695","id":"CVE-2024-56695","title":"drm/amdkfd: Use dynamic allocation for CU occupancy array in 'kfd_get_cu_occupancy()'","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Use dynamic allocation for CU occupancy array in 'kfd_get_cu_occupancy()'\n\nThe `kfd_get_cu_occupancy` function previously declared a large\n`cu_occupancy` array as a local variable, which could lead to stack\noverflows due to excessive stack usage. This commit replaces the static\narray allocation with dynamic memory all","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Use dynamic allocation for CU occupancy array in 'kfd_get_cu_occupancy()'\n\nThe `kfd_get_cu_occupancy` function previously declared a large\n`cu_occupancy` array as a local variable, which could lead to stack\noverflows due to excessive stack usage. This commit replaces the static\narray allocation with dynamic memory allocation using `kcalloc`,\nthereby reducing the stack size.\n\nThis change avoids the risk of stack overflows in kernel space,  in\nscenarios where `AMDGPU_MAX_QUEUES` is large. The  allocated memory is\nfreed using `kfree` before the function returns  to prevent memory\nleaks.\n\nFixes the below with gcc W=1:\ndrivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c: In function ‘kfd_get_cu_occupancy’:\ndrivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:322:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]\n  322 | }\n      | ^","published":"2024-12-28T09:46:19.468Z","updated":"2026-10-28T02:30:40.374814236Z","reserved":"2024-12-27T15:00:39.850Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"CISA-ADP"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6ae9e1aba97e4cdaa31a0bfdc07497ad0e915c84","lessThan":"6d9f07196389f35a3afebcf1a12c1425725caddd","status":"affected","versionType":"git"},{"version":"6ae9e1aba97e4cdaa31a0bfdc07497ad0e915c84","lessThan":"922f0e00017b09d9d47e3efac008c8b20ed546a0","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","lessThan":"6.12","status":"unaffected","versionType":"semver"},{"version":"6.12.2","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.13","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-787"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/6d9f07196389f35a3afebcf1a12c1425725caddd","tags":["Mailing List","Patch","web"]},{"url":"https://git.kernel.org/stable/c/922f0e00017b09d9d47e3efac008c8b20ed546a0","tags":["Mailing List","Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/56xxx/CVE-2024-56695.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56695","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00215,"epssPercentile":0.12158,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-56695","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56695","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-56695","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-56695","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}