CVE-2026-68257 (GCVE-0-2026-68257)

Vulnerability from cvelistv5 – Published: 2026-08-10 12:01 – Updated: 2026-08-18 06:55
VLAI
Title
drm/amdkfd: fix 32-bit overflow in CWSR total size calculation
Summary
In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: fix 32-bit overflow in CWSR total size calculation total_cwsr_size was computed in 32-bit before being used as a BO/SVM allocation size. With large ctx_save_restore_area_size and debug_memory_size multiplied by the XCC count, the product can wrap, yielding an undersized CWSR save area that firmware later overruns. Promote total_cwsr_size to u64 and use check_add_overflow()/ check_mul_overflow() in both kfd_queue_acquire_buffers() and kfd_queue_release_buffers(). (cherry picked from commit 319f7e13423ae3f486b9aea82f9ad2d6af0ee608)
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 325aa07165394b8e866ffe9ec1d4c99d9195b2f2 , < b88ffe6593607364a8c06a48c6f29e55437cdf8e (git)
Affected: d15deafab5d722afb9e2f83c5edcdef9d9d98bd1 , < abce3276c57e36c955627307469b9f009057a467 (git)
Affected: d15deafab5d722afb9e2f83c5edcdef9d9d98bd1 , < 865532d54eb57b660b1cb1b0e1755776ce21b849 (git)
Affected: d15deafab5d722afb9e2f83c5edcdef9d9d98bd1 , < 2b0386d4293920e690c0e017708f999b93cc729b (git)
Affected: 63600103d2ac5c09fdeec5b931b396e4e0efd5d8 (git)
Affected: 6.12.59 , < 6.12.101 (semver)
Affected: 6.17.9 , < 6.18 (semver)
guessed Create a notification for this product.
Linux Linux Affected: 6.18
Unaffected: 0 , < 6.18 (semver)
Unaffected: 6.12.101 , ≤ 6.12.* (semver)
Unaffected: 6.18.42 , ≤ 6.18.* (semver)
Unaffected: 7.1.6 , ≤ 7.1.* (semver)
Unaffected: 7.2 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/amdkfd/kfd_queue.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "b88ffe6593607364a8c06a48c6f29e55437cdf8e",
              "status": "affected",
              "version": "325aa07165394b8e866ffe9ec1d4c99d9195b2f2",
              "versionType": "git"
            },
            {
              "lessThan": "abce3276c57e36c955627307469b9f009057a467",
              "status": "affected",
              "version": "d15deafab5d722afb9e2f83c5edcdef9d9d98bd1",
              "versionType": "git"
            },
            {
              "lessThan": "865532d54eb57b660b1cb1b0e1755776ce21b849",
              "status": "affected",
              "version": "d15deafab5d722afb9e2f83c5edcdef9d9d98bd1",
              "versionType": "git"
            },
            {
              "lessThan": "2b0386d4293920e690c0e017708f999b93cc729b",
              "status": "affected",
              "version": "d15deafab5d722afb9e2f83c5edcdef9d9d98bd1",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "63600103d2ac5c09fdeec5b931b396e4e0efd5d8",
              "versionType": "git"
            },
            {
              "lessThan": "6.12.101",
              "status": "affected",
              "version": "6.12.59",
              "versionType": "semver"
            },
            {
              "lessThan": "6.18",
              "status": "affected",
              "version": "6.17.9",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/amdkfd/kfd_queue.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.18"
            },
            {
              "lessThan": "6.18",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.101",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.42",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.1.*",
              "status": "unaffected",
              "version": "7.1.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.101",
                  "versionStartIncluding": "6.12.59",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.42",
                  "versionStartIncluding": "6.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.1.6",
                  "versionStartIncluding": "6.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2",
                  "versionStartIncluding": "6.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "6.17.9",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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)"
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "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 \u2014 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\u0027s 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 \u2014 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": {
        "dateUpdated": "2026-08-18T06:55:54.208Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
        }
      ],
      "title": "drm/amdkfd: fix 32-bit overflow in CWSR total size calculation",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-68257",
    "datePublished": "2026-08-10T12:01:30.547Z",
    "dateReserved": "2026-07-30T09:28:09.378Z",
    "dateUpdated": "2026-08-18T06:55:54.208Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-68257",
      "date": "2026-08-20",
      "epss": "0.00138",
      "percentile": "0.03656"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-68257\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-08-10T13:20:14.367\",\"lastModified\":\"2026-08-18T07:16:51.380\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"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\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/gpu/drm/amd/amdkfd/kfd_queue.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"325aa07165394b8e866ffe9ec1d4c99d9195b2f2\",\"lessThan\":\"b88ffe6593607364a8c06a48c6f29e55437cdf8e\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"d15deafab5d722afb9e2f83c5edcdef9d9d98bd1\",\"lessThan\":\"abce3276c57e36c955627307469b9f009057a467\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"d15deafab5d722afb9e2f83c5edcdef9d9d98bd1\",\"lessThan\":\"865532d54eb57b660b1cb1b0e1755776ce21b849\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"d15deafab5d722afb9e2f83c5edcdef9d9d98bd1\",\"lessThan\":\"2b0386d4293920e690c0e017708f999b93cc729b\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"63600103d2ac5c09fdeec5b931b396e4e0efd5d8\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"6.12.59\",\"lessThan\":\"6.12.101\",\"versionType\":\"semver\",\"status\":\"affected\"},{\"version\":\"6.17.9\",\"lessThan\":\"6.18\",\"versionType\":\"semver\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"drivers/gpu/drm/amd/amdkfd/kfd_queue.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.18\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.18\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.101\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18.42\",\"lessThanOrEqual\":\"6.18.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.1.6\",\"lessThanOrEqual\":\"7.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.2\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"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\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2b0386d4293920e690c0e017708f999b93cc729b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/865532d54eb57b660b1cb1b0e1755776ce21b849\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/abce3276c57e36c955627307469b9f009057a467\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b88ffe6593607364a8c06a48c6f29e55437cdf8e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-08-14T22:22:32+00:00",
      "cve": "CVE-2026-68257",
      "id": "CVE-2026-68257",
      "initial_release_date": "2026-08-10T00:00:00+00:00",
      "product_status:known_affected": "276",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: drm/amdkfd: fix 32-bit overflow in CWSR total size calculation",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-68257.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…