Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp24774pxb; Mon, 13 Sep 2021 11:58:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiBF8rPzcGO1s0Et4iA7tYxMK8QtT7MEO83Hp3K2dZ/DSuLk99jkAKz3HY69FVgSfWAP7Q X-Received: by 2002:aa7:da93:: with SMTP id q19mr15167779eds.206.1631559486991; Mon, 13 Sep 2021 11:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631559486; cv=none; d=google.com; s=arc-20160816; b=lOjwYsBPkoFKT1hnbcesfnnz2fqsg9AiXz9o9M0b85UIT8dU5vFGNz3AOvoOZc8O6k lbNQHx/QAJd672YtXGgqnl3lYJTBfL4rXthG0R8TPQNqYpmkqaGyLr3ZzWQH6E0bTrkx RDzRpjhNmra0TLMwkbl+/zVpLCF4+aigaDrzOMZVhsJFqaxO4eMjkJA1Bfl+JyMAUe2D rEn6PyWMd4nU8hg+NFaKEb4HV7ilABT4D4AQfM228oVWlQgvtuvcS+dlTW4ul+MuXtqA PXXKMPp+yV6LVvJ/Wtaq0brl0sMCeLr8J/mmusKGmNaQ1fFjusj7m3xayyKaGyCQRcAK L2aA== 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=b+pA/E8wlQRGGPeFasPGaf0fFfM/6tYK1LEFT7/baslBFocszwbquDaCkOsezSSw4K HNxcf79YWt6KFXzFmWsV1iufIYaIgT6vyJMWKTCnab4ptldP2j4Thn6lnacXPHQCiJj/ PqmS6+CfHXX6pgCEr5hysUHzeokQ7QT4r0I7aG3WhRy8nfUGTJD1NsT4npVdPllxnHPM A/yU2ZX5D0m0zLUXCcAbfsqfTM2Rxm6H1ytQqosBbJnhuPKv0HPtHaq4hXwgGaP/wNQA tYjrYiMtevrBIQrOghDc9h1WMNYpjbmc0SB+G91b2x/MYlgWOLD5i1d+mr5XQIhF8cis Tq9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ealQwggA; 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 a1si8593491ejx.553.2021.09.13.11.57.42; Mon, 13 Sep 2021 11:58:06 -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=ealQwggA; 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 S241901AbhIMN2S (ORCPT + 99 others); Mon, 13 Sep 2021 09:28:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:37510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241892AbhIMN0L (ORCPT ); Mon, 13 Sep 2021 09:26:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6708D6113E; Mon, 13 Sep 2021 13:22:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539360; bh=cBFE0kbMHQvo+MHLoQ0TDQ+UZS2bCFIFjzgl/uXkESg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ealQwggA5vBxbGPmocsl/Krwj7VZQE4khzdalmoHNR5MrFlW/9korWJ3bcBaI0KbB uNhQMXZk8yNyiq8Af3WKXJMsxx6ZSee0/HdLOFhRduimifczPi8qDx8jIdUWaaJ2AP 06wk4O7OJmuhfh60defDqQkCN/1kW9vsr42Ju6tY= 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.4 141/144] IMA: remove the dependency on CRYPTO_MD5 Date: Mon, 13 Sep 2021 15:15:22 +0200 Message-Id: <20210913131052.645459517@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131047.974309396@linuxfoundation.org> References: <20210913131047.974309396@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