{"id":"CVE-2024-39471","state":"PUBLISHED","title":"drm/amdgpu: add error handle to avoid out-of-bounds","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: add error handle to avoid out-of-bounds\n\nif the sdma_v4_0_irq_id_to_seq return -EINVAL, the process should\nbe stop to avoid out-of-bounds read, so directly return -EINVAL.","publishedAt":"2024-06-25T14:28:56.906Z","updatedAt":"2026-08-05T11:33:28.594Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"5594971e02764aa1c8210ffb838cb4e7897716e8","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"8112fa72b7f139052843ff484130d6f97e9f052f","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"ea906e9ac61e3152bef63597f2d9f4a812fc346a","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"011552f29f20842c9a7a21bffe1f6a2d6457ba46","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"5b0a3dc3e87821acb80e841b464d335aff242691","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"0964c84b93db7fbf74f357c1e20957850e092db3","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"8b2faf1a4f3b6c748c0da36cda865a226534d520","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.4","versionType":"semver"},{"version":"5.4.278","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.219","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.161","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.94","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.34","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.9.5","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c"]}],"references":["https://git.kernel.org/stable/c/5594971e02764aa1c8210ffb838cb4e7897716e8","https://git.kernel.org/stable/c/8112fa72b7f139052843ff484130d6f97e9f052f","https://git.kernel.org/stable/c/ea906e9ac61e3152bef63597f2d9f4a812fc346a","https://git.kernel.org/stable/c/011552f29f20842c9a7a21bffe1f6a2d6457ba46","https://git.kernel.org/stable/c/5b0a3dc3e87821acb80e841b464d335aff242691","https://git.kernel.org/stable/c/0964c84b93db7fbf74f357c1e20957850e092db3","https://git.kernel.org/stable/c/8b2faf1a4f3b6c748c0da36cda865a226534d520"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/39xxx/CVE-2024-39471.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-39471","state":"PUBLISHED","datePublished":"2024-06-25T14:28:56.906Z","dateUpdated":"2026-08-05T11:33:28.594Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-06-25T14:23:23.745Z"},"containers":{"cna":{"title":"drm/amdgpu: add error handle to avoid out-of-bounds","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: add error handle to avoid out-of-bounds\n\nif the sdma_v4_0_irq_id_to_seq return -EINVAL, the process should\nbe stop to avoid out-of-bounds read, so directly return -EINVAL."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"5594971e02764aa1c8210ffb838cb4e7897716e8","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"8112fa72b7f139052843ff484130d6f97e9f052f","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"ea906e9ac61e3152bef63597f2d9f4a812fc346a","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"011552f29f20842c9a7a21bffe1f6a2d6457ba46","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"5b0a3dc3e87821acb80e841b464d335aff242691","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"0964c84b93db7fbf74f357c1e20957850e092db3","versionType":"git"},{"version":"7d0e6329dfdcfe48311f8888d6a8dfa73bee00a9","status":"affected","lessThan":"8b2faf1a4f3b6c748c0da36cda865a226534d520","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.4","versionType":"semver"},{"version":"5.4.278","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.219","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.161","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.94","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.34","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.9.5","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/5594971e02764aa1c8210ffb838cb4e7897716e8"},{"url":"https://git.kernel.org/stable/c/8112fa72b7f139052843ff484130d6f97e9f052f"},{"url":"https://git.kernel.org/stable/c/ea906e9ac61e3152bef63597f2d9f4a812fc346a"},{"url":"https://git.kernel.org/stable/c/011552f29f20842c9a7a21bffe1f6a2d6457ba46"},{"url":"https://git.kernel.org/stable/c/5b0a3dc3e87821acb80e841b464d335aff242691"},{"url":"https://git.kernel.org/stable/c/0964c84b93db7fbf74f357c1e20957850e092db3"},{"url":"https://git.kernel.org/stable/c/8b2faf1a4f3b6c748c0da36cda865a226534d520"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The amdgpu SDMA trap interrupt handler is only reachable on a machine with a local AMD GPU, driven through the DRM device/render nodes (`/dev/dri/renderD*`) and the GPU interrupt ring. There is no network or adjacent-network path to this code.\nAC:L - The out-of-bounds index is fully deterministic — once an interrupt vector with an unmatched SDMA client ID is processed, `-EINVAL` is used as the array index every time, with no race window, no memory-layout guessing, and no state the attacker must wait for. A local user with render-node access can keep the SDMA engines and their trap/error interrupts firing continuously to reach the handler repeatedly.\nPR:L - Exercising SDMA queues and provoking trap interrupts only requires opening the unprivileged DRM render node, which is group-readable to ordinary logged-in users on desktops, Android devices, and GPU cloud/container instances. No CAP_SYS_ADMIN or root in the initial namespace is needed.\nUI:N - The interrupt handler runs asynchronously from GPU activity the attacker's own process generates; no victim must open a file, mount anything, or take any action.\nS:U - The corruption is confined to kernel memory within the same security authority as the host kernel; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - `adev->sdma.instance[0xFFFFFFEA]` is an unbounded out-of-bounds read many gigabytes beyond the array, and `amdgpu_fence_process()` then dereferences the resulting `struct amdgpu_ring`, reading `fence_drv.last_seq`, `sync_seq`, `num_fences_mask`, `adev`, and the `fences[]` pointer array from that location — arbitrary kernel memory read, not a bounded few-byte overread.\nI:H - The wild pointer is not merely read: `amdgpu_fence_process()` performs `atomic_cmpxchg()` on `drv->last_seq`, `timer_delete()` on `fence_drv.fallback_timer`, `RCU_INIT_POINTER(*ptr, NULL)` stores into `drv->fences[]`, and `dma_fence_put()` (a refcount decrement plus potential release callback) on the garbage pointer — out-of-bounds writes and a refcount-decrement primitive that are the classic building blocks for control-flow hijacking.\nA:H - Dereferencing a pointer several terabytes out of range in hard-interrupt context faults on unmapped kernel memory, producing an oops/panic that cannot be recovered from in IRQ context, and the corrupting writes and bogus `dma_fence_put()` release paths add further crash modes."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:33:28.594Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"5.4.278"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"5.10.219"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"5.15.161"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.1.94"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.6.34"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.9.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/5594971e02764aa1c8210ffb838cb4e7897716e8","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/8112fa72b7f139052843ff484130d6f97e9f052f","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/ea906e9ac61e3152bef63597f2d9f4a812fc346a","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/011552f29f20842c9a7a21bffe1f6a2d6457ba46","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/5b0a3dc3e87821acb80e841b464d335aff242691","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/0964c84b93db7fbf74f357c1e20957850e092db3","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/8b2faf1a4f3b6c748c0da36cda865a226534d520","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:26:15.268Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-39471","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T17:07:48.948392Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:34:41.543Z"}}]}}}