Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2568576lkm; Mon, 20 Sep 2021 18:57:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziaGAfXyO02s7x1ESZasujMFrVsUOfXyfaWNroP4afp3PcGz6ysIOETrpDnm/z6pnYQj3n X-Received: by 2002:a02:6646:: with SMTP id l6mr21946599jaf.51.1632188982589; Mon, 20 Sep 2021 18:49:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188982; cv=none; d=google.com; s=arc-20160816; b=LP3scEt2Fpvny82BczRjnggjM6N1bdvRMcK871E9MDZFanpUgzCEEtVBalcoYCPdoi 27bc7LpX7BWcqsOWL6/uSvwfX9mufq5naclCgqlxR7wb5PAzDBwRAfypeKT9VTFPTy9P sG+iRuHfScEf9hebYuv4HFfPSCnJVo/riEwXQkcxT0KHxdCoKPpXbqK6FNAvtOuckSzC XH+O36dp0TX21mDNG6K32ntV0IXH4pG1O07fXLLRAG8NCPWPB5d9KWytO/6149RjikT0 nb0ojZpuqVVblT1znKqQYy2tcphzA5AZpLkBUtCxktD8mfyfxTevFLh8Iatoh9YCTkqn D+8A== 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=X7n1x2k/BKluJlSKnjHelPwy9632Jip/HWqSs4q//5E=; b=mvIH5E0EHMMzGFacuVXGI+YPfnHYwvunJzP33VYwmosPZFXqznblkIb759Zc7MaKlK UlQ2YHnG1JmIgxy5owK33Jw969Mtc304VHbj6su/rPHHa8LU3HS42zF2RlXqZep3K24v 1O3xRHZDARVUNUcyyjZUuJLuKiVUz/zmGeov+edKfBnCyOqy3LakuQI7+eR2BdlyqD4d OEDevA2TKJ16+O7TQFO8kpDrQYWTyXDQCa7j002qj6+v0oZJ++b9eZg2hRMz5J5CH/Ro P5j5pBqaGUa6J6moozJEtGoZGf35jV8zzJyn2Ot0yMZ3S7tOWjUtpsUdFFVjj7/JCTLx 3GBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TdGsC1pV; 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 r18si16072460ilc.134.2021.09.20.18.49.31; Mon, 20 Sep 2021 18:49:42 -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=TdGsC1pV; 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 S1349026AbhITRnY (ORCPT + 99 others); Mon, 20 Sep 2021 13:43:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:46194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348554AbhITRlP (ORCPT ); Mon, 20 Sep 2021 13:41:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7DDB3615E4; Mon, 20 Sep 2021 17:08:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632157705; bh=h4FneUWbuA2iMv6bh/tKjtxESfPbAx2Qv5HTuygn5fM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TdGsC1pVdXKuo9daCaZvxDKVxy8YZiqNgXAbhtZdKEn/dYXHHgWM8JCtMRLMPLxyp 6vkMy36E9Rmg/JBPIiD4cfqtVW7Ton3w2Me5Hj2XwW9Ep/CKHULTDApE/PTCxG/C8p kXyuOpdR9fZF2LCTlRW131HOfOuvwXSw4ik81hzU= 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 4.19 114/293] IMA: remove the dependency on CRYPTO_MD5 Date: Mon, 20 Sep 2021 18:41:16 +0200 Message-Id: <20210920163937.163566344@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163933.258815435@linuxfoundation.org> References: <20210920163933.258815435@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 @@ -5,7 +5,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