From: Leon Hwang <leon.hwang@linux.dev>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Sanghyun Park <sanghyun.park.cnu@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
bpf@vger.kernel.org, John Fastabend <john.fastabend@gmail.com>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
Jiri Olsa <jolsa@kernel.org>,
Emil Tsalapatis <emil@etsalapatis.com>,
Ihor Solodrai <ihor.solodrai@linux.dev>,
Stanislav Fomichev <sdf@fomichev.me>,
Pu Lehui <pulehui@huawei.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v3] bpf: Fix stack out-of-bounds write in cgroup link update
Date: Mon, 24 Aug 2026 13:04:38 +0800 [thread overview]
Message-ID: <68358803-57c9-4a89-9da3-fb5e12547e0f@linux.dev> (raw)
In-Reply-To: <CAEf4BzYM+b4E5S6ZCDcpEaw2uvdNPDVUdTgxUxkvCdM86DkubQ@mail.gmail.com>
On 22/8/26 03:35, Andrii Nakryiko wrote:
> On Fri, Aug 21, 2026 at 3:26 AM Leon Hwang <leon.hwang@linux.dev> wrote:
[...]
>>
>> Any issue of checking CAP_NET_ADMIN for BPF_LINK_UPDATE?
>>
>> If no, checking CAP_NET_ADMIN for BPF_LINK_UPDATE looks okay.
>>
>
> Why do we need extra capability checks during LINK_UPDATE if we
> already performed the check during LINK_CREATE? If you pass link fd to
> some process that doesn't have CAP_NET_ADMIN, but has link fd and
> another validated prog fd, they should be able to update the
> underlying program without extra checks, IMO.
>
What if a pinned link is updated by non-CAP_NET_ADMIN users? I (LLM)
verified the case by the selftest [1]. Is this case allowed intentionally?
[1] https://github.com/Asphaltt/bpf/commits/bpf/link-update-issue/v1/
Thanks,
Leon
next prev parent reply other threads:[~2026-08-24 5:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 8:47 [PATCH bpf-next v3] bpf: Fix stack out-of-bounds write in cgroup link update Sanghyun Park
2026-08-21 9:41 ` bot+bpf-ci
2026-08-21 10:26 ` Leon Hwang
2026-08-21 19:35 ` Andrii Nakryiko
2026-08-24 5:04 ` Leon Hwang [this message]
2026-08-24 20:10 ` Andrii Nakryiko
2026-08-25 5:30 ` Leon Hwang
2026-08-21 13:41 ` Leon Hwang
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=68358803-57c9-4a89-9da3-fb5e12547e0f@linux.dev \
--to=leon.hwang@linux.dev \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=pulehui@huawei.com \
--cc=sanghyun.park.cnu@gmail.com \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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