From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Kuniyuki Iwashima" <kuniyu@google.com>, <luca.boccassi@gmail.com>
Cc: <paul@paul-moore.com>, <andrii@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>,
<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>,
<brauner@kernel.org>
Subject: Re: [PATCH v2 bpf-next 0/4] af_unix: Allow BPF LSM to filter SCM_RIGHTS at sendmsg()
Date: Sat, 05 Dec 2026 01:21:47 +0000 [thread overview]
Message-ID: <DNCELO8NT5RN.PNBJWTFAIKO@gmail.com> (raw)
In-Reply-To: <axNi4aU78yaigWx-@google.com>
On Fri, Dec 04, 2026 at 05:07 PM Kuniyuki Iwashima <kuniyu@google.com> wrote:
> What has been changed then ? Any context ?
bpf lsm can do a part of this filtering already:
hook runs in socket types limit
------------------- ------- ---------------- ------------------------
socket_sock_rcv_skb sendmsg dgram, seqpacket silent drop of the skb
file_receive recvmsg all final fput() in receiver
unix_dgram_sendmsg() calls sk_filter() after unix_scm_to_skb().
So socket_sock_rcv_skb sees the receiver and UNIXCB(skb).fp.
unix_stream_sendmsg() has no such hook.
next prev parent reply other threads:[~2026-12-05 1:21 UTC|newest]
Thread overview: 20+ 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
2025-06-19 3:23 ` Paul Moore
2025-06-19 4:00 ` Kuniyuki Iwashima
2025-06-19 18:55 ` Paul Moore
2026-12-04 16:34 ` luca.boccassi
2026-12-05 1:07 ` Kuniyuki Iwashima
2026-12-05 1:15 ` Luca Boccassi
2026-12-05 1:29 ` Kuniyuki Iwashima
2026-12-05 1:42 ` Luca Boccassi
2026-12-05 10:13 ` Christian Brauner
2026-12-05 10:24 ` Luca Boccassi
2026-12-05 1:21 ` Alexei Starovoitov [this message]
2026-12-05 1:25 ` Luca Boccassi
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=DNCELO8NT5RN.PNBJWTFAIKO@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@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=kuni1840@gmail.com \
--cc=kuniyu@google.com \
--cc=linux-security-module@vger.kernel.org \
--cc=luca.boccassi@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.