Re: [PATCH bpf v2 2/2] fsverity: Fix silent truncation in bpf_get_fsverity_digest()

Song Liu <[email protected]>
Newsgroups dev.linux.lists.fsverity,org.kernel.vger.bpf,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <CAPhsuW5HJbh0LP3FW6-LjYJHvKXYAYuQsvxAX8VuemXS+CAi6A@mail.gmail.com>
On Mon, Aug 3, 2026 at 11:13 AM Eric Biggers <[email protected]> wrote:
>
> bpf_get_fsverity_digest() silently truncates the digest if the provided
> buffer is too small.  This is a footgun, and it doesn't match the
> semantics of the equivalent UAPI (FS_IOC_MEASURE_VERITY).
>
> Change it to return -EOVERFLOW instead, matching FS_IOC_MEASURE_VERITY.
>
> Fixes: 67814c00de31 ("bpf, fsverity: Add kfunc bpf_get_fsverity_digest")
> Cc: [email protected]
> Signed-off-by: Eric Biggers <[email protected]>

Acked-by: Song Liu <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.