From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE09DC433E2 for ; Tue, 30 Mar 2021 14:52:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C92E9619D7 for ; Tue, 30 Mar 2021 14:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232170AbhC3OwN (ORCPT ); Tue, 30 Mar 2021 10:52:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:20366 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232068AbhC3Ov4 (ORCPT ); Tue, 30 Mar 2021 10:51:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617115915; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VJVm+BmDLZgTWR3iPU4bINy5jGu0DH6bKNz0lNZl+3Q=; b=IctOlp9hO+/p9W52M4EG3Mpf8wzznnC+n/Dr5StjkVP5BzFxWrZUgLLb3z+hSOtBpnm4K8 HC3Md/hYrCrdAIO3E+5Xs+pzygQHraO+7PIvJGhjQNrcojmA3UneynL578scyxycWFqoBO gR4qgi+1Mq70sE5iwVuh6w1JnJ9/MeU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-343-JaTNFoPKMVSSWsWfcIgTnw-1; Tue, 30 Mar 2021 10:51:50 -0400 X-MC-Unique: JaTNFoPKMVSSWsWfcIgTnw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B7F96802B40; Tue, 30 Mar 2021 14:51:48 +0000 (UTC) Received: from crecklin.bos.csb (unknown [10.22.8.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16C8E19C44; Tue, 30 Mar 2021 14:51:48 +0000 (UTC) Reply-To: crecklin@redhat.com Subject: Re: Fix hibernation in FIPS mode? To: "Rafael J. Wysocki" , Dexuan Cui Cc: "linux-pm@vger.kernel.org" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: From: Chris von Recklinghausen Organization: Red Hat Message-ID: Date: Tue, 30 Mar 2021 10:51:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/30/21 10:46 AM, Rafael J. Wysocki wrote: > On Tue, Mar 30, 2021 at 12:14 AM Dexuan Cui wrote: >> Hi, >> MD5 was marked incompliant with FIPS in 2009: >> a3bef3a31a19 ("crypto: testmgr - Skip algs not flagged fips_allowed in fips mode") >> a1915d51e8e7 ("crypto: testmgr - Mark algs allowed in fips mode") >> >> But hibernation_e820_save() is still using MD5, and fails in FIPS mode >> due to the 2018 patch: >> 749fa17093ff ("PM / hibernate: Check the success of generating md5 digest before hibernation") >> >> As a result, hibernation doesn't work when FIPS is on. >> >> Do you think if hibernation_e820_save() should be changed to use a >> FIPS-compliant algorithm like SHA-1? > I would say yes, it should. If we're not actually encrypting anything, shouldn't something like ghash work as well? > >> PS, currently it looks like FIPS mode is broken in the mainline: >> https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg49414.html