bpf: Don't redirect packets with invalid pkt_len
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:
bpf: Don't redirect packets with invalid pkt_len
Syzbot found an issue [1]: fq_codel_drop() try to drop a flow whitout any skbs, that is, the flow->head is null. The root cause, as the [2] says, is because that bpf_prog_test_run_skb() run a bpf prog which redirects empty skbs. So we should determine whether the length of the packet modified by bpf prog or others like bpf_prog_test is valid before forwarding it directly.
From the CVE record · Linux
The Linux kernel can redirect an empty packet buffer when a BPF program is run through bpf_prog_test_run_skb(). This can cause fq_codel_drop() to attempt to drop a flow with no packets. The input does not establish whether exploitation requires local or network access, authentication, or user interaction.
Engineers running the Linux kernel should check their versions against the vendor advisory; affected versions are not specified in the input.