linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH security-next 0/4] Introducing Hornet LSM
@ 2025-03-21 16:45 Blaise Boscaccy
  2025-03-21 16:45 ` [RFC PATCH security-next 1/4] security: " Blaise Boscaccy
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Blaise Boscaccy @ 2025-03-21 16:45 UTC (permalink / raw)
  To: Jonathan Corbet, David Howells, Herbert Xu, David S. Miller,
	Paul Moore, James Morris, Serge E. Hallyn, Masahiro Yamada,
	Nathan Chancellor, Nicolas Schier, Shuah Khan,
	Mickaël Salaün, Günther Noack, Nick Desaulniers,
	Bill Wendling, Justin Stitt, Blaise Boscaccy, Jarkko Sakkinen,
	Jan Stancek, Neal Gompa, linux-doc, linux-kernel, keyrings,
	linux-crypto, linux-security-module, linux-kbuild,
	linux-kselftest, bpf, llvm, nkapron, teknoraver, roberto.sassu,
	xiyou.wangcong

This patch series introduces the Hornet LSM.

Hornet takes a simple approach to light-skeleton-based eBPF signature
verification. Signature data can be easily generated for the binary
data that is generated via bpftool gen -L. This signature can be
appended to a skeleton executable via scripts/sign-ebpf. Hornet checks
the signature against a binary buffer containing the lskel
instructions that the loader maps use. Maps are frozen to prevent
TOCTOU bugs where a sufficiently privileged user could rewrite map
data between the calls to BPF_PROG_LOAD and
BPF_PROG_RUN. Additionally, both sparse-array-based and
fd_array_cnt-based map fd arrays are supported for signature
verification.


Blaise Boscaccy (4):
  security: Hornet LSM
  hornet: Introduce sign-ebpf
  hornet: Add an example lskel data extactor script
  selftests/hornet: Add a selftest for the hornet LSM

 Documentation/admin-guide/LSM/Hornet.rst     |  51 +++
 crypto/asymmetric_keys/pkcs7_verify.c        |  10 +
 include/linux/kernel_read_file.h             |   1 +
 include/linux/verification.h                 |   1 +
 include/uapi/linux/lsm.h                     |   1 +
 scripts/Makefile                             |   1 +
 scripts/hornet/Makefile                      |   5 +
 scripts/hornet/extract-skel.sh               |  29 ++
 scripts/hornet/sign-ebpf.c                   | 420 +++++++++++++++++++
 security/Kconfig                             |   3 +-
 security/Makefile                            |   1 +
 security/hornet/Kconfig                      |  11 +
 security/hornet/Makefile                     |   4 +
 security/hornet/hornet_lsm.c                 | 239 +++++++++++
 tools/testing/selftests/Makefile             |   1 +
 tools/testing/selftests/hornet/Makefile      |  51 +++
 tools/testing/selftests/hornet/loader.c      |  21 +
 tools/testing/selftests/hornet/trivial.bpf.c |  33 ++
 18 files changed, 882 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/admin-guide/LSM/Hornet.rst
 create mode 100644 scripts/hornet/Makefile
 create mode 100755 scripts/hornet/extract-skel.sh
 create mode 100644 scripts/hornet/sign-ebpf.c
 create mode 100644 security/hornet/Kconfig
 create mode 100644 security/hornet/Makefile
 create mode 100644 security/hornet/hornet_lsm.c
 create mode 100644 tools/testing/selftests/hornet/Makefile
 create mode 100644 tools/testing/selftests/hornet/loader.c
 create mode 100644 tools/testing/selftests/hornet/trivial.bpf.c

-- 
2.48.1


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

end of thread, other threads:[~2025-04-03 15:40 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-21 16:45 [RFC PATCH security-next 0/4] Introducing Hornet LSM Blaise Boscaccy
2025-03-21 16:45 ` [RFC PATCH security-next 1/4] security: " Blaise Boscaccy
2025-03-21 17:32   ` Jonathan Corbet
2025-03-31 20:09     ` Blaise Boscaccy
2025-03-21 22:29   ` sergeh
2025-03-31 20:08     ` Blaise Boscaccy
2025-04-03 15:40   ` Paul Moore
2025-03-21 16:45 ` [RFC PATCH security-next 2/4] hornet: Introduce sign-ebpf Blaise Boscaccy
2025-03-22 17:27   ` Jarkko Sakkinen
2025-03-31 20:00     ` Blaise Boscaccy
2025-03-21 16:45 ` [RFC PATCH security-next 3/4] hornet: Add an example lskel data extactor script Blaise Boscaccy
2025-03-22 17:25   ` Jarkko Sakkinen
2025-03-31 20:04     ` Blaise Boscaccy
2025-03-21 16:45 ` [RFC PATCH security-next 4/4] selftests/hornet: Add a selftest for the hornet LSM Blaise Boscaccy
2025-03-21 21:43 ` [RFC PATCH security-next 0/4] Introducing Hornet LSM Paul Moore
2025-03-22 17:22 ` Jarkko Sakkinen
2025-03-22 20:44   ` Paul Moore
2025-03-22 20:48     ` Paul Moore
2025-03-22 21:43       ` Jarkko Sakkinen
2025-03-22 21:42     ` Jarkko Sakkinen
2025-03-31 20:57   ` Blaise Boscaccy
2025-04-01 15:50     ` Jarkko Sakkinen
2025-04-01 18:56       ` Blaise Boscaccy

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