mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jérémy Jean" <jeremy.jean@oss.cyber.gouv.fr>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: 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, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] bpf: netns: require CAP_NET_ADMIN for link targets
Date: Mon, 02 Nov 2026 23:35:03 +0100	[thread overview]
Message-ID: <d984ed03fbd7b6c12b88f1a18d7762f6@oss.cyber.gouv.fr> (raw)
In-Reply-To: <DML2GFI6LWXU.3ODKDXNQDBYYA@gmail.com>

On 2026-11-02 23:08, Alexei Starovoitov wrote:
> On Mon, Nov 02, 2026 at 12:29 PM Jérémy Jean 
> <Jeremy.Jean@oss.cyber.gouv.fr> wrote:
>> BPF tokens allow a process to load BPF programs using CAP_NET_ADMIN in
>> a userns, however, netns_bpf_link_create() does not check for
>> CAP_NET_ADMIN in the target netns. Consequently, a token can be used
>> to attach a BPF program to a netns it does not control.
> 
> That's not a gap. The prog FD and the netns FD are the permission.
> 
> pw-bot: cr

Thanks for the reply, yet I feel that I misunderstood something.
At first, it seemed to me that there was a security boundary issue,
but digging more with your feedback and Sashiko's one, I believe I was 
wrong,
that there is no issue and that this patch should instead simply be 
dropped.
Am I right? Or do you believe that there are still things to fix?

Regards,
Jérémy

      reply	other threads:[~2026-11-02 22:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 20:29 Jérémy Jean
2026-11-02 20:53 ` bot+bpf-ci
2026-11-02 22:08 ` Alexei Starovoitov
2026-11-02 22:35   ` Jérémy Jean [this message]

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=d984ed03fbd7b6c12b88f1a18d7762f6@oss.cyber.gouv.fr \
    --to=jeremy.jean@oss.cyber.gouv.fr \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=memxor@gmail.com \
    --cc=stable@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®