af_unix: Allow BPF LSM to filter SCM_RIGHTS at sendmsg().
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest4 patches 5 repliesIn review
Changes from the cover letter
v2: Remove SCM_RIGHTS fd scrubbing functionality
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | af_unix: Don't pass struct socket to security_unix_may_send().include/ include/ net/ +4 more | +23 | 0 replies | |
| 2/4 | af_unix: Call security_unix_may_send() in sendmsg() for all socket typesnet/ security/ security/ +1 more | +30 | 0 replies | |
| 3/4 | af_unix: Pass skb to security_unix_may_send().include/ include/ net/ +4 more | +18 | 0 replies | |
| 4/4 | selftest: bpf: Add test for BPF LSM on unix_may_send().tools/ tools/ | +251 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 bpf-next 0/4] af_unix: Allow BPF LSM to filter SCM_RIGHTS at sendmsg().
From: Kuniyuki Iwashima <[email protected]>
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.
Changes:
v2: Remove SCM_RIGHTS fd scrubbing functionality
v1: https://lore.kernel.org/bpf/[email protected]/
Kuniyuki Iwashima (4):
af_unix: Don't pass struct socket to security_unix_may_send().
af_unix: Call security_unix_may_send() in sendmsg() for all socket
types
af_unix: Pass skb to security_unix_may_send().
selftest: bpf: Add test for BPF LSM on unix_may_send().
include/linux/lsm_hook_defs.h | 3 +- include/linux/security.h | 7 +- net/unix/af_unix.c | 32 ++-- security/landlock/task.c | 16 +- security/security.c | 5 +- security/selinux/hooks.c | 14 +- security/smack/smack_lsm.c | 12 +- .../bpf/prog_tests/lsm_unix_may_send.c | 168 ++++++++++++++++++ .../selftests/bpf/progs/lsm_unix_may_send.c | 83 +++++++++ 9 files changed, 309 insertions(+), 31 deletions(-) create mode 100644 tools/testing/selftests/bpf/prog_tests/lsm_unix_may_send.c create mode 100644 tools/testing/selftests/bpf/progs/lsm_unix_may_send.c
Signature · 1 line
2.49.0