GHSA-pm7x-98w8-92pm: NXP ENET-QOS Ethernet driver re-arms RX descriptors with a clobbered DMA buffer address on packet drop
The NXP ENET-QOS Ethernet driver's receive work handler ethnxpenetqosrx() in drivers/ethernet/ethnxpenetqos hands each processed descriptor back to the DMA by writing desc->read.control = rxdescrefreshflags, which sets OWNFLAG and BUF1ADDRVALIDFLAG. 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.buf1addr before re-arming; the four drop paths — errored or non-first descriptor, netpktrxalloc() failure, invalid descriptor length, and netpktgetfrag() 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 (CONFIGNETBUFDATASIZE of 128 and 16 receive descriptors) a single full-size frame consumes twelve ring slots and twelve KNOWAIT 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.
Affected Software
Event History
Frequently Asked Questions
What access does an attacker need to trigger the issue?
An attacker only needs to send traffic to the affected device. The described drop paths are driven entirely by received traffic and require no privilege, user interaction, or special configuration.
Are default driver settings sufficient to make the allocation-failure path reachable?
Yes. With CONFIG_NET_BUF_DATA_SIZE set to 128 and 16 receive descriptors, one full-size frame consumes twelve ring slots and twelve K_NO_WAIT fragment allocations; a short burst can exhaust the receive pools and reach the allocation-failure path.
Which packet-handling conditions can cause a descriptor to be re-armed with a bad DMA address?
The affected paths are an errored or non-first descriptor, net_pkt_rx_alloc() failure, an invalid descriptor length, and net_pkt_get_frag() failure. In these paths, the buffer address is not restored before the descriptor is returned to DMA ownership.
What is the stated security impact?
The supplied severity vector indicates high availability impact, with no stated confidentiality or integrity impact. The issue is rated high with a score of 7.5.