В ядре Linux была устранена следующая уязвимость: iommu/vt-d: Контекстный кэш Flush с правильным SID при разборе псевдонимов domain_context_clear_one() и device_pasid_table_teardown() вызывается один раз в каждом псевдониме устройства DMA. Каждая функция находит запись контекста с помощью пары bus/devfn, обеспечиваемой обратным вызовом pci_for_each_dma_alias(), а затем вызывает intel_context_flush_no_pasid(), который конструирует устройство-селективный кэш контекста из info->bus и info->devfn (то есть всегда запрашивающий ID самого устройства). В результате для каждого псевдонима, отличного от собственного RID устройства, только что очищенная в памяти запись контекста никогда не аннулируется в кэше контекста.
Аппаратное обеспечение может продолжать использовать эту устаревшую кэшированную запись. В пути разбора масштабируемого режима intel_pasid_free_table () может затем освободить каталог PASID, на который все еще ссылается эта устаревшая запись, позволяя IOMMU идти освобожденной памяти. Исправьте это, передав источник ID записи в intel_context_flush_no_pasid(), вместо того, чтобы получать его из info.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: iommu/vt-d: Flush context cache with correct SID when tearing down aliases domain_context_clear_one() and device_pasid_table_teardown() are both invoked once per DMA alias of a device. Each function locates the context entry using the bus/devfn pair provided by the pci_for_each_dma_alias() callback, then calls intel_context_flush_no_pasid(), which constructs a device-selective context-cache invalidation from info->bus and info->devfn (that is, always the requester ID of the device itself). As a result, for every alias other than the device’s own RID, the context entry that was just cleared in memory is never invalidated in the context cache. Hardware may continue using that stale cached entry. In the scalable-mode teardown path, intel_pasid_free_table() can then free the PASID directory still referenced by that stale entry, allowing the IOMMU to walk freed memory. Fix this by passing the source ID of the entry being torn down to intel_context_flush_no_pasid(), instead of deriving it from @info.
Характеристики атаки
Последствия
Строка CVSS v3.1