Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4874780rwb; Sun, 13 Nov 2022 16:07:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf5wNpbzLado1qPYIx0ClzuwshxG/dYfZfP60nReu2F05SRdcgnSHx4rVb6XFp0NlYAoPM9R X-Received: by 2002:a17:902:e153:b0:188:635d:4b43 with SMTP id d19-20020a170902e15300b00188635d4b43mr11464018pla.69.1668384419902; Sun, 13 Nov 2022 16:06:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668384419; cv=none; d=google.com; s=arc-20160816; b=JqluxvWdBxRrKn6X7ZdITLX/nNI8FO1IZgZcMKYzNvVQ/TO2MKLkYCRzOS88SVf+lX SCibtTs5/fl8MfES5MOWGrDPfs41xqHDuVb78x5QSCATicgwUyJDy0Zal7j6VVO/4rMs 1J/bKYnuw7vSrwSer6mHQCRyG9TYrExVDNnXsFCn/bOmyinkHTXYknkg7RpCOE9AtCEt yBxRV+r6EEa/fitIjiZ5x/ZQ8zx8bAl1UnxrNPV8ga5lI0Ivr/qsEUNKg5pjMD1FfxSV O/9qkGkcUFXRlSD+9ou7Q4sIqDlvm0U1vThpgdKlMwzQICN5VnI1PqGlEzgUSIL+092L rQig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sTQ+ydYWVemOPSCEQW3WV6b08jB8FPMJHxsu9Hmd25M=; b=DI+DCRexNOGeK0qRO8PqxOIvbhO1vlqvL6zVMIzx3NGRKSwLZtbKegBRmwo00aaNA8 9Lx40oJ2WkTPHZY5Cmu7RTa99L9z64BSGYQAHIAFTAb8r4xl/LE169dVaaozAXUU1gg6 1vwPi5KCh9L5qUDG0FUJBwT55LTYJz920uYlD9xGWtTx01FahI8tyOF8ahV8N8I5v1t/ 3g7fH3/go/VuE8/02/F23DfUeQCqa9PZZNFJ7w+qxIKiOoruT72/ObmYHe781qgdm2UB DMNvb+I7u4Jw7HHyl+WnuY3WswARWbo9M1wuQEPV2QepJWaJTddz+q3CAg8MvQxlxQPD 9c7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jYYqcBYD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020a056a00088300b0056e4c95266bsi7738083pfj.77.2022.11.13.16.06.48; Sun, 13 Nov 2022 16:06:59 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jYYqcBYD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235485AbiKMXrM (ORCPT + 89 others); Sun, 13 Nov 2022 18:47:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230525AbiKMXrL (ORCPT ); Sun, 13 Nov 2022 18:47:11 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAC61BF79; Sun, 13 Nov 2022 15:47:10 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 82F37B80CC2; Sun, 13 Nov 2022 23:47:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74760C433D6; Sun, 13 Nov 2022 23:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668383227; bh=sTQ+ydYWVemOPSCEQW3WV6b08jB8FPMJHxsu9Hmd25M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jYYqcBYD02plh277+Tatc358hT4bdbZ2Qe4pkvImiCqx7xeKhkgJZniTpbp23MLrU a9aMKIRZ4KMQvIc0Imzzu7KaFvE4de5IKU/lZmL7knIHc4XlscuXs5+nW4f8FJ2Hdu 3QFvUkHl3I6iqDc86NtV1QVuQRALcERZT3oOC0LNNTcCqyxWulLpWj/slsqVOVNHEB iBaXDNeouqf4Oup3cgw4+ZAN665uDxiU+LoDn287gkgpfeobk+s88xKfQWUgDakTuN NXIU2GsX6AfG547l5abUZ4+vSTo0QrioYAwVtbb0F/KP1Nut+wkul2iDq6X1ts6yRM Rce5biN3fLtRg== Date: Sun, 13 Nov 2022 15:47:04 -0800 From: Eric Biggers To: Evan Green Cc: linux-kernel@vger.kernel.org, corbet@lwn.net, linux-integrity@vger.kernel.org, gwendal@chromium.org, dianders@chromium.org, apronin@chromium.org, Pavel Machek , Ben Boeckel , rjw@rjwysocki.net, jejb@linux.ibm.com, Kees Cook , dlunev@google.com, zohar@linux.ibm.com, Matthew Garrett , jarkko@kernel.org, linux-pm@vger.kernel.org, Matthew Garrett , Len Brown , "Rafael J. Wysocki" Subject: Re: [PATCH v5 10/11] PM: hibernate: Verify the digest encryption key Message-ID: References: <20221111231636.3748636-1-evgreen@chromium.org> <20221111151451.v5.10.I504d456c7a94ef1aaa7a2c63775ce9690c3ad7ab@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221111151451.v5.10.I504d456c7a94ef1aaa7a2c63775ce9690c3ad7ab@changeid> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Fri, Nov 11, 2022 at 03:16:35PM -0800, Evan Green wrote: > We want to ensure that the key used to encrypt the digest What is meant by "the key used to encrypt the digest"? > was created by > the kernel during hibernation. To do this we request that the TPM > include information about the value of PCR 23 at the time of key > creation in the sealed blob. On resume, we can make sure that the PCR > information in the creation data blob (already certified by the TPM to > be accurate) corresponds to the expected value. Since only > the kernel can touch PCR 23, if an attacker generates a key themselves > the value of PCR 23 will have been different, allowing us to reject the > key and boot normally instead of resuming. It seems that PCR 23 is already included in the authorization policy for the key, so why is this extra part needed? - Eric