linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: KP Singh <kpsingh@kernel.org>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>,
	 Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	 Linus Torvalds <torvalds@linux-foundation.org>,
	Alexei Starovoitov <ast@kernel.org>,
	 Blaise Boscaccy <bboscaccy@linux.microsoft.com>,
	bpf <bpf@vger.kernel.org>,
	 LSM List <linux-security-module@vger.kernel.org>,
	 "K. Y. Srinivasan" <kys@microsoft.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	 Andrii Nakryiko <andrii@kernel.org>,
	wufan@linux.microsoft.com,  Quentin Monnet <qmo@kernel.org>
Subject: Re: [PATCH bpf-next v2 0/3] BPF signature hash chains
Date: Thu, 23 Oct 2025 13:53:00 -0400	[thread overview]
Message-ID: <CAHC9VhRt_g7Ooap-WvSx8NkaodN4YZ03xAw2TX6N16kdrQrwzg@mail.gmail.com> (raw)
In-Reply-To: <CACYkzJ4z4vzVEjtOmFHuC9tpDmWp0N-EH-xDK7Bs6YJ-x0W3Sw@mail.gmail.com>

On Thu, Oct 23, 2025 at 11:39 AM KP Singh <kpsingh@kernel.org> wrote:
> On Wed, Oct 22, 2025 at 11:10 PM James Bottomley
> <James.Bottomley@hansenpartnership.com> wrote:
> > On Mon, 2025-10-20 at 18:25 -0700, Alexei Starovoitov wrote:
> > > On Mon, Oct 20, 2025 at 4:13 PM James Bottomley
> > > <James.Bottomley@hansenpartnership.com> wrote:
> > [...]
> > > > The point, for me, is when doing integrity tests both patch sets
> > > > produce identical results and correctly detect when integrity of a
> > > > light skeleton is compromised (in mathematical terms that means
> > > > they're functionally equivalent).  The only difference is that with
> > > > Blaise's patch set verification completes before the LSM load hook
> > > > is called and with KP's it completes after ... and the security
> > > > problem with the latter case is that there's no LSM hook to collect
> > > > the verification result.
> > >
> > > the security problem with KP's approach? wtf.
> > > I'm going to add "depends on !microsoft" to kconfig bpf_syscall
> > > and be done with it.
> > > Don't use it since it's so insecure.
> >
> > Most Linux installations use LSMs to enforce and manage policies for
> > system integrity (they don't all use the same set of LSMs, but that's
> > not relevant to the argument).  So while Meta may not use LSMs for
> > system integrity the fact that practically everyone else does makes not
> > having a correctly functioning LSM hook for BPF signature verification
> > a problem for a huge set of users that goes way beyond just Microsoft.
>
> The core tenet of your claim is that  you need "LSM observability" but
> without any description of a security policy
> that cannot not be currently implemented. The responses I have
> received are generic statements that the loader verification is
> "unsafe"

As we've discussed this many times across various threads over the
past several months, I don't see much point in revisiting the
argument.  Instead I'll refer you back to my last response to this,
taken from earlier in this thread; the relevant portion is the last
paragraph:

https://lore.kernel.org/linux-security-module/CAHC9VhSDkwGgPfrBUh7EgBKEJj_JjnY68c0YAmuuLT_i--GskQ@mail.gmail.com/

> If you really consider this unsafe, then you can deny loading programs
> with relocations ...

This would require a LSM to inspect BPF programs and maps at load
time, something Alexei has previously rejected, are you now saying
that this would be acceptable?

https://lore.kernel.org/linux-security-module/CAADnVQJyNRZVLPj_nzegCyo+BzM1-whbnajotCXu+GW+5-=P6w@mail.gmail.com/

-- 
paul-moore.com

      reply	other threads:[~2025-10-23 17:53 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-29 21:34 [PATCH bpf-next v2 0/3] BPF signature hash chains Blaise Boscaccy
2025-09-29 21:34 ` [PATCH bpf-next v2 1/3] bpf: Add hash chain signature support for arbitrary maps Blaise Boscaccy
2025-09-29 21:34 ` [PATCH bpf-next v2 2/3] selftests/bpf: Enable map verification for some lskel tests Blaise Boscaccy
2025-09-29 21:34 ` [PATCH bpf-next v2 3/3] bpftool: Add support for signing program and map hash chains Blaise Boscaccy
2025-10-01 21:37 ` [PATCH bpf-next v2 0/3] BPF signature " Paul Moore
2025-10-02 13:48   ` KP Singh
2025-10-02 20:01     ` Blaise Boscaccy
2025-10-03 16:59       ` KP Singh
2025-10-03 18:14         ` Blaise Boscaccy
2025-10-03 19:02           ` KP Singh
2025-10-03  2:35     ` Paul Moore
2025-10-03 16:24       ` KP Singh
2025-10-06  3:08         ` Paul Moore
2025-10-07 13:53           ` KP Singh
2025-10-07 19:59             ` James Bottomley
2025-10-09 20:47             ` Paul Moore
2025-10-10  1:00               ` Alexei Starovoitov
2025-10-10 15:53                 ` James Bottomley
2025-10-10 19:39                   ` Paul Moore
2025-10-10 23:06                   ` Alexei Starovoitov
2025-10-11 14:52                     ` James Bottomley
2025-10-11 16:31                       ` Alexei Starovoitov
2025-10-11 17:09                         ` James Bottomley
2025-10-13  2:12                           ` Paul Moore
2025-10-16 20:51                             ` Paul Moore
2025-10-16 22:00                               ` Alexei Starovoitov
2025-10-17  1:36                                 ` Paul Moore
2025-10-17 18:03                                   ` Alexei Starovoitov
2025-10-17 18:39                                     ` Paul Moore
2025-10-20 23:13                                     ` James Bottomley
2025-10-21  1:25                                       ` Alexei Starovoitov
2025-10-22 21:10                                         ` James Bottomley
2025-10-23 15:39                                           ` KP Singh
2025-10-23 17:53                                             ` Paul Moore [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=CAHC9VhRt_g7Ooap-WvSx8NkaodN4YZ03xAw2TX6N16kdrQrwzg@mail.gmail.com \
    --to=paul@paul-moore.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bboscaccy@linux.microsoft.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kpsingh@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=qmo@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wufan@linux.microsoft.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;
as well as URLs for NNTP newsgroup(s).