linux/fs/verity
Eric Biggers 7c68ed5c5a
fsverity: Fix silent truncation in bpf_get_fsverity_digest()
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: 67814c00de ("bpf, fsverity: Add kfunc bpf_get_fsverity_digest")
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/bpf/20260803181232.14743-3-ebiggers@kernel.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-08-04 09:24:23 +02:00
..
enable.c vfs-7.0-rc1.misc.2 2026-02-16 13:00:36 -08:00
fsverity_private.h fsverity: generate and store zero-block hash 2026-06-05 13:36:22 +02:00
hash_algs.c fsverity: Remove inode parameter from fsverity_hash_block() 2025-09-17 13:09:40 -05:00
init.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
Kconfig fsverity: add dependency on 64K or smaller pages 2026-03-02 21:05:34 -08:00
Makefile fsverity: start consolidating pagecache code 2026-01-29 09:39:41 -08:00
measure.c fsverity: Fix silent truncation in bpf_get_fsverity_digest() 2026-08-04 09:24:23 +02:00
open.c fsverity: generate and store zero-block hash 2026-06-05 13:36:22 +02:00
pagecache.c fsverity: generate and store zero-block hash 2026-06-05 13:36:22 +02:00
read_metadata.c fsverity: kick off hash readahead at data I/O submission time 2026-02-02 17:15:26 -08:00
signature.c fsverity: expose verified fsverity built-in signatures to LSMs 2024-08-20 14:03:18 -04:00
verify.c fsverity fixes for v7.0-rc1 2026-02-22 13:12:04 -08:00