В ядре Linux устранена следующая уязвимость:
iommu/vt-d: очищать dev-IOTLB только тогда, когда устройство PCIe доступно в масштабируемом режиме. Зафиксируйте 4fc82cd907ac («iommu/vt-d: не выдавать аннулирование ATS
запрос, когда устройство отключено») зависит от
pci_dev_is_disconnected(), чтобы пропустить аннулирование ATS для
безопасно удаленные устройства, но это не распространяется на потерю соединения, вызванную
из-за сбоев, которые все еще могут привести к жесткой блокировке системы. Например, если виртуальной машине не удается подключиться к устройству PCIe,
«virsh Destroy» выполняется для освобождения ресурсов и изоляции
ошибка, но при освобождении группового fd происходит жесткая блокировка.
Отслеживание вызова:
qi_submit_sync
qi_flush_dev_iotlb
intel_pasid_tear_down_entry
device_block_translation
blocking_domain_attach_dev
__iommu_attach_device
__iommu_device_set_domain
__iommu_group_set_domain_internal
iommu_detach_group
vfio_iommu_type1_detach_group
vfio_group_detach_container
vfio_group_fops_release
__fпут
Хотя pci_device_is_present() работает медленнее, чем
pci_dev_is_disconnected(), это по-прежнему занимает всего ~70 мкс на
ConnectX-5 (8 ГТ/с, x2) и становится еще быстрее благодаря скорости PCIe
и ширина увеличивается. Кроме того, devtlb_invalidation_with_pasid() вызывается только в
пути ниже, которые встречаются гораздо реже, чем карта/отмена карты памяти.
1. Релиз мм-структуры
2. {attach,release}_dev
3. установить/удалить PASID
4.
Настройка отслеживания загрязнений
Выигрыш в стабильности системы намного перевешивает незначительные затраты.
использования pci_device_is_present() вместо pci_dev_is_disconnected()
решить, когда пропустить аннулирование ATS, особенно в условиях ГДР
условия высокой нагрузки.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: iommu/vt-d: Flush dev-IOTLB only when PCIe device is accessible in scalable mode Commit 4fc82cd907ac ("iommu/vt-d: Don't issue ATS Invalidation request when device is disconnected") relies on pci_dev_is_disconnected() to skip ATS invalidation for safely-removed devices, but it does not cover link-down caused by faults, which can still hard-lock the system. For example, if a VM fails to connect to the PCIe device, "virsh destroy" is executed to release resources and isolate the fault, but a hard-lockup occurs while releasing the group fd. Call Trace: qi_submit_sync qi_flush_dev_iotlb intel_pasid_tear_down_entry device_block_translation blocking_domain_attach_dev __iommu_attach_device __iommu_device_set_domain __iommu_group_set_domain_internal iommu_detach_group vfio_iommu_type1_detach_group vfio_group_detach_container vfio_group_fops_release __fput Although pci_device_is_present() is slower than pci_dev_is_disconnected(), it still takes only ~70 µs on a ConnectX-5 (8 GT/s, x2) and becomes even faster as PCIe speed and width increase. Besides, devtlb_invalidation_with_pasid() is called only in the paths below, which are far less frequent than memory map/unmap. 1. mm-struct release 2. {attach,release}_dev 3. set/remove PASID 4. dirty-tracking setup The gain in system stability far outweighs the negligible cost of using pci_device_is_present() instead of pci_dev_is_disconnected() to decide when to skip ATS invalidation, especially under GDR high-load conditions.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 8
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.10.214
|
5.10.252
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.15.153
|
5.15.202
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1.83
|
6.1.165
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.6.23
|
6.6.128
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7.11
|
6.8
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.8.2
|
6.12.75
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.16
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
6.19.6
|