Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1906449pxb; Mon, 13 Sep 2021 07:56:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEcv94aorFS3mCFte7e8KnO79jD2wOreBDX0i8/mOg1Y59CQNLRW4i4Id6e32QSbewmpwK X-Received: by 2002:aa7:dcc2:: with SMTP id w2mr13608826edu.192.1631544982885; Mon, 13 Sep 2021 07:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631544982; cv=none; d=google.com; s=arc-20160816; b=mbUkxwDlweX7xyb1XrX6d3b1CIieJPz0RsuSsLSC/BJIKLhK+5s2esRICBIqDK1Lgg ol6Bu+omKr2I/NxE6nAYiUW9VsJoTn4U/s5zi/+B7hOQE8xwLrjfhnYjCzm6wnfFIaZ3 /o6FidVD8EyConLlaYeeGY2bkcdfqTcdWiepcbfg29NLhWfwEuZ6fr9jMZZKBryeV/x/ 63jeq/RjMCFVXZMqmLiLFzflKqg5oVaj2Qmh6jd6cjpVuVcnqLHv3OItokmOVRf/nswc 8glDoMoIpt6Mf56ZX7SCcn8w7zVS9D1Z2o1xyoUxugC/qaBRB4DpWB0ZVwWAVZvF+fjN iaJg== 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=GUS6RG8WtaZBqBn3+YIJK2cCnU5ICkV+aK4G99l+5jdjqAJ+vfqz5ZztqXrJOKY/na WLmW92hJaHfQ7cxY9ZWVI+PMMb6fBXlG3VltTC9DG2ZawQELhti1bs7WRp9lTqmXpd9F PgZtaB15PwNbpbFMkbTobv+qoG/dkziUzNElVvRKxV2IIV8ZDl7lulvDbxFrr8OhH+cs D3qPUEIvqH7arZeKgH8gJWKHqHX/3Z8oH5c5J+Q6lxp5vzPrCbqm2IiKlBs8gj7lw932 GNJpW07oCoBewwG7pdyEQFEAq9UWFVRPFka9NwYBmEQYzXzNU9BdsoOUbCY4Vg69emmP VtrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xnlqiJ3e; 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 v9si7739379eds.43.2021.09.13.07.55.58; Mon, 13 Sep 2021 07:56:22 -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=xnlqiJ3e; 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 S241314AbhIMOvL (ORCPT + 99 others); Mon, 13 Sep 2021 10:51:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:35582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346186AbhIMOqJ (ORCPT ); Mon, 13 Sep 2021 10:46:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4E373619F9; Mon, 13 Sep 2021 13:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631541514; bh=cBFE0kbMHQvo+MHLoQ0TDQ+UZS2bCFIFjzgl/uXkESg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xnlqiJ3emeu/dxCRWsAAJBvF33Qo9DdYRXnkpvAX155+cJCTTDz8BiIwp0PysHR1E eM+M2Ho6IiNhM6EDMIWguz3r6WswLOOJ+rtdtnRYflc4KV7sYe6d4ClVpFoDyX5OZ7 NocV0uDQibXTFFhQQ2MBVWu5+B8d2Qc3zjX9AuP0= 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.14 327/334] IMA: remove the dependency on CRYPTO_MD5 Date: Mon, 13 Sep 2021 15:16:21 +0200 Message-Id: <20210913131124.495974055@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131113.390368911@linuxfoundation.org> References: <20210913131113.390368911@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