xsk: tighten UMEM headroom validation to account for tailroom and min frame
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 99e3a236dd43d06c65af0a2ef9cb44306aef6e02 · < 9ea6ba4f3195dcba6e8b3e7b2e748593b7cafb12| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xsk: tighten UMEM headroom validation to account for tailroom and min frame
The current headroom validation in xdp_umem_reg() could leave us with insufficient space dedicated to even receive minimum-sized ethernet frame. Furthermore if multi-buffer would come to play then skb_shared_info stored at the end of XSK frame would be corrupted.
HW typically works with 128-aligned sizes so let us provide this value as bare minimum.
Multi-buffer setting is known later in the configuration process so besides accounting for 128 bytes, let us also take care of tailroom space upfront.
From the CVE record · Linux
The Linux kernel's XSK UMEM headroom validation can allow too little space for a minimum-sized Ethernet frame. If multi-buffer support is used, this can corrupt skb_shared_info stored at the end of an XSK frame. The input does not specify attacker access or user-interaction requirements.
Engineers running Linux kernels with XSK UMEM support should check their versions against the vendor advisory; affected versions are not specified.