From: Blaise Boscaccy <bboscaccy@linux.microsoft.com>
To: bpf@vger.kernel.org, linux-security-module@vger.kernel.org,
kpsingh@kernel.org, bboscaccy@linux.microsoft.com,
paul@paul-moore.com, kys@microsoft.com, ast@kernel.org,
daniel@iogearbox.net, andrii@kernel.org,
James.Bottomley@hansenpartnership.com, wufan@linux.microsoft.com
Subject: [PATCH bpf-next 0/2] BPF signature hash chains
Date: Fri, 26 Sep 2025 13:30:31 -0700 [thread overview]
Message-ID: <20250926203111.1305999-1-bboscaccy@linux.microsoft.com> (raw)
This patchset extends the currently proposed signature verification
patchset
https://lore.kernel.org/linux-security-module/20250813205526.2992911-1-kpsingh@kernel.org/
with hash-chain functionality to verify the contents of arbitrary maps.
The currently proposed loader + map signature verification
scheme—requested by Alexei and KP—is simple to implement and
acceptable if users/admins are satisfied with it. However, verifying
both the loader and the maps offers additional benefits beyond just
verifying the loader:
1. Simplified Loader Logic: The lskel loader becomes simpler since it
doesn’t need to verify program maps—this is already handled by
bpf_check_signature().
2. Security and Audit Integrity: A key advantage is that the LSM
(Linux Security Module) hook for authorizing BPF program loads can
operate after signature verification. This ensures:
* Access control decisions can be based on verified signature status.
* Accurate system state measurement and logging.
* Log events claiming a verified signature are fully truthful,
avoiding misleading entries that only the loader was verified
while the actual BPF program verification happens later without
logging.
This approach addresses concerns from users who require strict audit
trails and verification guarantees, especially in security-sensitive
environments.
A working tree with this patchset is being maintained at
https://github.com/blaiseboscaccy/linux/tree/bpf-hash-chains
bpf CI tests passed as well
https://github.com/kernel-patches/bpf/actions/runs/18021422444/
Blaise Boscaccy (2):
bpf: Add hash chain signature support for arbitrary maps
selftests/bpf: Enable map verification for some lskel tests
include/uapi/linux/bpf.h | 6 ++
kernel/bpf/syscall.c | 73 ++++++++++++++++++-
.../bpf/bpftool/Documentation/bpftool-gen.rst | 7 +-
tools/bpf/bpftool/gen.c | 27 ++++++-
tools/bpf/bpftool/main.c | 9 ++-
tools/bpf/bpftool/main.h | 1 +
tools/bpf/bpftool/sign.c | 17 ++++-
tools/include/uapi/linux/bpf.h | 6 ++
tools/lib/bpf/libbpf.h | 3 +-
tools/lib/bpf/skel_internal.h | 6 +-
tools/testing/selftests/bpf/Makefile | 18 ++++-
11 files changed, 159 insertions(+), 14 deletions(-)
--
2.48.1
next reply other threads:[~2025-09-26 20:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 20:30 Blaise Boscaccy [this message]
2025-09-26 20:30 ` [PATCH bpf-next 1/2] bpf: Add hash chain signature support for arbitrary maps Blaise Boscaccy
2025-09-29 9:25 ` Quentin Monnet
2025-09-29 19:17 ` Blaise Boscaccy
2025-09-26 20:30 ` [PATCH bpf-next 2/2] selftests/bpf: Enable map verification for some lskel tests Blaise Boscaccy
2025-09-27 5:47 ` [syzbot ci] Re: BPF signature hash chains syzbot ci
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=20250926203111.1305999-1-bboscaccy@linux.microsoft.com \
--to=bboscaccy@linux.microsoft.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kpsingh@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=wufan@linux.microsoft.com \
/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.