В ядре Linux была устранена следующая уязвимость: eth: fbnic: звоните в дверной звонок, если всплеск заканчивается падением fbnic_tx_map() пропускает запись дверного звонка, и запрос завершения для каждого пакета, переданного ему с набором xmit_more, рассчитывает на пакет, который заканчивает всплеск, чтобы опубликовать их все. Когда вместо этого выпадает пакет - skb_put_padto(), skb_cow_head() или ошибка отображения DMA - ничего не звонит. Дескрипторы предыдущих пакетов остаются невидимыми для HW до следующей передачи в этой очереди, которая для рабочей нагрузки burst-then-idle может никогда не прийти.
Запомните мета-дескриптор последнего пакета, оставленного без дверного звонка, и смойте его с путей ошибок. Запрос завершения должен быть установлен на этом дескрипторе, а не просто писать хвост, в противном случае HW будет передавать пакеты, но никогда не сообщать об голове, и кольцо будет заполняться и останавливаться навсегда. Это очень похоже на недавнюю серию исправлений Joe's для bnxt.
Не наблюдается в реальной жизни, воспроизводится под QEMU с инжекцией отказа.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: eth: fbnic: ring the doorbell if a burst ends in a drop fbnic_tx_map() skips the doorbell write, and the completion request, for every packet handed to it with xmit_more set, counting on the packet which ends the burst to publish them all. When that packet is dropped instead - skb_put_padto(), skb_cow_head() or a DMA mapping failure - nothing rings. The descriptors of the preceding packets stay invisible to the HW until the next transmit on that queue, which for a burst-then-idle workload may never come. Remember the meta descriptor of the last packet left without a doorbell and flush it from the error paths. The completion request has to be set on that descriptor rather than simply writing the tail, otherwise the HW would transmit the packets but never report a head, and the ring would fill up and stall for good. This is very similar to Joe's recent series of fixes for bnxt. Not seen in real life, reproduced under QEMU with failure injection.