ice: change XDP RxQ frag_size from DMA write length to xdp.frame_sz
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ice: change XDP RxQ frag_size from DMA write length to xdp.frame_sz
The only user of frag_size field in XDP RxQ info is bpf_xdp_frags_increase_tail(). It clearly expects whole buff size instead of DMA write size. Different assumptions in ice driver configuration lead to negative tailroom.
This allows to trigger kernel panic, when using XDP_ADJUST_TAIL_GROW_MULTI_BUFF xskxceiver test and changing packet size to 6912 and the requested offset to a huge value, e.g. XSK_UMEM__MAX_FRAME_SIZE * 100.
Due to other quirks of the ZC configuration in ice, panic is not observed in ZC mode, but tailroom growing still fails when it should not.
Use fill queue buffer truesize instead of DMA write size in XDP RxQ info. Fix ZC mode too by using the new helper.
From the CVE record · Linux
The Linux kernel ice driver uses the DMA write size where XDP expects the full buffer size, which can produce negative tailroom. A kernel panic can be triggered when running the XDP_ADJUST_TAIL_GROW_MULTI_BUFF xskxceiver test with a packet size of 6912 and a very large requested offset. In zero-copy mode, tailroom growth can fail when it should succeed, but the panic is not observed.
Engineers running Linux kernels with the ice driver and XDP should check their systems; affected versions were not specified.