Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1300364rwl; Fri, 4 Nov 2022 12:11:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7cnx9ifFnfjaKg+/0XBnDKU8qEyrMZzMBi85ZCZkbhZy7YbJasUfYG+R5f+fNcZwu0V9k0 X-Received: by 2002:a05:6a02:18f:b0:44a:3972:898d with SMTP id bj15-20020a056a02018f00b0044a3972898dmr31182335pgb.525.1667589101875; Fri, 04 Nov 2022 12:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667589101; cv=none; d=google.com; s=arc-20160816; b=zt+kLpFh6mgDMaE4d8lXMAummaOHkY61CWrdJT3DlztjfpLb/QElzQSpdDw+iNaVKF KGomO+g++Jz6Irwe8x9/G4KAtLgcNSInvsv1/57ZriTA2uAjJUkv9B3h/Wm07D13/Omy 9H7lONqlXdsC48AIXkhJVC6A7DOmf9BqFna9CFuLyXHOOfcjLNtlmKg1fdhST2RkUiPG Dz/r+8/iJuUs8Nbpij6Pykx0V2MS1mGngHPGvMP0aVkMe+vRoKN4Jna4HBbueoODe6pU Nljdveh4AKA6f9LPkJAkcuybNqpEYKwwzAYrW9xDHBqs8tjIX3/wSpnHXbfu5MiaBhR1 g3Rw== 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=VI9dLZqr4phcLu/et/iVRa9n3ErWpwIc+07/b50LvBM=; b=AF8bysm99drhd7B1agcJJ6kKImtOMxnZz4hd7kourKyyu0n85o5VoIANzfbciKlz8X fRr3YWGk3/GBviN5fV5AqsajBMJ4bJ+JCjn/jivlYLcqC22wEH4Aadd2a3wJDq9lgWSh OxrRNls53+5hk5x8w2cM/HW5qmvbZhDF/344tEIBcPuUmU1C3iKj3Dw72gxiTVUramQW RDL+xYWRi54bhQGBetqEkiO1RFqVmjC+raTiGavcPahwrmEbUzhpqFM0ULw2lV0B54Sk ZAlDYEGbiKFcpFKTJwSfTpAhZJVTncLZJKmrGqY51tckn1GmHARMnDO+fmZ9qcJ+Dic2 jDIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eSmCdWYU; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x186-20020a6386c3000000b00462fbd5b46bsi347754pgd.35.2022.11.04.12.11.28; Fri, 04 Nov 2022 12:11:41 -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; dkim=pass header.i=@chromium.org header.s=google header.b=eSmCdWYU; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232192AbiKDSfh (ORCPT + 96 others); Fri, 4 Nov 2022 14:35:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232176AbiKDSfc (ORCPT ); Fri, 4 Nov 2022 14:35:32 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0B504B981 for ; Fri, 4 Nov 2022 11:35:29 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id u8-20020a17090a5e4800b002106dcdd4a0so9004983pji.1 for ; Fri, 04 Nov 2022 11:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VI9dLZqr4phcLu/et/iVRa9n3ErWpwIc+07/b50LvBM=; b=eSmCdWYUo+MFol9rpoHIO4A3jWbVg5gjgrxdtvSvXcxpFOvgpn9xN9wC+fN6yyl1vV ppeLBE/m++6rQfxfGFY1nnD319PbUjzI6Wz6hFJdD+qIqtWg5GNX5WtM/tNVzdJqRF/a bVPGV4ssXA6he9ggcTxi1eOvdJjniUyQ3m9xo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VI9dLZqr4phcLu/et/iVRa9n3ErWpwIc+07/b50LvBM=; b=6fyOHSqr5DlkHkY5sf4KOf9+wS05gxgxDkm/spnWs79NXxfNKlhfGjjAXwwnaQy+EL Yasz972ZNS2jKdlxwcharFrvRmtb4nkN+WeFbVyo+rxj5/+tsZudxwDeSWdVfAH9UqvY DA0nWmYPOMwIiuaKixu0GrApY2784zBSAJsClt2dGzOb+Hg8rM6OLGSMCd6SWPz6OkpH YRPh2UI/WHWujBwgLs5KRhzldMqujWx3KffWyfTvVUIeiZYIrzAJqZSzueBNPHfFUM/D GoTRrzJ8HwCVHqwj7I3dz9deBj1oC1yKoq4GvP+8NUwD5Nu+fEmNLLJQDq3V9oqAcNKx vAQg== X-Gm-Message-State: ACrzQf2DOx27zsBj9Hu3zzTT/J6YnndeXlhKS72JdhYr4QHsQu660HFq VpSli+Am5wKlvAe9hibZKzqXVA== X-Received: by 2002:a17:90b:3b4a:b0:213:589d:d300 with SMTP id ot10-20020a17090b3b4a00b00213589dd300mr37724237pjb.139.1667586929205; Fri, 04 Nov 2022 11:35:29 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id jf9-20020a170903268900b001868bf6a7b8sm81457plb.146.2022.11.04.11.35.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 11:35:28 -0700 (PDT) Date: Fri, 4 Nov 2022 11:35:28 -0700 From: Kees Cook To: Evan Green Cc: linux-kernel@vger.kernel.org, corbet@lwn.net, linux-pm@vger.kernel.org, rjw@rjwysocki.net, gwendal@chromium.org, apronin@chromium.org, Pavel Machek , Matthew Garrett , linux-integrity@vger.kernel.org, jejb@linux.ibm.com, zohar@linux.ibm.com, dlunev@google.com, Eric Biggers , Ben Boeckel , jarkko@kernel.org, Matthew Garrett , David Howells , James Morris , Matthew Garrett , Paul Moore , "Serge E. Hallyn" , axelj , keyrings@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH v4 06/11] security: keys: trusted: Verify creation data Message-ID: <202211041135.0B18C14@keescook> References: <20221103180120.752659-1-evgreen@chromium.org> <20221103105558.v4.6.I6cdb522cb5ea28fcd1e35b4cd92cbd067f99269a@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221103105558.v4.6.I6cdb522cb5ea28fcd1e35b4cd92cbd067f99269a@changeid> X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Thu, Nov 03, 2022 at 11:01:14AM -0700, Evan Green wrote: > If a loaded key contains creation data, ask the TPM to verify that > creation data. This allows users like encrypted hibernate to know that > the loaded and parsed creation data has not been tampered with. > > Suggested-by: Matthew Garrett > Signed-off-by: Evan Green Reviewed-by: Kees Cook -- Kees Cook