Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp487652rwb; Wed, 10 Aug 2022 11:30:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR6J824w3EJ0ZH96ycQdi8tsYTprbX7kqO6evB+SwyPNO0SLu53z+rc/3jS8fLqDg0QjtRTM X-Received: by 2002:a17:907:1361:b0:730:8f59:6434 with SMTP id yo1-20020a170907136100b007308f596434mr21724875ejb.745.1660156237706; Wed, 10 Aug 2022 11:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660156237; cv=none; d=google.com; s=arc-20160816; b=BZ5w2FSPCtF4BS8zMNMPEgT6P9mEvutfGJoOWfngQ6fet1tw39YM081oyKYNPhRb6Z 04rSO6yQebEe6YjAq+qqqqsEiAkbOihJPVnt1FIqvpKdMd0USxrDBixEU1E9/ZmxShQa MLoiZgm2Ixjji+5+t0qB81l6vVlAafB5emK7n3kpqb2m4ULBjASfQtNekFbaY3iwiWKo ZtTkm6LG4DmgnGXp1k7KWRFCINtpgQgUwU5NEGoFkoIgHvOS5ybtvJj63L2bKTAW+uKO K+VOYjyqMiN20o3JvcUUNkFFzLnVq4ULbJJjSC1fQlAyciWYqvRY3yUi8rbKEbXAGumC 38bQ== 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=KHA+wVrgDfgTQHf9sIeg5oFTX41/kFfVBbCEcYYlNtI=; b=hAAVdSmytp/ntxqI5PjWzOVfbCSfdgk9eBJQDoSkNRJjMS7gseA73Fp919v9zUhkFa 0GMC+jeSJiLWKZxJ5ojJyYmXo1AHPNbgEbF9wGlmDdmKo1H4HAP+y8V6fAt0TBjD/Xvv 0FJIPtbOmwNb03qL0MCjvo85XTmB4qRTzUrx71MViayzrnaJvtEGcgpGSc1qRPJVY4hZ s3P1a2oDMGMTcuNhbGl1KRNxpOwVW4QWlKEkJRc+u9y18O2CIR9jROVKQ1zsCAIJE8sO vyIlXBeM96AhPfvTuZ51m7zefsy2RM2c+UmVIy2eitu+8tnAdkPUyTzpEuQ3c9b7c5zf TViw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 oz15-20020a1709077d8f00b00730a229b07bsi5210600ejc.544.2022.08.10.11.30.12; Wed, 10 Aug 2022 11:30:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231608AbiHJRqt (ORCPT + 99 others); Wed, 10 Aug 2022 13:46:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230282AbiHJRqr (ORCPT ); Wed, 10 Aug 2022 13:46:47 -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 3445C6CF46; Wed, 10 Aug 2022 10:46:41 -0700 (PDT) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 815D840A8A; Wed, 10 Aug 2022 18:46:38 +0100 (BST) Date: Wed, 10 Aug 2022 18:46:38 +0100 From: Matthew Garrett To: Brendan Trotter Cc: The development of GNU GRUB , Ard Biesheuvel , Daniel Kiper , Alec Brown , Kanth Ghatraju , Ross Philipson , "piotr.krol@3mdeb.com" , "krystian.hebel@3mdeb.com" , "persaur@gmail.com" , "Yoder, Stuart" , Andrew Cooper , "michal.zygowski@3mdeb.com" , James Bottomley , "lukasz@hawrylko.pl" , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, James Morris Subject: Re: Linux DRTM on UEFI platforms Message-ID: <20220810174638.GA7906@srcf.ucam.org> References: <7aab2990-9c57-2456-b08d-299ae96ac919@apertussolutions.com> <203110bb-b70b-b4f1-9453-46136659f84c@apertussolutions.com> 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.4 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-kernel@vger.kernel.org On Wed, Aug 10, 2022 at 06:37:18PM +0930, Brendan Trotter wrote: > [1] doesn't provide any useful information. How does a kernel know > that the callback provided by boot loader actually measures what it's > supposed to measure, or even does anything at all? The kernel has no way to know this - *any* code you've run before performing a measurement could tamper with the kernel such that it believes it's fine. This is just as true in DRTM as it is in SRTM. But you know what the expected measurements should be, so you're able to either seal secrets to those PCR values or rely on remote attestation. > [1] doesn't provide any useful information. Senter and skinit don't > provide a method for kernel to detect that (e.g.) a MiTM boot loader > has always measured a forgery and has changed unmeasured code in a > different way every time you boot. Measurements are not opaque objects. If you're not able to reconstruct the expected measurement then you're doing it wrong.