Skip to content

BPF signature verification #5385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

kernel-patches-daemon-bpf-rc[bot]
Copy link

Pull request for series with
subject: BPF signature verification
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=967145

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 075001c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967145
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 075001c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967145
version: 1

Blaise Boscaccy added 3 commits June 1, 2025 23:44
This introduces signature verification for eBPF programs inside of the
bpf subsystem. Two signature validation schemes are included, one that
only checks the instruction buffer, and another that checks over a
hash chain constructed from the program and a list of maps. The
alternative algorithm is designed to provide support to scenarios
where having self-aborting light-skeletons or signature checking
living outside the kernel-proper is insufficient or undesirable.

An abstract hash method is introduced to allow calculating the hash of
maps, only arrays are implemented at this time.

A simple UAPI is introduced to provide passing signature information.

The signature check is performed before the call to
security_bpf_prog_load. This allows the LSM subsystem to be clued into
the result of the signature check, whilst granting knowledge of the
method and apparatus which was employed.

Signed-off-by: Blaise Boscaccy <[email protected]>
This adds optional signature UAPI support to lskels. Additionally map
freezing support is added as well.

Signed-off-by: Blaise Boscaccy <[email protected]>
This introduces hash-chain signature support into bpftool. The
signature generated code was adapted from sign-file and follows a
similar set of command line switches.  The algorithm used here
supports the signature of both the loader program and it's map
containing the target program.

Signed-off-by: Blaise Boscaccy <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 075001c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967145
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=967145 irrelevant now. Closing PR.

@kernel-patches-daemon-bpf-rc kernel-patches-daemon-bpf-rc bot deleted the series/967145=>bpf-net branch June 2, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants