В ядре Linux была устранена следующая уязвимость: PCI: Allow на функцию слотов PCI для исправления сброса слота на s390 В системах s390, использующих гипервизор машинного уровня, устройства PCI всегда доступны через форму сквозной передачи PCI, которая в основном работает на гранулярности функции PCI. Это также отражено в драйвере hotplug s390 PCI, который создает слоты hotplug для отдельных функций PCI. Его функция reset_slot(), которая является обёрткой для zpci_hot_reset_device(), таким образом, также сбрасывает отдельные функции.
В настоящее время pci_create_slot() присваивает тот же объект pci_slot многофункциональным устройствам. Этот подход прекрасно работал на системах s390, которые предоставляли операционным системам виртуальные функции только в виде отдельных доменов PCI. Поскольку commit 44510d6fa0c0 («s390/pci: Handling multifunctions») s390 поддерживает раскрытие топологии многофункциональных устройств PCI, группируя их в общий домен PCI.
Это создает проблему при сбросе функции через интерфейс драйвера slot_reset (). При попытке сбросить функцию через драйвер hotplug общее назначение слота вызывает сброс неправильной функции вместо предполагаемой. Это также утечка памяти, как мы создаем объект pci_slot для функции, но не правильно освободить его в pci_slot_release().
Добавьте флаг для struct pci_slot, чтобы разрешить для каждой функции слоты PCI для функций, управляемых через гипервизор, который предоставляет отдельные функции PCI, сохраняя при этом топологию. Поскольку мы можем использовать все 8 бит для слота 'number' (для устройств ARI), измените слот 'number' u16, чтобы учесть специальные значения PCI_SLOT_PLACEHOLDER и PCI_SLOT_ALL_DEVICES.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: PCI: Allow per function PCI slots to fix slot reset on s390 On s390 systems, which use a machine level hypervisor, PCI devices are always accessed through a form of PCI pass-through which fundamentally operates on a per PCI function granularity. This is also reflected in the s390 PCI hotplug driver which creates hotplug slots for individual PCI functions. Its reset_slot() function, which is a wrapper for zpci_hot_reset_device(), thus also resets individual functions. Currently, the pci_create_slot() assigns the same pci_slot object to multifunction devices. This approach worked fine on s390 systems that only exposed virtual functions as individual PCI domains to the operating system. Since commit 44510d6fa0c0 ("s390/pci: Handling multifunctions") s390 supports exposing the topology of multifunction PCI devices by grouping them in a shared PCI domain. This creates a problem when resetting a function through the hotplug driver's slot_reset() interface. When attempting to reset a function through the hotplug driver, the shared slot assignment causes the wrong function to be reset instead of the intended one. It also leaks memory as we do create a pci_slot object for the function, but don't correctly free it in pci_slot_release(). Add a flag for struct pci_slot to allow per function PCI slots for functions managed through a hypervisor, which exposes individual PCI functions while retaining the topology. Since we can use all 8 bits for slot 'number' (for ARI devices), change slot 'number' u16 to account for special values PCI_SLOT_PLACEHOLDER and PCI_SLOT_ALL_DEVICES.
Характеристики атаки
Последствия
Строка CVSS v3.1