CVE-2021-47421
JSON

7.8high

drm/amdgpu: handle the case of pci_channel_io_frozen only in amdgpu_pci_resume

Severity
7.8high CVSS:3.1 by Linux
Exploit likelihood
0.21% (higher than 11% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: handle the case of pci_channel_io_frozen only in amdgpu_pci_resume In current code, when a PCI error state pci_channel_io_normal is detectd, it will report PCI_ERS_RESULT_CAN_RECOVER status to PCI driver, and PCI driver will continue the execution of PCI resume callback report_resume by pci_walk_bridge, and the callback will go into amdgpu_pci_resume finally, where write lock is releasd unconditionally without acquiring such lock first. In this case, a deadlock will happen when other threads start to acquire the read lock. To fix this, add a member in amdgpu_device strucutre to cache pci_channel_state, and only continue the execution in amdgpu_pci_resume when it's pci_channel_io_frozen.

Affected

Product or packageVersionsReported by
Linux Linuxfrom c9a6b82f45e261d247b980a7949aaa6a9bfffe01 before 785cc093b6b5a93cc350421a55f3f1eda6585156, from c9a6b82f45e261d247b980a7949aaa6a9bfffe01 before 72e9a1bf9b722628c28092e0c2cd8717edd201dc, from c9a6b82f45e261d247b980a7949aaa6a9bfffe01 before 248b061689a40f4fed05252ee2c89f87cf26d7d8, 5.10
Not affected: before 5.10, from 5.10.241 up to 5.10.*, from 5.14.12 up to 5.14.*, from 5.15 up to *
CVE List
linux linux_kernelfrom 5.10 before 5.10.241, from 5.11 before 5.14.12, 5.15NVD

All scores

Linux7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-667

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: handle the case of pci_channel_io_frozen only in amdgpu_pci_resume In current code, when a PCI error state pci_channel_io_normal is detectd, it will report PCI_ERS_RESULT_CAN_RECOVER status to PCI driver, and PCI driver will continue the execution of PCI resume callback report_resume by pci_walk_bridge, and the callback will go into amdgpu_pci_resume finally, where write lock is releasd unconditionally without acquiring such lock first. In this case, a deadlock will happen when other threads start to acquire the read lock. To fix this, add a member in amdgpu_device strucutre to cache pci_channel_state, and only continue the execution in amdgpu_pci_resume when it's pci_channel_io_frozen.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: drm/amdgpu: maneja el caso de pci_channel_io_frozen solo en amdgpu_pci_resume. En el código actual, cuando se detecta un estado de error de PCI pci_channel_io_normal, informará el estado de PCI_ERS_RESULT_CAN_RECOVER al controlador PCI, y el controlador PCI continúe la ejecución de PCI resume callback report_resume mediante pci_walk_bridge, y la devolución de llamada finalmente irá a amdgpu_pci_resume, donde el bloqueo de escritura se libera incondicionalmente sin adquirir dicho bloqueo primero. En este caso, se producirá un punto muerto cuando otros subprocesos comiencen a adquirir el bloqueo de lectura. Para solucionar este problema, agregue un miembro en la estructura amdgpu_device para almacenar en caché pci_channel_state y solo continúe la ejecución en amdgpu_pci_resume cuando sea pci_channel_io_frozen.

References

Sources

SourceRecordLicence
CVE ListCVE-2021-47421 changed 2026-08-05CVE Terms of Use
NVDCVE-2021-47421 changed 2026-08-04Public domain