From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oLpnB-0006kv-UR for mharc-grub-devel@gnu.org; Wed, 10 Aug 2022 13:46:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLpn6-0006jr-LW for grub-devel@gnu.org; Wed, 10 Aug 2022 13:46:49 -0400 Received: from cavan.codon.org.uk ([176.126.240.207]:43630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLpn0-0006m3-Fu for grub-devel@gnu.org; Wed, 10 Aug 2022 13:46:48 -0400 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) Received-SPF: pass client-ip=176.126.240.207; envelope-from=mjg59@codon.org.uk; helo=cavan.codon.org.uk X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2022 17:46:49 -0000 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.