{"id":"CVE-2026-68257","state":"PUBLISHED","title":"drm/amdkfd: fix 32-bit overflow in CWSR total size calculation","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: fix 32-bit overflow in CWSR total size calculation\n\ntotal_cwsr_size was computed in 32-bit before being used as a BO/SVM\nallocation size.\nWith large ctx_save_restore_area_size and debug_memory_size\nmultiplied by the XCC count, the product can wrap,\nyielding an undersized CWSR save area that firmware later overruns.\n\nPromote total_cwsr_size to u64 and use check_add_overflow()/\ncheck_mul_overflow() in both kfd_queue_acquire_buffers() and\nkfd_queue_release_buffers().\n\n(cherry picked from commit 319f7e13423ae3f486b9aea82f9ad2d6af0ee608)","publishedAt":"2026-08-10T12:01:30.547Z","updatedAt":"2026-10-19T20:58:58.377Z","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":"325aa07165394b8e866ffe9ec1d4c99d9195b2f2","status":"affected","lessThan":"b88ffe6593607364a8c06a48c6f29e55437cdf8e","versionType":"git"},{"version":"d15deafab5d722afb9e2f83c5edcdef9d9d98bd1","status":"affected","lessThan":"abce3276c57e36c955627307469b9f009057a467","versionType":"git"},{"version":"d15deafab5d722afb9e2f83c5edcdef9d9d98bd1","status":"affected","lessThan":"865532d54eb57b660b1cb1b0e1755776ce21b849","versionType":"git"},{"version":"d15deafab5d722afb9e2f83c5edcdef9d9d98bd1","status":"affected","lessThan":"2b0386d4293920e690c0e017708f999b93cc729b","versionType":"git"},{"version":"63600103d2ac5c09fdeec5b931b396e4e0efd5d8","status":"affected","versionType":"git"},{"version":"6.12.59","status":"affected","lessThan":"6.12.101","versionType":"semver"},{"version":"6.17.9","status":"affected","lessThan":"6.18","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_queue.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.12.101","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","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/amdkfd/kfd_queue.c"]}],"references":["https://git.kernel.org/stable/c/b88ffe6593607364a8c06a48c6f29e55437cdf8e","https://git.kernel.org/stable/c/abce3276c57e36c955627307469b9f009057a467","https://git.kernel.org/stable/c/865532d54eb57b660b1cb1b0e1755776ce21b849","https://git.kernel.org/stable/c/2b0386d4293920e690c0e017708f999b93cc729b"],"weaknesses":["CWE-190"],"ingestedAt":"2026-10-29T20:12:49.727Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/68xxx/CVE-2026-68257.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-68257","state":"PUBLISHED","datePublished":"2026-08-10T12:01:30.547Z","dateUpdated":"2026-10-19T20:58:58.377Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-30T09:28:09.378Z"},"containers":{"cna":{"title":"drm/amdkfd: fix 32-bit overflow in CWSR total size calculation","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: fix 32-bit overflow in CWSR total size calculation\n\ntotal_cwsr_size was computed in 32-bit before being used as a BO/SVM\nallocation size.\nWith large ctx_save_restore_area_size and debug_memory_size\nmultiplied by the XCC count, the product can wrap,\nyielding an undersized CWSR save area that firmware later overruns.\n\nPromote total_cwsr_size to u64 and use check_add_overflow()/\ncheck_mul_overflow() in both kfd_queue_acquire_buffers() and\nkfd_queue_release_buffers().\n\n(cherry picked from commit 319f7e13423ae3f486b9aea82f9ad2d6af0ee608)"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"325aa07165394b8e866ffe9ec1d4c99d9195b2f2","status":"affected","lessThan":"b88ffe6593607364a8c06a48c6f29e55437cdf8e","versionType":"git"},{"version":"d15deafab5d722afb9e2f83c5edcdef9d9d98bd1","status":"affected","lessThan":"abce3276c57e36c955627307469b9f009057a467","versionType":"git"},{"version":"d15deafab5d722afb9e2f83c5edcdef9d9d98bd1","status":"affected","lessThan":"865532d54eb57b660b1cb1b0e1755776ce21b849","versionType":"git"},{"version":"d15deafab5d722afb9e2f83c5edcdef9d9d98bd1","status":"affected","lessThan":"2b0386d4293920e690c0e017708f999b93cc729b","versionType":"git"},{"version":"63600103d2ac5c09fdeec5b931b396e4e0efd5d8","status":"affected","versionType":"git"},{"version":"6.12.59","status":"affected","lessThan":"6.12.101","versionType":"semver"},{"version":"6.17.9","status":"affected","lessThan":"6.18","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_queue.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.12.101","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","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/amdkfd/kfd_queue.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b88ffe6593607364a8c06a48c6f29e55437cdf8e"},{"url":"https://git.kernel.org/stable/c/abce3276c57e36c955627307469b9f009057a467"},{"url":"https://git.kernel.org/stable/c/865532d54eb57b660b1cb1b0e1755776ce21b849"},{"url":"https://git.kernel.org/stable/c/2b0386d4293920e690c0e017708f999b93cc729b"}],"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 - Triggered through the AMDKFD_IOC_CREATE_QUEUE ioctl on the local /dev/kfd character device; the attacker-controlled ctx_save_restore_size field comes straight from the ioctl argument struct with no remote reachability.\nAC:L - The overflow is pure deterministic arithmetic on a value the attacker fully controls — passing ctx_save_restore_size near 2^32 (or /NUM_XCC on multi-XCC MI300 parts) reliably wraps total_cwsr_size to 0 or a small value on every attempt, with no race or layout dependency.\nPR:L - Requires only an unprivileged local account with access to /dev/kfd, which is granted to the render group and is routinely available to ordinary users on ROCm hosts, GPU compute nodes, containers, Steam Deck/desktop and Chrome OS style systems; no capabilities are checked on this path.\nUI:N - The attacker creates the malicious compute queue entirely from its own process via a single ioctl; no action by any other user or administrator is needed.\nS:U - The undersized CWSR area and the resulting firmware overrun stay within the kernel/GPU driver security authority of the same machine; there is no hypervisor or IOMMU boundary crossed.\nC:H - With validation bypassed, CP firmware save/restore reads span memory adjacent to the tiny validated buffer and load it into wave state the attacker's shader can read back, and get_wave_state copies per-XCC control-stack contents out of the unvalidated region, giving a broad out-of-bounds disclosure primitive.\nI:H - The queue is programmed with the full unwrapped save size and per-XCC base offsets, so firmware performs large out-of-bounds writes of wave/control-stack data beyond the buffer that was actually validated and reference-counted, and the bypassed queue_refcount lets those buffers be unmapped or freed while the queue is live — an attacker-influenced memory-corruption primitive.\nA:H - Overrunning the CWSR save area drives the GPU into unmapped VA on preemption, causing VM faults, queue hangs and driver-initiated GPU resets that take down all GPU workloads on the machine, including other tenants on shared compute nodes."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-18T06:55:54.208Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12.59","versionEndExcluding":"6.12.101"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"6.18.42"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.1.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-68257","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T15:46:15.764782Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-190","lang":"en","type":"CWE","description":"CWE-190 Integer Overflow or Wraparound"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T20:58:58.377Z"}}]}}}