1
0
Fork 0
remarkable-linux/security/integrity/evm
Matthew Garrett c818695c71 evm: Don't deadlock if a crypto algorithm is unavailable
[ Upstream commit e2861fa716 ]

When EVM attempts to appraise a file signed with a crypto algorithm the
kernel doesn't have support for, it will cause the kernel to trigger a
module load. If the EVM policy includes appraisal of kernel modules this
will in turn call back into EVM - since EVM is holding a lock until the
crypto initialisation is complete, this triggers a deadlock. Add a
CRYPTO_NOLOAD flag and skip module loading if it's set, and add that flag
in the EVM case in order to fail gracefully with an error message
instead of deadlocking.

Signed-off-by: Matthew Garrett <mjg59@google.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-26 08:38:09 +02:00
..
Kconfig evm: EVM_LOAD_X509 depends on EVM 2015-12-15 09:57:21 -05:00
Makefile evm: posix acls modify i_mode 2011-09-14 15:24:51 -04:00
evm.h evm: enable EVM when X509 certificate is loaded 2015-12-15 08:50:48 -05:00
evm_crypto.c evm: Don't deadlock if a crypto algorithm is unavailable 2018-09-26 08:38:09 +02:00
evm_main.c sched/headers: Prepare to remove the <linux/magic.h> include from <linux/sched/task_stack.h> 2017-03-02 08:42:40 +01:00
evm_posix_acl.c ima: fix script messages 2013-10-25 13:17:19 -04:00
evm_secfs.c evm: provide a function to set the EVM key from the kernel 2015-12-15 08:53:36 -05:00