linux/security/integrity/ima
THOBY Simon 4a95b04afa IMA: remove the dependency on CRYPTO_MD5
commit 8510505d55e194d3f6c9644c9f9d12c4f6b0395a upstream.

MD5 is a weak digest algorithm that shouldn't be used for cryptographic
operation. It hinders the efficiency of a patch set that aims to limit
the digests allowed for the extended file attribute namely security.ima.
MD5 is no longer a requirement for IMA, nor should it be used there.

The sole place where we still use the MD5 algorithm inside IMA is setting
the ima_hash algorithm to MD5, if the user supplies 'ima_hash=md5'
parameter on the command line.  With commit ab60368ab6 ("ima: Fallback
to the builtin hash algorithm"), setting "ima_hash=md5" fails gracefully
when CRYPTO_MD5 is not set:
	ima: Can not allocate md5 (reason: -2)
	ima: Allocating md5 failed, going to use default hash algorithm sha256

Remove the CRYPTO_MD5 dependency for IMA.

Signed-off-by: THOBY Simon <Simon.THOBY@viveris.fr>
Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
[zohar@linux.ibm.com: include commit number in patch description for
stable.]
Cc: stable@vger.kernel.org # 4.17
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-15 09:47:41 +02:00
..
Kconfig IMA: remove the dependency on CRYPTO_MD5 2021-09-15 09:47:41 +02:00
Makefile
ima.h
ima_api.c
ima_appraise.c
ima_crypto.c ima: Don't modify file descriptor mode on the fly 2020-12-30 11:51:39 +01:00
ima_fs.c
ima_init.c
ima_kexec.c ima: Free IMA measurement buffer after kexec syscall 2021-03-04 10:26:25 +01:00
ima_main.c
ima_modsig.c
ima_mok.c IMA: remove -Wmissing-prototypes warning 2021-09-15 09:47:41 +02:00
ima_policy.c
ima_queue.c
ima_template.c
ima_template_lib.c
ima_template_lib.h