Files
Matthew Garrett 6a69ccd2ec 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:39:36 +02:00
..
…
…
…
…
…
2018-05-25 18:23:56 +02:00
2018-05-23 14:01:03 +02:00
…
…
…
…
…
…
2018-06-05 10:48:09 -04:00
…
2018-06-07 14:23:08 +01:00
…
2018-07-22 11:51:30 -07:00
…
…
…
…
…
…
…
…
…
2018-05-26 09:16:44 +02:00
…
…
…
2018-06-15 18:10:01 -03:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-06-15 18:10:01 -03:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-06-01 07:38:16 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-07-03 18:33:19 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
2018-09-19 22:41:19 +02:00
…
…
…
…
…
…
2018-06-07 17:34:37 -07:00
…
…
…
…
…
…
…
…
…
…
…
2018-05-22 13:42:16 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-06-21 17:39:18 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-06-05 08:50:16 -04:00
2018-06-15 07:55:25 +09:00
2018-06-07 17:34:35 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
2018-06-07 17:34:39 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-06-01 14:37:35 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-06-07 17:34:36 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-06-07 17:34:35 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-05-31 00:13:56 +08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-06-29 08:48:06 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-06-07 17:34:35 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…