Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1275245rwl; Fri, 4 Nov 2022 11:54:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4otSvXAx/xZU3oZ4DH/rXZM0Q/1l1Ht/k6anXYbLWptQL/gpNTD2cZXdLLmP96wOmh0y6c X-Received: by 2002:a17:902:f60d:b0:186:c6d7:6574 with SMTP id n13-20020a170902f60d00b00186c6d76574mr6491850plg.171.1667588067885; Fri, 04 Nov 2022 11:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667588067; cv=none; d=google.com; s=arc-20160816; b=Ummhqv4NZdT7Fo6T045sD0JXi6UnlCZxxj16zl5tavrXtk9F5/vFGS6OyoR9Ff/E1D DUR1TbSUQy2T+vCAkrbvsUmHSjZ8KKgGgXaLR4oMEpaX+NlEAvLoU8ypDMq77GiuQtlH ESIphExdgiWxiTVidcCsHVMG6BMUYQ1WTbmQAjd7HJqQZP3fvJSf3cTbfaIfhqg0dgND zmXiMdeZszgcA6GQikghbpEoj3LvVb95ma1yaT7YAhuSZNNcOy2Sz6Atp+rUKQbAiDsv OR3h+mwm5g0aJlf4+asZMiiSxONCEDhUFbrAYoxgr9AmpHyPtxnVYclLFdiRMzVXwg8n oN9g== 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=fFlgEoQ+2ARPKvzYCLdvHvwC3pq/RnzvVojet0DXLgg=; b=r7AZ5uLVh06lXeNplk5VZwbax5eby5hfIlqsTIksZqEAxPVUIm0o5t3AnYnemeuKC0 b6xlaBXfcPrIZlHGzVGob5aQA6EXc7vLVmU7d0gWpqkS/60opPQwfFw+CHkXqw5uWKte aFQJ5zVtC/ZsLDTf0Gfe2zJIxxVRxZ3/KLUU/XgMf1qBSuJJXM7qmzn+av8S80B6g0cp l7EgCg5VPTCw4G5hSh+AezF46kKbJQvi1d4GXkmyEGsj8gDoPT+NAHWqFPt2qS/Ep8K+ ngPQx8x7A0AdP96dlipQT8Dj+GTjfSGJ9/DTv+V43sRCk2RsDlELg9ZnGPr+pcePjNP9 Deeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="nJ8Xa/RO"; 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 lw14-20020a17090b180e00b0020d887ded6esi295332pjb.120.2022.11.04.11.54.15; Fri, 04 Nov 2022 11:54:27 -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="nJ8Xa/RO"; 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 S232159AbiKDSem (ORCPT + 96 others); Fri, 4 Nov 2022 14:34:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232077AbiKDSeg (ORCPT ); Fri, 4 Nov 2022 14:34:36 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F27082BEA for ; Fri, 4 Nov 2022 11:34:32 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id y203so5239322pfb.4 for ; Fri, 04 Nov 2022 11:34:32 -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=fFlgEoQ+2ARPKvzYCLdvHvwC3pq/RnzvVojet0DXLgg=; b=nJ8Xa/ROHn8AT1PIg/dhjRMINqphLAL/bOrhvxGaJRCtDh1l/knL1nNHyUgybie2+i 4/4cKvfd0kb4xC00W02DHqwHRJlnuzWSqU376vzNvl9FZx33yev9vWF/3XjSBccf27dl Emj5vMOkiP2lYyhiVng01hYuCLd3maODPa/LI= 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=fFlgEoQ+2ARPKvzYCLdvHvwC3pq/RnzvVojet0DXLgg=; b=Feki/ufZyUdKze5e5NkLt0tgKmqngxS4sNkAdQbaGHIttIh3rkh/5DKMzRvG8hJSTk G6QikGeKM5yycoEZAyTehP9TojR19nsh6cOgqVexfioncdvBRVvGU2QaF1zyKbxX/Twj fixZCy9LvqrSHAIkowvrzXDrn9qdL3i3CkFB9iKaK4pUKCDIeCzMOYO3BNpayr3+eN5p JDrqKJNCmLjC4dwz5CVSOaKjJXzgtfBvDsb5WKU4ty2B1/dqe/P7wS4YgCS9yDySWqvP GLfUvzDVGV3PWFmRGVAREBtY1DwZmKMHt9pDIgBXffT1cI30v4lNclRuDMhNJ2pLSkH5 p0+w== X-Gm-Message-State: ACrzQf01c/l4P/A+AUbD3O5OHopxri55OJQriDEvSS64pOXqqOMW/BVc MEK5gPpUkm/bJ3R+jPRiVedZqQ== X-Received: by 2002:a63:1206:0:b0:470:18c:1489 with SMTP id h6-20020a631206000000b00470018c1489mr14766650pgl.357.1667586872547; Fri, 04 Nov 2022 11:34:32 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b9-20020aa79509000000b0056bc30e618dsm3071068pfp.38.2022.11.04.11.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 11:34:32 -0700 (PDT) Date: Fri, 4 Nov 2022 11:34:31 -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 , Matthew Garrett , Ben Boeckel , David Howells , James Morris , Paul Moore , "Serge E. Hallyn" , keyrings@vger.kernel.org, linux-doc@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH v4 05/11] security: keys: trusted: Allow storage of PCR values in creation data Message-ID: <202211041134.927C258@keescook> References: <20221103180120.752659-1-evgreen@chromium.org> <20221103105558.v4.5.I32591db064b6cdc91850d777f363c9d05c985b39@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221103105558.v4.5.I32591db064b6cdc91850d777f363c9d05c985b39@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:13AM -0700, Evan Green wrote: > From: Matthew Garrett > > When TPMs generate keys, they can also generate some information > describing the state of the PCRs at creation time. This data can then > later be certified by the TPM, allowing verification of the PCR values. > This allows us to determine the state of the system at the time a key > was generated. Add an additional argument to the trusted key creation > options, allowing the user to provide the set of PCRs that should have > their values incorporated into the creation data. > > Link: https://lore.kernel.org/lkml/20210220013255.1083202-6-matthewgarrett@google.com/ > Signed-off-by: Matthew Garrett Reviewed-by: Kees Cook -- Kees Cook