linux-stable/fs/verity
Fan Wu 7c373e4f14 fsverity: expose verified fsverity built-in signatures to LSMs
This patch enhances fsverity's capabilities to support both integrity and
authenticity protection by introducing the exposure of built-in
signatures through a new LSM hook. This functionality allows LSMs,
e.g. IPE, to enforce policies based on the authenticity and integrity of
files, specifically focusing on built-in fsverity signatures. It enables
a policy enforcement layer within LSMs for fsverity, offering granular
control over the usage of authenticity claims. For instance, a policy
could be established to only permit the execution of all files with
verified built-in fsverity signatures.

The introduction of a security_inode_setintegrity() hook call within
fsverity's workflow ensures that the verified built-in signature of a file
is exposed to LSMs. This enables LSMs to recognize and label fsverity files
that contain a verified built-in fsverity signature. This hook is invoked
subsequent to the fsverity_verify_signature() process, guaranteeing the
signature's verification against fsverity's keyring. This mechanism is
crucial for maintaining system security, as it operates in kernel space,
effectively thwarting attempts by malicious binaries to bypass user space
stack interactions.

The second to last commit in this patch set will add a link to the IPE
documentation in fsverity.rst.

Signed-off-by: Deven Bowers <deven.desai@linux.microsoft.com>
Signed-off-by: Fan Wu <wufan@linux.microsoft.com>
Acked-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2024-08-20 14:03:18 -04:00
..
enable.c fsverity: improve documentation for builtin signature support 2023-06-20 22:47:55 -07:00
fsverity_private.h fsverity: remove hash page spin lock 2024-02-01 15:19:23 -08:00
hash_algs.c fsverity: explicitly check that there is no algorithm 0 2023-07-11 22:49:18 -07:00
init.c fsverity: use register_sysctl_init() to avoid kmemleak warning 2024-05-03 08:30:58 -07:00
Kconfig fsverity: improve documentation for builtin signature support 2023-06-20 22:47:55 -07:00
Makefile fs-verity: add FS_IOC_READ_VERITY_METADATA ioctl 2021-02-07 14:51:11 -08:00
measure.c bpf: treewide: Align kfunc signatures to prog point-of-view 2024-06-12 11:01:31 -07:00
open.c fsverity: remove hash page spin lock 2024-02-01 15:19:23 -08:00
read_metadata.c fsverity: improve documentation for builtin signature support 2023-06-20 22:47:55 -07:00
signature.c fsverity: expose verified fsverity built-in signatures to LSMs 2024-08-20 14:03:18 -04:00
verify.c fsverity: remove hash page spin lock 2024-02-01 15:19:23 -08:00