В ядре Linux устранена следующая уязвимость:
KVM:arm64:vgic: Убедитесь, что прерывание все еще принадлежит нам, прежде чем переносить его.
vgic_prune_ap_list() удаляет ap_list_lock и irq_lock во время миграции
прерывание другого виртуального процессора. После повторного получения блокировок он проверяет только
что сходство не изменилось (target_vcpu == vgic_target_oracle(irq))
перед перемещением прерывания, что предполагает, что прерывание, близость которого
сохраняется, все еще находится в очереди в ap_list этого виртуального ЦП. Это предположение больше не выполняется, если прерывание удалено из ap_list.
пока замки опущены. vgic_flush_pending_lpis() удаляет
прерывание из списка и устанавливает irq->vcpu в NULL, но оставляет
включен/ожидается/target_vcpu нетронут.
Поскольку прерывание все еще разрешено
и в ожидании, vgic_target_oracle() возвращает тот же target_vcpu, поэтому
проверка сходства проходит, и list_del() запускается второй раз для записи, которая
уже удален. Также убедитесь, что прерывание по-прежнему назначено этому виртуальному процессору.
(irq->vcpu == vcpu) перед его перемещением.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: KVM: arm64: vgic: Check the interrupt is still ours before migrating it vgic_prune_ap_list() drops both ap_list_lock and irq_lock while migrating an interrupt to another vCPU. After reacquiring the locks it only checks that the affinity is unchanged (target_vcpu == vgic_target_oracle(irq)) before moving the interrupt, which assumes that an interrupt whose affinity is preserved is still queued on this vCPU's ap_list. That assumption no longer holds if the interrupt is taken off the ap_list while the locks are dropped. vgic_flush_pending_lpis() removes the interrupt from the list and sets irq->vcpu to NULL, but leaves enabled/pending/target_vcpu untouched. As the interrupt is still enabled and pending, vgic_target_oracle() returns the same target_vcpu, so the affinity check passes and list_del() is run a second time on an entry that has already been removed. Also check that the interrupt is still assigned to this vCPU (irq->vcpu == vcpu) before moving it.
Характеристики атаки
Последствия
Строка CVSS v3.1