xsk: validate MTU against usable frame size on bind
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:
xsk: validate MTU against usable frame size on bind
AF_XDP bind currently accepts zero-copy pool configurations without verifying that the device MTU fits into the usable frame space provided by the UMEM chunk.
This becomes a problem since we started to respect tailroom which is subtracted from chunk_size (among with headroom). 2k chunk size might not provide enough space for standard 1500 MTU, so let us catch such settings at bind time. Furthermore, validate whether underlying HW will be able to satisfy configured MTU wrt XSK's frame size multiplied by supported Rx buffer chain length (that is exposed via net_device::xdp_zc_max_segs).
From the CVE record · Linux
The Linux kernel's AF_XDP bind can accept a zero-copy UMEM configuration even when the device MTU exceeds the usable frame space after headroom and tailroom are subtracted. This allows an undersized frame configuration to pass bind-time validation; the input does not specify an attack path or authentication requirements.
Engineers running Linux kernels that use AF_XDP zero-copy pools should check their configurations; affected versions are not specified.