CVE-2025-37854 (GCVE-0-2025-37854)
Vulnerability from cvelistv5
Published
2025-05-09 06:42
Modified
2026-08-05 11:57
Summary
In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: Fix mode1 reset crash issue If HW scheduler hangs and mode1 reset is used to recover GPU, KFD signal user space to abort the processes. After process abort exit, user queues still use the GPU to access system memory before h/w is reset while KFD cleanup worker free system memory and free VRAM. There is use-after-free race bug that KFD allocate and reuse the freed system memory, and user queue write to the same system memory to corrupt the data structure and cause driver crash. To fix this race, KFD cleanup worker terminate user queues, then flush reset_domain wq to wait for any GPU ongoing reset complete, and then free outstanding BOs.
Impacted products
Vendor Product Version
Linux Linux Version: a4c63cafa58b4bd9e15511bab77a4752b93d3aa0
Version: a4c63cafa58b4bd9e15511bab77a4752b93d3aa0
Version: a4c63cafa58b4bd9e15511bab77a4752b93d3aa0
Version: a4c63cafa58b4bd9e15511bab77a4752b93d3aa0
Version: a4c63cafa58b4bd9e15511bab77a4752b93d3aa0
Version: a4c63cafa58b4bd9e15511bab77a4752b93d3aa0
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2025-11-03T19:56:30.426Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/amdkfd/kfd_process.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "57c9dabda80ac167de8cd71231baae37cc2f442d",
              "status": "affected",
              "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0",
              "versionType": "git"
            },
            {
              "lessThan": "89af6b39f028c130d4362f57042927f005423e6a",
              "status": "affected",
              "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0",
              "versionType": "git"
            },
            {
              "lessThan": "ffd37d7d44d7e0b6e769d4fe6590e327f8cc3951",
              "status": "affected",
              "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0",
              "versionType": "git"
            },
            {
              "lessThan": "6f30a847432cae84c7428e9b684b3e3fa49b2391",
              "status": "affected",
              "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0",
              "versionType": "git"
            },
            {
              "lessThan": "9c4bcdf4068aae3e17e31c144300be405cfa03ff",
              "status": "affected",
              "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0",
              "versionType": "git"
            },
            {
              "lessThan": "f0b4440cdc1807bb6ec3dce0d6de81170803569b",
              "status": "affected",
              "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/amdkfd/kfd_process.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.18"
            },
            {
              "lessThan": "5.18",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.135",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.88",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.24",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.13.*",
              "status": "unaffected",
              "version": "6.13.12",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.14.*",
              "status": "unaffected",
              "version": "6.14.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.15",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.135",
                  "versionStartIncluding": "5.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.88",
                  "versionStartIncluding": "5.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.24",
                  "versionStartIncluding": "5.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13.12",
                  "versionStartIncluding": "5.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14.3",
                  "versionStartIncluding": "5.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15",
                  "versionStartIncluding": "5.18",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Fix mode1 reset crash issue\n\nIf HW scheduler hangs and mode1 reset is used to recover GPU, KFD signal\nuser space to abort the processes. After process abort exit, user queues\nstill use the GPU to access system memory before h/w is reset while KFD\ncleanup worker free system memory and free VRAM.\n\nThere is use-after-free race bug that KFD allocate and reuse the freed\nsystem memory, and user queue write to the same system memory to corrupt\nthe data structure and cause driver crash.\n\nTo fix this race, KFD cleanup worker terminate user queues, then flush\nreset_domain wq to wait for any GPU ongoing reset complete, and then\nfree outstanding BOs."
        }
      ],
      "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 - The vulnerable path is reached only through the amdkfd character device `/dev/kfd` (plus a `/dev/dri/renderD*` fd) via `AMDKFD_IOC_CREATE_QUEUE` and the memory alloc/map ioctls, plus the local process\u0027s own exit. No network- or peer-supplied data reaches `kfd_process_wq_release()`.\nAC:L - The attacker drives both sides of the race \u2014 a non-preemptible compute wave deterministically trips the `queue_preemption_timeout_ms` HIQ timeout in `unmap_queues_cpsch()` and forces `kfd_hws_hang()` \u2192 mode1 reset, and the attacker\u0027s own process exit queues `kfd_process_wq_release` on a separate workqueue. The window is the full multi-hundred-millisecond device reset, so no hard-to-win timing, no uncontrollable memory layout, and no rare kernel config is required.\nPR:L - `kfd_ioctl()` performs no capability check on queue creation or BO allocation/mapping \u2014 the only `capable(CAP_CHECKPOINT_RESTORE)/(CAP_SYS_ADMIN)` gate covers the CRIU ioctls. Any unprivileged local user with render-node access (routine on ROCm compute nodes, containers, HPC clusters, and AMD-based embedded/Android devices) can perform every step.\nUI:N - The attacker\u0027s own process creates the queues, hangs the hardware scheduler, and exits; the KFD `HW_EXCEPTION` abort signal even drives the exit automatically. No victim has to log in, open a file, or take any action.\nS:U - The freed pages, the corrupting DMA writes, and the resulting crash are all within the kernel\u0027s own security authority under the amdgpu/amdkfd driver. No hypervisor, VM, or sandbox boundary is crossed.\nC:H - This is a use-after-free of system-memory pages that have been returned to the page allocator while the GPU still has live mappings; the attacker\u0027s still-running queues can read whatever kernel data now occupies those pages and copy it back into buffers the attacker still owns, yielding arbitrary kernel memory disclosure.\nI:H - The still-executing user queues perform attacker-authored writes with attacker-chosen content into physical pages the kernel has reallocated for other purposes \u2014 the commit itself describes KFD reusing the freed memory and having its data structures corrupted \u2014 which is a write-what-where primitive usable for control-flow hijacking and privilege escalation.\nA:H - The commit explicitly reports that the corrupted data structure causes a driver crash; a use-after-free of this kind reliably produces a kernel oops/panic, and the GPU is left wedged mid-reset."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:57:51.190Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/57c9dabda80ac167de8cd71231baae37cc2f442d"
        },
        {
          "url": "https://git.kernel.org/stable/c/89af6b39f028c130d4362f57042927f005423e6a"
        },
        {
          "url": "https://git.kernel.org/stable/c/ffd37d7d44d7e0b6e769d4fe6590e327f8cc3951"
        },
        {
          "url": "https://git.kernel.org/stable/c/6f30a847432cae84c7428e9b684b3e3fa49b2391"
        },
        {
          "url": "https://git.kernel.org/stable/c/9c4bcdf4068aae3e17e31c144300be405cfa03ff"
        },
        {
          "url": "https://git.kernel.org/stable/c/f0b4440cdc1807bb6ec3dce0d6de81170803569b"
        }
      ],
      "title": "drm/amdkfd: Fix mode1 reset crash issue",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-37854",
    "datePublished": "2025-05-09T06:42:00.663Z",
    "dateReserved": "2025-04-16T04:51:23.956Z",
    "dateUpdated": "2026-08-05T11:57:51.190Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…