[PATCH bpf-next v2 0/3] BPF signature hash chains
Alexei Starovoitov
alexei.starovoitov at gmail.com
Sat Oct 11 16:31:39 UTC 2025
On Sat, Oct 11, 2025 at 7:52 AM James Bottomley
<James.Bottomley at hansenpartnership.com> wrote:
>
> It doesn't need to, once we check both the loader and the map, the
> integrity is verified and the loader can be trusted to run and relocate
> the map into the bpf program
You should read KP's cover letter again and then research trusted
hash chains. Here is a quote from the first googled link:
"A trusted hash chain is a cryptographic process used to verify the
integrity and authenticity of data by creating a sequence of hash
values, where each hash is linked to the next".
In addition KP's algorithm was vetted by various security teams.
There is nothing novel here. It's a classic algorithm used
to verify integrity and that's what was implemented.
> > You need to realize that single loader plus single map is
> > an implementation choice of tools/lib/bpf/gen_loader.c.
> > It can do the same job with a single prog and no additional map.
>
> Yes, and if the light skeleton scheme embedded the relocation and the
> program itself into prog->insnsi then we wouldn't need the additional
> map verification before the load hook because the pkcs7 signature check
> would fully verify the integrity.
I'm fine if you want to hack gen_loader.c to produce the loader prog
without a map, but we're not going to pollute the kernel with
pointless apis, because you don't understand hash chains.
More information about the Linux-security-module-archive
mailing list