net: xdp: Disallow attaching device-bound programs in generic mode
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: xdp: Disallow attaching device-bound programs in generic mode
Device-bound programs are used to support RX metadata kfuncs. These kfuncs are driver-specific and rely on the driver context to read the metadata. This means they can't work in generic XDP mode. However, there is no check to disallow such programs from being attached in generic mode, in which case the metadata kfuncs will be called in an invalid context, leading to crashes.
Fix this by adding a check to disallow attaching device-bound programs in generic mode.
From the CVE record · Linux
The Linux kernel permits device-bound XDP programs to be attached in generic mode, where their driver-specific metadata functions run in an invalid context. This can cause crashes when such a program is attached; the input does not specify whether an attacker needs authentication or user interaction.
Engineers running Linux kernels that support device-bound XDP programs should check their exposure; affected versions are not specified.