Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10160862rwr; Fri, 12 May 2023 04:50:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4zdDloXaOylSP7Z0rJjQ4PqSUj6UdoS27a2/Fy+Ud51RBefhSldLiboo2hCkQ1oxsM5yoa X-Received: by 2002:a17:902:d48d:b0:1ac:8835:b89b with SMTP id c13-20020a170902d48d00b001ac8835b89bmr19188139plg.5.1683892228917; Fri, 12 May 2023 04:50:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683892228; cv=none; d=google.com; s=arc-20160816; b=v0Ukh5rPc09nnUtrLLYnq++QYE8z9CyTvyAYcATtIv+jLU3IUHvJ/Yws2dVLmgQX2g y6xWUqVhKD1SfyyMLzmNOPfGiuyJhnUxqsEcA+hBM3s89Y6Ut9NGPpBzouSU5/0Ocnc2 8sqbm247gJ/M29cKjXFmHgYygFHoDsf8A1E/gKvHIJ/cK8gjrt2sTbmH9XZW1nffrvYf nCQ+FiJpiIbjIe85kaXOSbDp52K+9qFa+hDXt7mqK/327cBLRoIb9ebwNzDrJ8DPFFp/ jf360ow0gNTJ23QP23TIg0O48F2JM0f6G6K+pLgvFzdEOGN4jhuWxnZILXtkCBtjF5Nh XtgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=OZsRFwhKAD7jV15LdyrDmDL9OedHT/By9QoEwzbZI1M=; b=ElXpmAGIwXczkx3hEhU7sftDfu8XHjDW7GTRoQQBX7s7MLoK/DHwfiXJ6rtbXOKap8 JbwmDT2q63tWFA7NIizNcOudDRgpv6xYH9vlo4SvfpsKxTiU2JfDsAljVj7hvtpB+VSY yiMUwwBVNbtH/Q1bwctiaA34VLUt56Hs/OZBkBPxV64SWnNY1xHNvIoSq2EiNDIR1H5p pajny3HIHq0y+Uh3ZNX1wWUIqCVNqL/o2gLPiz46OfKrn1q5wwIRV0hebHXbI8awcuVq ebIKJ1bpX8J1nXtbwutKyvlZSTr/o3/ea/MZU+uZJGQ0qXkUZer67drfSXYOILeRCvTE dlPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p7-20020a170902e74700b001a55571febesi5349149plf.277.2023.05.12.04.50.14; Fri, 12 May 2023 04:50:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240913AbjELL24 (ORCPT + 99 others); Fri, 12 May 2023 07:28:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240333AbjELL2z (ORCPT ); Fri, 12 May 2023 07:28:55 -0400 Received: from cavan.codon.org.uk (irc.codon.org.uk [IPv6:2a00:1098:84:22e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA691D2E0; Fri, 12 May 2023 04:28:48 -0700 (PDT) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 68D0D40A6F; Fri, 12 May 2023 12:28:47 +0100 (BST) Date: Fri, 12 May 2023 12:28:47 +0100 From: Matthew Garrett To: Ard Biesheuvel Cc: Eric Biggers , Ross Philipson , linux-kernel@vger.kernel.org, x86@kernel.org, linux-integrity@vger.kernel.org, linux-doc@vger.kernel.org, linux-crypto@vger.kernel.org, iommu@lists.linux-foundation.org, kexec@lists.infradead.org, linux-efi@vger.kernel.org, dpsmith@apertussolutions.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, James.Bottomley@hansenpartnership.com, luto@amacapital.net, nivedita@alum.mit.edu, kanth.ghatraju@oracle.com, trenchboot-devel@googlegroups.com Subject: Re: [PATCH v6 06/14] x86: Add early SHA support for Secure Launch early measurements Message-ID: <20230512112847.GF14461@srcf.ucam.org> References: <20230504145023.835096-1-ross.philipson@oracle.com> <20230504145023.835096-7-ross.philipson@oracle.com> <20230510012144.GA1851@quark.localdomain> <20230512110455.GD14461@srcf.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,KHOP_HELO_FCRDNS,SPF_HELO_NEUTRAL, SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, May 12, 2023 at 01:18:45PM +0200, Ard Biesheuvel wrote: > On Fri, 12 May 2023 at 13:04, Matthew Garrett wrote: > > > > On Tue, May 09, 2023 at 06:21:44PM -0700, Eric Biggers wrote: > > > > > SHA-1 is insecure. Why are you still using SHA-1? Don't TPMs support SHA-2 > > > now? > > > > TXT is supported on some TPM 1.2 systems as well. TPM 2 systems are also > > at the whim of the firmware in terms of whether the SHA-2 banks are > > enabled. But even if the SHA-2 banks are enabled, if you suddenly stop > > extending the SHA-1 banks, a malicious actor can later turn up and > > extend whatever they want into them and present a SHA-1-only > > attestation. Ideally whatever is handling that attestation should know > > whether or not to expect an attestation with SHA-2, but the easiest way > > to maintain security is to always extend all banks. > > > > Wouldn't it make more sense to measure some terminating event into the > SHA-1 banks instead? Unless we assert that SHA-1 events are unsupported, it seems a bit odd to force a policy on people who have both banks enabled. People with mixed fleets are potentially going to be dealing with SHA-1 measurements for a while yet, and while there's obviously a security benefit in using SHA-2 instead it'd be irritating to have to maintain two attestation policies.