В ядре Linux устранена следующая уязвимость:
drm/amdgpu: обрабатывать случай pci_channel_io_frozen только в amdgpu_pci_resume
В текущем коде, когда обнаруживается состояние ошибки PCI pci_channel_io_normal,
он сообщит о статусе PCI_ERS_RESULT_CAN_RECOVER драйверу PCI, а PCI
драйвер продолжит выполнение обратного вызова возобновления PCI report_resume по
pci_walk_bridge, и обратный вызов перейдет в amdgpu_pci_resume
наконец, где блокировка записи снимается безоговорочно без получения
такой замок первый. В этом случае взаимоблокировка произойдет, когда другие потоки
начать получать блокировку чтения.
Чтобы это исправить, добавьте элемент в структуру amdgpu_device для кэширования.
pci_channel_state и продолжать выполнение только в amdgpu_pci_resume.
когда это pci_channel_io_frozen.
Показать оригинальное описание (EN)
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.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 6
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.10
|
5.10.241
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.14.12
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:5.15:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:5.15:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:5.15:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:5.15:rc4:*:*:*:*:*:*
|
— | — |