bpf: Check validity of link->type in bpf_link_show_fdinfo()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 70ed506c3bbcfa846d4636b23051ca79fa4781f7 · < 8421d4c8762bd022cb491f2f0f7019ef51b4f0a7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Check validity of link->type in bpf_link_show_fdinfo()
If a newly-added link type doesn't invoke BPF_LINK_TYPE(), accessing bpf_link_type_strs[link->type] may result in an out-of-bounds access.
To spot such missed invocations early in the future, checking the validity of link->type in bpf_link_show_fdinfo() and emitting a warning when such invocations are missed.
From the CVE record · Linux
The Linux kernel's bpf_link_show_fdinfo() can access beyond the bpf_link_type_strs array if a newly added link type does not invoke BPF_LINK_TYPE(). This can cause an out-of-bounds read; the input does not specify attacker access requirements or user interaction.
Engineers running the Linux kernel should check their versions against the vendor advisory; affected versions are not specified.