From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3F82C4332F for ; Fri, 4 Nov 2022 18:42:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231336AbiKDSmA (ORCPT ); Fri, 4 Nov 2022 14:42:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231431AbiKDSlx (ORCPT ); Fri, 4 Nov 2022 14:41:53 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA9FD1D673 for ; Fri, 4 Nov 2022 11:41:50 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id l6so5284041pjj.0 for ; Fri, 04 Nov 2022 11:41:50 -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=0/e3XNedcUafbur2krWu5QjN/qTE3byumYrWwxXDmZc=; b=kGSjUhZTyjnX8YG/47uimIoE2UEf9s/oVTICYJrEQO5GSp1K8+xNIGyKeF1KhMmemV k7ZbxfVkOQLiTfy90ca5LLathM338Bh+RvXpY0YYBtJGZNTf5qg8koUOtFY1ugoW6J8h Z89WoUjNYf4aucrM/3Toa4/13NvqSniAzQs7U= 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=0/e3XNedcUafbur2krWu5QjN/qTE3byumYrWwxXDmZc=; b=jSf9iDN4whwPGE8Gt22Brt6mhtWWh+iTMjTWcFLLGY5HFAXwkZS87CB0ch8/YOXvYP gLbYnE0s6Cwr0bhkiP6UbQWqjBgyEBaKeC/qt8OU2NFqPDsS+hQfEXZwyawFOJJkXbbv ges22WIkwcSbIBT0n23XRrCgBQodj8/5nyy8w0OVNrYFSsv4Flu/qf8SV/S4ewAo7QV7 c/6nYPvMZ4ATBbAGbj2wBFsGcJKj6xbXHTEL+Rf28aEXZQXCDic4NqNuv57ut4ZnCYzD Uu0QIEFqhpr34yeKeFqK2JeMEnh0IWX3eXgt3F1V4roF2NZnXPlWZ91pU13qoXVkvRPs uLJQ== X-Gm-Message-State: ACrzQf2tuJvZF+2id8CU5gND05UczpzcwR3sdqv92PkTPY6xU/1eQ1tI TpNMz3qwmmIJ4o9IxubByyFpmA== X-Google-Smtp-Source: AMsMyM5/IPN5VMplBtILamsruzNtJlYqyGvnWzu4y+2P1igwwYuJl16YKo0t3xoP5o5K5UwU0dTZrA== X-Received: by 2002:a17:903:200b:b0:186:892f:9f0b with SMTP id s11-20020a170903200b00b00186892f9f0bmr36374630pla.56.1667587310437; Fri, 04 Nov 2022 11:41:50 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id p5-20020a170902780500b00186c37270f6sm99028pll.24.2022.11.04.11.41.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 11:41:50 -0700 (PDT) Date: Fri, 4 Nov 2022 11:41:49 -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, Len Brown , "Rafael J. Wysocki" Subject: Re: [PATCH v4 08/11] PM: hibernate: Use TPM-backed keys to encrypt image Message-ID: <202211041139.15A90C4EED@keescook> References: <20221103180120.752659-1-evgreen@chromium.org> <20221103105558.v4.8.Ibd067e73916b9fae268a5824c2dd037416426af8@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221103105558.v4.8.Ibd067e73916b9fae268a5824c2dd037416426af8@changeid> Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Thu, Nov 03, 2022 at 11:01:16AM -0700, Evan Green wrote: > When using encrypted hibernate images, have the TPM create a key for us > and seal it. By handing back a sealed blob instead of the raw key, we > prevent usermode from being able to decrypt and tamper with the > hibernate image on a different machine. > > We'll also go through the motions of having PCR23 set to a known value at > the time of key creation and unsealing. Currently there's nothing that > enforces the contents of PCR23 as a condition to unseal the key blob, > that will come in a later change. > > Sourced-from: Matthew Garrett I'd say Suggested-by. "Source-from:" is not a tag that has ever been used before. :) Otherwise, looks good. Reviewed-by: Kees Cook -- Kees Cook