Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp92350pxb; Mon, 13 Sep 2021 13:52:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz00rP7dXiWju+ksuqqgf+IjGnTh9PZdPoEzrWDDdOcyqai+F/rsIjDtC3Sm+eJFmJd4rDv X-Received: by 2002:a05:6402:222b:: with SMTP id cr11mr15521716edb.392.1631566328305; Mon, 13 Sep 2021 13:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631566328; cv=none; d=google.com; s=arc-20160816; b=GZmscagjUpahL4pJynipTIg8tlqHr21qxJHw7bJMAMazs4GHXnskbOMqJvzF/Wu3PA tK+TA33OtZLB/gbMj7HrE8GdUncCDAfttV6ny7WdSFVbvxireq7Czv35ffsS88PxPiGE b9iOcfITGaz4BMm90NYRvyjiwy4YTU9rmW+Y+oAqCPD/o6mP5QTKHeKUqxx8xmnt5kpM 2dRjJsqIyRwYAaNCWAUzmRrHw1YQ35UN2hHf3BEIO1hvy4yA1P+PRN7XfUAsYcv9vPR+ DYD3JdtBgwqr/pHGnZFH3FEyNb+W+uznGy3UGsySjJ2ZmhsG5pOoLyEH2ZtNGEQfdWKF Rs4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=54NUgqD0nj1yMliiVKhU10oHyc+C2jtejfTEhHsuFD8=; b=mOvrE7fL8x7jkkIQeBfF8v4dy+KtXIKjN+m0PgTJVFxpO0vnU8rWIfEeNIAHsr5D1Z CmDm9UtQaseCciSbv3CKAEdjfPK8AgLAcQfknKtI2HCCCKYhW9B/5KUkgY0fWb9z0XCS QiRMyNyGOdXn6VsPywEb4cVfx4ToWwvdMEcQ9XKQtfn7+8dVd4zlOkdvyDtRTybzoomR x/c6hTUMr31ITOmW3fqARK/pVZ0axo6mEhTznU/xx0RxIYL1cJwK0SG60EXl/aUWx8yA x2kPxldoIsQ0jwNfZ6tVHo47LcUzCNjXiPRty5uQSDy9ds/lRFk66MkuGoWykymEJZra 65aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zJixrA9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 18si7583639ejy.624.2021.09.13.13.51.44; Mon, 13 Sep 2021 13:52:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zJixrA9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243231AbhIMNwO (ORCPT + 99 others); Mon, 13 Sep 2021 09:52:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:55342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242869AbhIMNso (ORCPT ); Mon, 13 Sep 2021 09:48:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C7BCC6152A; Mon, 13 Sep 2021 13:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539970; bh=cBFE0kbMHQvo+MHLoQ0TDQ+UZS2bCFIFjzgl/uXkESg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zJixrA9mSQICYwnRGcDi0uwRlnPpljQ0udSkrEjnB3pu56gJ+nnX2gLxk8nQEAH6m 127xWz4JnMjWytc+LXUrehQfc7JKqrpf5jThxind3i0DRvxqgLMzmiFUmPJnOThKyl jFyIRysAzr8UHB5QOEk7avFyudZzaRVe1WvKc9/0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, THOBY Simon , Lakshmi Ramasubramanian , Mimi Zohar Subject: [PATCH 5.10 233/236] IMA: remove the dependency on CRYPTO_MD5 Date: Mon, 13 Sep 2021 15:15:38 +0200 Message-Id: <20210913131108.267650097@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: THOBY Simon 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 ab60368ab6a4 ("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 Reviewed-by: Lakshmi Ramasubramanian [zohar@linux.ibm.com: include commit number in patch description for stable.] Cc: stable@vger.kernel.org # 4.17 Signed-off-by: Mimi Zohar Signed-off-by: Greg Kroah-Hartman --- security/integrity/ima/Kconfig | 1 - 1 file changed, 1 deletion(-) --- a/security/integrity/ima/Kconfig +++ b/security/integrity/ima/Kconfig @@ -6,7 +6,6 @@ config IMA select SECURITYFS select CRYPTO select CRYPTO_HMAC - select CRYPTO_MD5 select CRYPTO_SHA1 select CRYPTO_HASH_INFO select TCG_TPM if HAS_IOMEM && !UML