diff options
author | Hou Tao <[email protected]> | 2024-10-24 09:35:58 +0800 |
---|---|---|
committer | Andrii Nakryiko <[email protected]> | 2024-10-24 10:17:12 -0700 |
commit | 8421d4c8762bd022cb491f2f0f7019ef51b4f0a7 (patch) | |
tree | efb828d257aea579f783c2792164a55c3ce9f8b9 /scripts/generate_rust_analyzer.py | |
parent | c2f803052bc7a7feb2e03befccc8e49b6ff1f5f5 (diff) |
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.
Signed-off-by: Hou Tao <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions