1
0
Fork 0
remarkable-linux/security/integrity
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
..
evm evm: Don't deadlock if a crypto algorithm is unavailable 2018-09-26 08:38:09 +02:00
ima ima: based on policy verify firmware signatures (pre-allocated buffer) 2018-08-03 07:50:31 +02:00
Kconfig security: integrity: Remove select to deleted option PUBLIC_KEY_ALGO_RSA 2016-04-12 19:54:58 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
digsig.c integrity/security: fix digsig.c build error with header file 2018-05-30 07:52:02 +02:00
digsig_asymmetric.c integrity: Small code improvements 2017-06-21 14:37:12 -04:00
iint.c integrity: Small code improvements 2017-06-21 14:37:12 -04:00
integrity.h integrity: Small code improvements 2017-06-21 14:37:12 -04:00
integrity_audit.c Merge git://git.infradead.org/users/eparis/audit 2014-04-12 12:38:53 -07:00