bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] security: Propagate universal pointer data in bpf hooks
@ 2025-02-26  0:30 Blaise Boscaccy
  2025-02-26  0:30 ` [PATCH 1/1] " Blaise Boscaccy
  0 siblings, 1 reply; 8+ messages in thread
From: Blaise Boscaccy @ 2025-02-26  0:30 UTC (permalink / raw)
  To: Paul Moore, James Morris, Serge E. Hallyn, Alexei Starovoitov,
	Daniel Borkmann, John Fastabend, Andrii Nakryiko,
	Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Stephen Smalley,
	Ondrej Mosnacek, linux-security-module, linux-kernel, bpf,
	selinux, bboscaccy

Hello,

While trying to implement an eBPF gatekeeper program, we ran into an
issue whereas the LSM hooks are missing some relevant data.

Certain subcommands passed to the bpf() syscall can be invoked from
either the kernel or userspace. Additionally, some fields in the
bpf_attr sruct contain pointers, and depending on where the subcommand
was invoked, could point to either user or kernel memory. One example
of this, is the bpf_prog_load subcommand and it's fd_array.  This data
is made available and used by the verifier, but not made available to
the LSM subsystem. This patchset simply exposes that information to
applicable LSM hooks.


Blaise Boscaccy (1):
  security: Propagate universal pointer data in bpf hooks

 include/linux/lsm_hook_defs.h |  6 +++---
 include/linux/security.h      | 13 +++++++------
 kernel/bpf/syscall.c          | 10 +++++-----
 security/security.c           | 17 ++++++++++-------
 security/selinux/hooks.c      |  6 +++---
 5 files changed, 28 insertions(+), 24 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-02-26 22:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-26  0:30 [PATCH 0/1] security: Propagate universal pointer data in bpf hooks Blaise Boscaccy
2025-02-26  0:30 ` [PATCH 1/1] " Blaise Boscaccy
2025-02-26  7:06   ` Song Liu
2025-02-26 15:57     ` Paul Moore
2025-02-26 19:40       ` Blaise Boscaccy
2025-02-26 16:00     ` Alexei Starovoitov
2025-02-26 19:21       ` Blaise Boscaccy
2025-02-26 22:02       ` Song Liu

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).