android_kernel_xiaomi_sm8450/fs/verity
Eric Biggers 5b1f71c0b9 fsverity: skip PKCS#7 parser when keyring is empty
commit 919dc320956ea353a7fb2d84265195ad5ef525ac upstream.

If an fsverity builtin signature is given for a file but the
".fs-verity" keyring is empty, there's no real reason to run the PKCS#7
parser.  Skip this to avoid the PKCS#7 attack surface when builtin
signature support is configured into the kernel but is not being used.

This is a hardening improvement, not a fix per se, but I've added
Fixes and Cc stable to get it out to more users.

Fixes: 432434c9f8 ("fs-verity: support builtin file signatures")
Cc: stable@vger.kernel.org
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Link: https://lore.kernel.org/r/20230820173237.2579-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-19 12:20:22 +02:00
..
enable.c fsverity: don't drop pagecache at end of FS_IOC_ENABLE_VERITY 2023-04-05 11:23:44 +02:00
fsverity_private.h fs-verity: remove unnecessary extern keywords 2020-05-12 16:44:00 -07:00
hash_algs.c fs-verity: use mempool for hash requests 2020-01-14 13:28:05 -08:00
init.c fs-verity: support builtin file signatures 2019-08-12 19:33:50 -07:00
Kconfig fs-verity: support builtin file signatures 2019-08-12 19:33:50 -07:00
Makefile fs-verity: support builtin file signatures 2019-08-12 19:33:50 -07:00
measure.c fs-verity: fix all kerneldoc warnings 2020-05-12 16:43:59 -07:00
open.c fs-verity: fix signed integer overflow with i_size near S64_MAX 2021-10-06 15:55:46 +02:00
signature.c fsverity: skip PKCS#7 parser when keyring is empty 2023-09-19 12:20:22 +02:00
verify.c fsverity: Remove WQ_UNBOUND from fsverity read workqueue 2023-04-05 11:23:40 +02:00