aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorStanislav Fomichev <[email protected]>2024-04-26 23:16:18 +0000
committerMartin KaFai Lau <[email protected]>2024-04-30 17:43:37 +0000
commit543576ec15b17c0c93301ac8297333c7b6e84ac7 (patch)
tree9ee27656356c0a9d30f53a807ef9f42a931f5c00 /net/unix/af_unix.c
parentMerge branch 'qed-error-codes' (diff)
downloadkernel-543576ec15b17c0c93301ac8297333c7b6e84ac7.tar.gz
kernel-543576ec15b17c0c93301ac8297333c7b6e84ac7.zip
bpf: Add BPF_PROG_TYPE_CGROUP_SKB attach type enforcement in BPF_LINK_CREATE
bpf_prog_attach uses attach_type_to_prog_type to enforce proper attach type for BPF_PROG_TYPE_CGROUP_SKB. link_create uses bpf_prog_get and relies on bpf_prog_attach_check_attach_type to properly verify prog_type <> attach_type association. Add missing attach_type enforcement for the link_create case. Otherwise, it's currently possible to attach cgroup_skb prog types to other cgroup hooks. Fixes: af6eea57437a ("bpf: Implement bpf_link-based cgroup BPF program attachment") Link: https://lore.kernel.org/bpf/[email protected]/ Reported-by: [email protected] Signed-off-by: Stanislav Fomichev <[email protected]> Acked-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions