bnxt: fix head underflow on XDP head-grow
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f6974b4c2d8e1062b5a52228ee47293c15b4ee1e · < e26657fe3b85c068b01f42bb0c602f242d643ba9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bnxt: fix head underflow on XDP head-grow
The xdp.py test test_xdp_native_adjst_head_grow_data crashes when run on a bnxt machine (and also crashes in NIPA).
It seems that the bug is an underflow in bnxt_rx_multi_page_skb, which builds the skb head:
napi_build_skb(data_ptr - bp->rx_offset, rxr->rx_page_size);
The problem with this expression is that in page mode, rx_offset is:
bp->rx_offset = NET_IP_ALIGN + XDP_PACKET_HEADROOM;
Which evaluates (at least on x86_64) to 258.
From the CVE record · Linux
The Linux kernel’s bnxt receive path can underflow the packet buffer head when XDP grows it. This can corrupt page reference counts and cause a double free during driver teardown. The input does not specify attacker access, authentication requirements, or user interaction.
Engineers running Linux with the bnxt driver should check their kernels; affected versions are not specified.