Hou Tao 6d79f12c0c bpf: Add the missing BPF_LINK_TYPE invocation for sockmap
[ Upstream commit c2f803052bc7a7feb2e03befccc8e49b6ff1f5f5 ]

There is an out-of-bounds read in bpf_link_show_fdinfo() for the sockmap
link fd. Fix it by adding the missing BPF_LINK_TYPE invocation for
sockmap link

Also add comments for bpf_link_type to prevent missing updates in the
future.

Fixes: 699c23f02c65 ("bpf: Add bpf_link support for sk_msg and sk_skb progs")
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241024013558.1135167-2-houtao@huaweicloud.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-01 02:02:38 +01:00
..
2024-04-25 20:56:15 -07:00
2024-06-06 11:44:42 -07:00
2024-03-26 11:07:21 -07:00