netkit: Assign missing bpf_net_context
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:
netkit: Assign missing bpf_net_context
During the introduction of struct bpf_net_context handling for XDP-redirect, the netkit driver has been missed, which also requires it because NETKIT_REDIRECT invokes skb_do_redirect() which is accessing the per-CPU variables. Otherwise we see the following crash:
BUG: kernel NULL pointer dereference, address: 0000000000000038 bpf_redirect() netkit_xmit() dev_hard_start_xmit()
Set the bpf_net_context before invoking netkit_xmit() program within the netkit driver.
From the CVE record · Linux
The Linux kernel’s netkit driver can dereference a null pointer because it does not set the required bpf_net_context before invoking a netkit_xmit() program. A NETKIT_REDIRECT operation can trigger a kernel crash; the input does not specify the attacker access or authentication needed to reach this condition.
Engineers running Linux kernels that use the netkit driver should check their versions; affected versions are not specified.