Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4588599rwb; Tue, 20 Sep 2022 16:46:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7tZMaz/EJowWgwIaaQtopt6HhygXdfSS1OBTvxE33BlSF8ER8JmvsN5aYUKdJtxdR28YA4 X-Received: by 2002:a05:6402:11d1:b0:451:964:3af3 with SMTP id j17-20020a05640211d100b0045109643af3mr22881710edw.225.1663717566049; Tue, 20 Sep 2022 16:46:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663717566; cv=none; d=google.com; s=arc-20160816; b=LgeC6OSopJTPGWyaZUYGRHyxQJ28OSIcjKMNqvxLu3rww35LXetvdr+P+xewUA00xo HuWyHeH4kI4SfDW4Sj/HIixhcbn0ulnJONXx5TB6764UUpX3X7R3knxanspr5KFG4knd a7CKClfL73+aCdvX8HPW7egBntqGryxuV1pBWQf7J01BBp5q9DKsyESIyqX9COSQ09z8 XHf+BIphZJo9ZPCuzQmY5V75WlLgumgxkHY8BISmxtLOfNvvgh1mnitM/u+Z3xeEOYeK XtCur3tz6vUuTSx2Ojszz+vcabX0Twzo2Z9v3kTHheJi75TyLuJasuEC8xOXXwLJyBfW uiTg== 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=YBxKYtku/8oBqXa6wknfhjy5g8vzVr4YX5LTwcm1bbI=; b=cvcm/pjt5FCveAyoPwH3hijJgzbpmVrunrnDsnvxWu+RzFFPNlhYR08pAJqFRCKYLl eO0QpyoeOxSq7zjAQ/VSh3rCjazf/ehA3rb6e8rgeMuUyawgUu1lAGzFlirH+sf6JAw3 +5RWkw3cecCDR+CofFhkfLVAFS7nJ9Eyzxdgc+0WNlKVE41e6eAQ/t7XmxFvM5bx7C7T Yhlc7xYGtKZqeATX6Vu2nTQY24VWOMtoxpn6E+1UStXG++egJFbcB2q/qXdUmq/XkFsn t1ayW+anDUU/l6gpUTu1d4wG+wWeGmPtkmcBgAcu5Ph+1s8JK295sg53XFxlTpyTB/gL xApg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gD+f9UOZ; 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 hb9-20020a170907160900b0073d932580ffsi1216723ejc.242.2022.09.20.16.45.40; Tue, 20 Sep 2022 16:46:06 -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=gD+f9UOZ; 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 S230331AbiITXY2 (ORCPT + 99 others); Tue, 20 Sep 2022 19:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230368AbiITXY0 (ORCPT ); Tue, 20 Sep 2022 19:24:26 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B552C7548F for ; Tue, 20 Sep 2022 16:24:24 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id f193so4260643pgc.0 for ; Tue, 20 Sep 2022 16:24:24 -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; bh=YBxKYtku/8oBqXa6wknfhjy5g8vzVr4YX5LTwcm1bbI=; b=gD+f9UOZYo3ekJbZUpFYgJ/HfGJ3fd5gvcLeDrzeVaBYB8VWTCKUuiMS0S396sBJ6X KpDzMKtkwKRdJNS6Fbjyx6EOV6BmQStq678NppE46oVHcCnQ2pGndSnsbyZDK+Ejy+Qj EtfxzfsAymKrFf4r4Wv/XpQ48uxJNUbG/MkkM= 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; bh=YBxKYtku/8oBqXa6wknfhjy5g8vzVr4YX5LTwcm1bbI=; b=TcrrIKubREZsanc5D5obp/cYOT0ptwcIlLJfq3ZJQ6H770dvrSKXxCG2R43/UI71uU 5muVss2N9x92VYBR4Qs45ZQ/mFw0duM2NHgwV8OLEJw5+02szw2nwLjjIo5KMIHp9+rk mz8tQr7RMLDwUs3U7tBRNUNQwGgfljPRh5mD+xG544y6VtBKSs8B87jUPjAspxXAbxXJ zDviSNXxKq4br/4y4ohu3601nD6F9DEFymEQ+34yzKtR+U6dGRjpc+7/0wz2R1tFPU5H K3re6F8uCLLzMONB2tTTHtjmpUcDiEeO53f5KyudiNX/JPpOZiTnQovQgUHrDxPBzwGx 8H2A== X-Gm-Message-State: ACrzQf1Q5/ukv4fP92H3jZKrRaFpcq3PfZmye09vfl7paNnyQUSRd1Lm Sao6dM8Tjt4/A5povGTUqEmHmA== X-Received: by 2002:a65:6742:0:b0:43a:827d:c0 with SMTP id c2-20020a656742000000b0043a827d00c0mr7944368pgu.537.1663716264218; Tue, 20 Sep 2022 16:24:24 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b20-20020a6567d4000000b0042b291a89bfsm536149pgs.11.2022.09.20.16.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 16:24:23 -0700 (PDT) Date: Tue, 20 Sep 2022 16:24:22 -0700 From: Kees Cook To: Evan Green Cc: linux-kernel@vger.kernel.org, gwendal@chromium.org, Eric Biggers , Matthew Garrett , jarkko@kernel.org, zohar@linux.ibm.com, linux-integrity@vger.kernel.org, Pavel Machek , apronin@chromium.org, dlunev@google.com, rjw@rjwysocki.net, linux-pm@vger.kernel.org, corbet@lwn.net, jejb@linux.ibm.com, Hao Wu , Len Brown , Matthew Garrett , "Rafael J. Wysocki" , axelj Subject: Re: [PATCH v2 10/10] PM: hibernate: seal the encryption key with a PCR policy Message-ID: <202209201620.A886373@keescook> References: <20220823222526.1524851-1-evgreen@chromium.org> <20220823152108.v2.10.Ifce072ae1ef1ce39bd681fff55af13a054045d9f@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220823152108.v2.10.Ifce072ae1ef1ce39bd681fff55af13a054045d9f@changeid> X-Spam-Status: No, score=-2.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 Tue, Aug 23, 2022 at 03:25:26PM -0700, Evan Green wrote: > The key blob is not secret, and by default the TPM will happily unseal > it regardless of system state. We can protect against that by sealing > the secret with a PCR policy - if the current PCR state doesn't match, > the TPM will refuse to release the secret. For now let's just seal it to > PCR 23. In the long term we may want a more flexible policy around this, > such as including PCR 7 for PCs or 0 for Chrome OS. > > Sourced-from: Matthew Garrett If it's a total rewrite, I'd say use: Suggested-by: Matthew Garrett <...> Link: https://lore.kernel.org/of/what/it/was/based/on If it's built on an existing patch, I'd say use: Co-developed-by: Matthew Garrett <...> Signed-off-by: Matthew Garrett <...> But I defer to what Matthew thinks. :) Also, if you don't hear from Matthew, maybe ping his mjg59@srcf.ucam.org address. -Kees -- Kees Cook