diff options
author | 2024-10-24 09:35:57 +0800 | |
---|---|---|
committer | 2024-10-24 10:17:12 -0700 | |
commit | c2f803052bc7a7feb2e03befccc8e49b6ff1f5f5 (patch) | |
tree | f2cf4b0f659d88cc5ddd58188844f26f4ee11e80 /include/linux/bpf_types.h | |
parent | bpf: fix do_misc_fixups() for bpf_get_branch_snapshot() (diff) | |
download | wireguard-linux-c2f803052bc7a7feb2e03befccc8e49b6ff1f5f5.tar.xz wireguard-linux-c2f803052bc7a7feb2e03befccc8e49b6ff1f5f5.zip |
bpf: Add the missing BPF_LINK_TYPE invocation for sockmap
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
Diffstat (limited to 'include/linux/bpf_types.h')
-rw-r--r-- | include/linux/bpf_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf_types.h b/include/linux/bpf_types.h index 9f2a6b83b49e..fa78f49d4a9a 100644 --- a/include/linux/bpf_types.h +++ b/include/linux/bpf_types.h @@ -146,6 +146,7 @@ BPF_LINK_TYPE(BPF_LINK_TYPE_XDP, xdp) BPF_LINK_TYPE(BPF_LINK_TYPE_NETFILTER, netfilter) BPF_LINK_TYPE(BPF_LINK_TYPE_TCX, tcx) BPF_LINK_TYPE(BPF_LINK_TYPE_NETKIT, netkit) +BPF_LINK_TYPE(BPF_LINK_TYPE_SOCKMAP, sockmap) #endif #ifdef CONFIG_PERF_EVENTS BPF_LINK_TYPE(BPF_LINK_TYPE_PERF_EVENT, perf) |