NXP ENET-QOS Ethernet получает обработчик работы eth_nxp_enet_qos_rx() в drivers/ethernet/eth_nxp_enet_qos, передает каждый обработанный дескриптор обратно в DMA, записывая desc->read.control rx_desc_refresh_flags, который устанавливает OWN_FLAG и BUF1_ADDR_VALID_FLAG. RDES0 приемного дескриптора — это буферный адрес DMA в формате чтения, но аппаратные псевдонимы для записи содержат это слово с полями тегов VLAN (или, для контекстного дескриптора, низкое слово с меткой времени), поэтому оно уничтожается при каждом завершении. Путь успеха переписывает desc->read.buf1_addr перед перевооружением; четыре пути падения — ошибочный или непервый дескриптор, отказ net_pkt_rx_alloc (), недействительная длина дескриптора и отказ net_pkt_get_frag () — не сделали этого, перевооружив слот кольца с остатком записи в качестве целевого адреса DMA.
Траектории падения управляются исключительно полученным трафиком и не нуждаются в привилегиях или специальной конфигурации. По умолчанию для этого драйвера (CONFIG_NET_BUF_DATA_SIZE из 128 и 16 получают дескрипторы) один полноразмерный кадр потребляет двенадцать кольцевых слотов и двенадцать выделений фрагментов K_NO_WAIT, поэтому короткий всплеск кадров, отправленных на устройство, истощает пулы приема и достигает путей отказа выделения; кадр с ошибкой приема или любой кадр, чей первый дескриптор уже был удален, достигает пути non-first-descriptor. После отравления слота DMA записывает следующий кадр, полученный в этом слоте, на адрес, полученный из полей тегов VLAN, а не в буфер приема.
На поддерживаемом MCX SoCs этот адрес попадает во флэш-память или зарезервированное пространство, поэтому передача вызывает фатальную ошибку шины, которую водитель регистрирует только - нет сброса или пути восстановления - и прием прекращается навсегда, пока устройство не будет перезагружено; где запись молча отбрасывается, нетронутый буфер позже передается в сетевой стек с длиной, доставляя несвежее содержимое буфера, как если бы они были принятым кадром. Одного триггерного события достаточно, чтобы сделать условие постоянным, поэтому злоумышленник, способный отправить трафик на устройство, может навсегда отключить его сетевой интерфейс.
Показать оригинальное описание (EN)
The NXP ENET-QOS Ethernet driver's receive work handler eth_nxp_enet_qos_rx() in drivers/ethernet/eth_nxp_enet_qos hands each processed descriptor back to the DMA by writing desc->read.control = rx_desc_refresh_flags, which sets OWN_FLAG and BUF1_ADDR_VALID_FLAG. RDES0 of a receive descriptor is the DMA buffer address in read format, but the hardware write-back aliases that word with the VLAN tag fields (or, for a context descriptor, the timestamp low word), so it is destroyed on every completion. The success path rewrites desc->read.buf1_addr before re-arming; the four drop paths — errored or non-first descriptor, net_pkt_rx_alloc() failure, invalid descriptor length, and net_pkt_get_frag() failure — did not, re-arming the ring slot with the write-back residue as its DMA target address. The drop paths are driven entirely by received traffic and need no privilege or special configuration. With the defaults for this driver (CONFIG_NET_BUF_DATA_SIZE of 128 and 16 receive descriptors) a single full-size frame consumes twelve ring slots and twelve K_NO_WAIT fragment allocations, so a short burst of frames sent to the device exhausts the receive pools and reaches the allocation-failure paths; a frame with a receive error, or any frame whose first descriptor was already dropped, reaches the non-first-descriptor path. Once a slot has been poisoned, the DMA writes the next frame received in that slot to an address derived from the frame's VLAN tag fields rather than to a receive buffer. On the supported MCX SoCs that address falls in flash or reserved space, so the transfer raises a fatal bus error that the driver only logs — there is no reset or recovery path — and reception stops permanently until the device is rebooted; where the write is silently discarded instead, the untouched buffer is later handed to the network stack with a length, delivering stale buffer contents as if they were a received frame. A single triggering event is enough to make the condition persistent, so an attacker able to send traffic to the device can permanently disable its network interface.
Характеристики атаки
Последствия
Строка CVSS v3.1