{"id":"CVE-2021-47421","state":"PUBLISHED","title":"drm/amdgpu: handle the case of pci_channel_io_frozen only in amdgpu_pci_resume","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: handle the case of pci_channel_io_frozen only in amdgpu_pci_resume\n\nIn current code, when a PCI error state pci_channel_io_normal is detectd,\nit will report PCI_ERS_RESULT_CAN_RECOVER status to PCI driver, and PCI\ndriver will continue the execution of PCI resume callback report_resume by\npci_walk_bridge, and the callback will go into amdgpu_pci_resume\nfinally, where write lock is releasd unconditionally without acquiring\nsuch lock first. In this case, a deadlock will happen when other threads\nstart to acquire the read lock.\n\nTo fix this, add a member in amdgpu_device strucutre to cache\npci_channel_state, and only continue the execution in amdgpu_pci_resume\nwhen it's pci_channel_io_frozen.","publishedAt":"2024-05-21T15:04:09.296Z","updatedAt":"2026-08-05T08:47:45.513Z","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":"c9a6b82f45e261d247b980a7949aaa6a9bfffe01","status":"affected","lessThan":"785cc093b6b5a93cc350421a55f3f1eda6585156","versionType":"git"},{"version":"c9a6b82f45e261d247b980a7949aaa6a9bfffe01","status":"affected","lessThan":"72e9a1bf9b722628c28092e0c2cd8717edd201dc","versionType":"git"},{"version":"c9a6b82f45e261d247b980a7949aaa6a9bfffe01","status":"affected","lessThan":"248b061689a40f4fed05252ee2c89f87cf26d7d8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu.h","drivers/gpu/drm/amd/amdgpu/amdgpu_device.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.10","versionType":"semver"},{"version":"5.10.241","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.14.12","status":"unaffected","lessThanOrEqual":"5.14.*","versionType":"semver"},{"version":"5.15","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/amdgpu.h","drivers/gpu/drm/amd/amdgpu/amdgpu_device.c"]}],"references":["https://git.kernel.org/stable/c/785cc093b6b5a93cc350421a55f3f1eda6585156","https://git.kernel.org/stable/c/72e9a1bf9b722628c28092e0c2cd8717edd201dc","https://git.kernel.org/stable/c/248b061689a40f4fed05252ee2c89f87cf26d7d8","https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"],"weaknesses":[],"ingestedAt":"2026-10-29T19:49:19.404Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/47xxx/CVE-2021-47421.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47421","state":"PUBLISHED","datePublished":"2024-05-21T15:04:09.296Z","dateUpdated":"2026-08-05T08:47:45.513Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-21T14:58:30.820Z"},"containers":{"cna":{"title":"drm/amdgpu: handle the case of pci_channel_io_frozen only in amdgpu_pci_resume","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: handle the case of pci_channel_io_frozen only in amdgpu_pci_resume\n\nIn current code, when a PCI error state pci_channel_io_normal is detectd,\nit will report PCI_ERS_RESULT_CAN_RECOVER status to PCI driver, and PCI\ndriver will continue the execution of PCI resume callback report_resume by\npci_walk_bridge, and the callback will go into amdgpu_pci_resume\nfinally, where write lock is releasd unconditionally without acquiring\nsuch lock first. In this case, a deadlock will happen when other threads\nstart to acquire the read lock.\n\nTo fix this, add a member in amdgpu_device strucutre to cache\npci_channel_state, and only continue the execution in amdgpu_pci_resume\nwhen it's pci_channel_io_frozen."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c9a6b82f45e261d247b980a7949aaa6a9bfffe01","status":"affected","lessThan":"785cc093b6b5a93cc350421a55f3f1eda6585156","versionType":"git"},{"version":"c9a6b82f45e261d247b980a7949aaa6a9bfffe01","status":"affected","lessThan":"72e9a1bf9b722628c28092e0c2cd8717edd201dc","versionType":"git"},{"version":"c9a6b82f45e261d247b980a7949aaa6a9bfffe01","status":"affected","lessThan":"248b061689a40f4fed05252ee2c89f87cf26d7d8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu.h","drivers/gpu/drm/amd/amdgpu/amdgpu_device.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.10","versionType":"semver"},{"version":"5.10.241","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.14.12","status":"unaffected","lessThanOrEqual":"5.14.*","versionType":"semver"},{"version":"5.15","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/amdgpu.h","drivers/gpu/drm/amd/amdgpu/amdgpu_device.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/785cc093b6b5a93cc350421a55f3f1eda6585156"},{"url":"https://git.kernel.org/stable/c/72e9a1bf9b722628c28092e0c2cd8717edd201dc"},{"url":"https://git.kernel.org/stable/c/248b061689a40f4fed05252ee2c89f87cf26d7d8"}],"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 amdgpu PCI ERS callbacks are reached only from local PCIe AER non-fatal recovery on the AMD GPU (or local aer_inject), not from network packet processing or adjacent-link protocols.\nAC:L - Once a non-fatal AER recovery runs, amdgpu_pci_resume deterministically unlocks without locking and operates on live schedulers; an attacker who can induce AER via GPU work can retry until in-flight jobs make the corruption path hit, with no luck-based race beyond their control.\nPR:L - An unprivileged local user with DRM render-node access (/dev/dri/renderD*, DRM_RENDER_ALLOW ioctls) can submit GPU work that induces PCIe non-fatal AER on amdgpu systems, matching the PR:L treatment used for related amdgpu AER path bugs; CAP_SYS_ADMIN aer_inject is not required.\nUI:N - The attacker triggers AER recovery and subsequent lock/scheduler corruption themselves through local GPU operations; no separate victim action such as mounting a filesystem or opening a crafted file is required.\nS:U - Impact stays within the host kernel's amdgpu driver authority (deadlock and scheduler/fence list corruption); this is not a VM escape, IOMMU bypass, or other cross-boundary compromise.\nC:H - On the non-fatal path, drm_sched_start(full_recovery=true) re-walks live pending jobs and re-adds dma_fence callbacks that are already linked, corrupting fence cb lists and racing the unparked sched thread on pending_list—an UAF-class primitive enabling arbitrary kernel memory disclosure.\nI:H - The same unsynchronized pending_list walks, double fence-callback insertion, and job re-submission while rings are still running corrupt kernel list/fence state and are exploitable for arbitrary writes and control-flow hijacking; up_write without ownership further corrupts reset_sem concurrency assumptions.\nA:H - amdgpu_device_unlock_adev() calls up_write(&adev->reset_sem) without a matching down_write on the pci_channel_io_normal path, producing a permanent deadlock for subsequent reset_sem takers, and the concurrent scheduler/fence corruption can also oops/panic the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:47:45.513Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.10.241"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.14.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/72e9a1bf9b722628c28092e0c2cd8717edd201dc","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/248b061689a40f4fed05252ee2c89f87cf26d7d8","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T17:30:56.972Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2021-47421","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T15:37:47.598437Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:32:56.726Z"}}]}}}