From: Stanislav Fomichev <sdf@google.com>
To: bpf@vger.kernel.org, netdev@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, song@kernel.org, yhs@fb.com,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org
Subject: [PATCH bpf 0/3] bpf: Add BPF_PROG_TYPE_CGROUP_SKB attach type enforcement in BPF_LINK_CREATE
Date: Fri, 26 Apr 2024 16:16:17 -0700 [thread overview]
Message-ID: <20240426231621.2716876-1-sdf@google.com> (raw)
Syzkaller found a case where it's possible to attach cgroup_skb program
to the sockopt hooks. Apparently it's currently possible to do that,
but only when using BPF_LINK_CREATE API. The first patch in the series
has more info on why that happens.
Stanislav Fomichev (3):
bpf: Add BPF_PROG_TYPE_CGROUP_SKB attach type enforcement in
BPF_LINK_CREATE
selftests/bpf: Extend sockopt tests to use BPF_LINK_CREATE
selftests/bpf: Add sockopt case to verify prog_type
kernel/bpf/syscall.c | 5 ++
.../selftests/bpf/prog_tests/sockopt.c | 65 ++++++++++++++++---
2 files changed, 62 insertions(+), 8 deletions(-)
--
2.44.0.769.g3c40516874-goog
next reply other threads:[~2024-04-26 23:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 23:16 Stanislav Fomichev [this message]
2024-04-26 23:16 ` [PATCH bpf 1/3] bpf: Add BPF_PROG_TYPE_CGROUP_SKB attach type enforcement in BPF_LINK_CREATE Stanislav Fomichev
2024-04-29 19:34 ` Eduard Zingerman
2024-04-29 21:17 ` Stanislav Fomichev
2024-04-26 23:16 ` [PATCH bpf 2/3] selftests/bpf: Extend sockopt tests to use BPF_LINK_CREATE Stanislav Fomichev
2024-04-29 19:57 ` Eduard Zingerman
2024-04-26 23:16 ` [PATCH bpf 3/3] selftests/bpf: Add sockopt case to verify prog_type Stanislav Fomichev
2024-04-29 19:58 ` Eduard Zingerman
2024-04-30 18:20 ` [PATCH bpf 0/3] bpf: Add BPF_PROG_TYPE_CGROUP_SKB attach type enforcement in BPF_LINK_CREATE patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240426231621.2716876-1-sdf@google.com \
--to=sdf@google.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=song@kernel.org \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox