Files
kernel-spacemit-k1/kernel/bpf
Hou Tao d5092b0a1a bpf: Check validity of link->type in bpf_link_show_fdinfo()
[ Upstream commit 8421d4c8762bd022cb491f2f0f7019ef51b4f0a7 ]

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 <houtao1@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241024013558.1135167-3-houtao@huaweicloud.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-17 15:08:58 +01:00
..
2023-03-08 16:19:51 -08:00
2024-11-01 01:58:18 +01:00
2024-03-26 18:20:12 -04:00
2024-11-01 01:58:30 +01:00
2024-11-01 01:58:30 +01:00
2024-11-01 01:58:25 +01:00