From: Kuniyuki Iwashima <kuni1840@gmail.com>
To: paul@paul-moore.com
Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org,
casey@schaufler-ca.com, daniel@iogearbox.net, eddyz87@gmail.com,
gnoack@google.com, haoluo@google.com, jmorris@namei.org,
john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org,
kuni1840@gmail.com, kuniyu@google.com,
linux-security-module@vger.kernel.org, martin.lau@linux.dev,
memxor@gmail.com, mic@digikod.net, netdev@vger.kernel.org,
omosnace@redhat.com, sdf@fomichev.me, selinux@vger.kernel.org,
serge@hallyn.com, song@kernel.org,
stephen.smalley.work@gmail.com, yonghong.song@linux.dev
Subject: Re: [PATCH v2 bpf-next 0/4] af_unix: Allow BPF LSM to filter SCM_RIGHTS at sendmsg().
Date: Sat, 14 Jun 2025 13:40:04 -0700 [thread overview]
Message-ID: <20250614204044.2190213-1-kuni1840@gmail.com> (raw)
In-Reply-To: <1976e40bd50.28a7.85c95baa4474aabc7814e68940a78392@paul-moore.com>
From: Paul Moore <paul@paul-moore.com>
Date: Sat, 14 Jun 2025 07:43:46 -0400
> On June 13, 2025 6:24:15 PM Kuniyuki Iwashima <kuni1840@gmail.com> wrote:
> > From: Kuniyuki Iwashima <kuniyu@google.com>
> >
> > Since commit 77cbe1a6d873 ("af_unix: Introduce SO_PASSRIGHTS."),
> > we can disable SCM_RIGHTS per socket, but it's not flexible.
> >
> > This series allows us to implement more fine-grained filtering for
> > SCM_RIGHTS with BPF LSM.
>
> My ability to review this over the weekend is limited due to device and
> network access, but I'll take a look next week.
>
> That said, it would be good if you could clarify the "filtering" aspect of
> your comments; it may be obvious when I'm able to look at the full patchset
I meant to mention that just below the quoted part :)
---8<---
Changes:
v2: Remove SCM_RIGHTS fd scrubbing functionality
---8<---
> in context, but the commit descriptions worry me that perhaps you are still
> intending on using the LSM framework to cut SCM_RIGHTS payloads from
> individual messages? Blocking messages at send time if they contain
> SCM_RIGHTS is likely okay (pending proper implementation review), but
> modifying packets in flight in the LSM framework is not.
>
> Also, a quick administrative note, I see you have marked this as
> "bpf-next", however given the diffstat of the proposed changes this
> patchset should go to Linus via the LSM tree and not the BPF tree.
This was to kick the BPF CI for the selftest patch, and the __nullable
arg suffix in patch 3 is BPF specific stuff, but I don't have preference
here and whichever is fine to me.
next prev parent reply other threads:[~2025-06-14 20:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 22:22 [PATCH v2 bpf-next 0/4] af_unix: Allow BPF LSM to filter SCM_RIGHTS at sendmsg() Kuniyuki Iwashima
2025-06-13 22:22 ` [PATCH v2 bpf-next 1/4] af_unix: Don't pass struct socket to security_unix_may_send() Kuniyuki Iwashima
2025-06-14 17:32 ` kernel test robot
2025-06-13 22:22 ` [PATCH v2 bpf-next 2/4] af_unix: Call security_unix_may_send() in sendmsg() for all socket types Kuniyuki Iwashima
2025-06-13 22:22 ` [PATCH v2 bpf-next 3/4] af_unix: Pass skb to security_unix_may_send() Kuniyuki Iwashima
2025-06-13 22:22 ` [PATCH v2 bpf-next 4/4] selftest: bpf: Add test for BPF LSM on unix_may_send() Kuniyuki Iwashima
2025-06-14 11:43 ` [PATCH v2 bpf-next 0/4] af_unix: Allow BPF LSM to filter SCM_RIGHTS at sendmsg() Paul Moore
2025-06-14 20:40 ` Kuniyuki Iwashima [this message]
2025-06-19 3:23 ` Paul Moore
2025-06-19 4:00 ` Kuniyuki Iwashima
2025-06-19 18:55 ` Paul Moore
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=20250614204044.2190213-1-kuni1840@gmail.com \
--to=kuni1840@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=casey@schaufler-ca.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=gnoack@google.com \
--cc=haoluo@google.com \
--cc=jmorris@namei.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-security-module@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=mic@digikod.net \
--cc=netdev@vger.kernel.org \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=sdf@fomichev.me \
--cc=selinux@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=song@kernel.org \
--cc=stephen.smalley.work@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).