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: Tue, 25 Aug 2026 13:30:24 +0800 [thread overview]
Message-ID: <22d83e2e-e732-4549-9bfa-fee38f7c6143@linux.dev> (raw)
In-Reply-To: <CAEf4BzaBxRuU_W=UDoy9EB53PvPWdsEAo0=mV4E-N-bmZ1gs5w@mail.gmail.com>
On 25/8/26 04:10, Andrii Nakryiko wrote:
> On Sun, Aug 23, 2026 at 10:04 PM Leon Hwang <leon.hwang@linux.dev> wrote:
>>
>> 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?
>
> I (human) think that yes, it's allowed by checking CAP_NET_ADMIN on
> initial LINK_CREATE for a given target and program (which fixes
> program type), and after that FD ownership can be transferred and BPF
> program can atomically be updated by whoever has that link FD (and new
> program's FD).
Got it. Thanks for the explanation.
>
> But Leon, show a bit more respect to humans next time, please.
Sorry about that. Understand your concern.
Thanks,
Leon
> [...]
next prev parent reply other threads:[~2026-08-25 5:30 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
2026-08-24 20:10 ` Andrii Nakryiko
2026-08-25 5:30 ` Leon Hwang [this message]
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=22d83e2e-e732-4549-9bfa-fee38f7c6143@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