xen/netfront: drop RX packets with a short Ethernet header
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0d160211965b79de989cf2d170985abeb8da5ec6 · < 72d2f54367895d6e236b9857892e2e6b6036e067| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xen/netfront: drop RX packets with a short Ethernet header
handle_incoming_queue() pulls pull_to bytes into the head before calling eth_type_trans(). pull_to is the length of the first RX slot, capped at RX_COPY_THRESHOLD, and that length comes from the backend. Nothing checks it against ETH_HLEN.
If the first slot is shorter than ETH_HLEN and more slots follow, the head ends up shorter than an Ethernet header while skb->len is longer, and eth_type_trans() BUG()s in __skb_pull(). If the whole packet is shorter than ETH_HLEN, eth_type_trans() reads the header past the end of the data instead.
Pull at least ETH_HLEN, and drop the packet if that fails, which also drops packets too short to hold an Ethernet header. This also checks the return value of the pull, which was ignored.
From the CVE record · Linux
The Linux kernel’s xen/netfront receive path does not ensure an incoming packet has a complete Ethernet header before processing it. A short first RX slot with additional slots can trigger a kernel BUG; a packet shorter than an Ethernet header can cause a read past the packet data. The input does not specify authentication requirements or user interaction.
Engineers running Linux kernels with xen/netfront should check their kernel versions against the vendor advisory; affected versions are not specified.