• THOBY Simon's avatar
    IMA: remove the dependency on CRYPTO_MD5 · 8510505d
    THOBY Simon authored
    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 ab60368a ("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: default avatarTHOBY Simon <Simon.THOBY@viveris.fr>
    Reviewed-by: default avatarLakshmi 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: default avatarMimi Zohar <zohar@linux.ibm.com>
    8510505d
Kconfig 10.8 KB