{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2025-37854", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2025-04-16T04:51:23.956Z", "datePublished": "2025-05-09T06:42:00.663Z", "dateUpdated": "2026-08-05T11:57:51.190Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:57:51.190Z" }, "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": { "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 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's own exit. No network- or peer-supplied data reaches `kfd_process_wq_release()`.\nAC:L - The attacker drives both sides of the race — a non-preemptible compute wave deterministically trips the `queue_preemption_timeout_ms` HIQ timeout in `unmap_queues_cpsch()` and forces `kfd_hws_hang()` → mode1 reset, and the attacker's 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 — 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's 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's 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's 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 — the commit itself describes KFD reusing the freed memory and having its data structures corrupted — 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." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "drivers/gpu/drm/amd/amdkfd/kfd_process.c" ], "versions": [ { "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0", "lessThan": "57c9dabda80ac167de8cd71231baae37cc2f442d", "status": "affected", "versionType": "git" }, { "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0", "lessThan": "89af6b39f028c130d4362f57042927f005423e6a", "status": "affected", "versionType": "git" }, { "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0", "lessThan": "ffd37d7d44d7e0b6e769d4fe6590e327f8cc3951", "status": "affected", "versionType": "git" }, { "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0", "lessThan": "6f30a847432cae84c7428e9b684b3e3fa49b2391", "status": "affected", "versionType": "git" }, { "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0", "lessThan": "9c4bcdf4068aae3e17e31c144300be405cfa03ff", "status": "affected", "versionType": "git" }, { "version": "a4c63cafa58b4bd9e15511bab77a4752b93d3aa0", "lessThan": "f0b4440cdc1807bb6ec3dce0d6de81170803569b", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "drivers/gpu/drm/amd/amdkfd/kfd_process.c" ], "versions": [ { "version": "5.18", "status": "affected" }, { "version": "0", "lessThan": "5.18", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.135", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.88", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.24", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.13.12", "lessThanOrEqual": "6.13.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.14.3", "lessThanOrEqual": "6.14.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.15", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.18", "versionEndExcluding": "6.1.135" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.18", "versionEndExcluding": "6.6.88" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.18", "versionEndExcluding": "6.12.24" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.18", "versionEndExcluding": "6.13.12" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.18", "versionEndExcluding": "6.14.3" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.18", "versionEndExcluding": "6.15" } ] } ] } ], "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" } }, "adp": [ { "title": "CVE Program Container", "references": [ { "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html" } ], "providerMetadata": { "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2025-11-03T19:56:30.426Z" } } ] } }