[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211041132.E8CB636@keescook>
Date: Fri, 4 Nov 2022 11:33:54 -0700
From: Kees Cook <keescook@...omium.org>
To: Evan Green <evgreen@...omium.org>
Cc: linux-kernel@...r.kernel.org, corbet@....net,
linux-pm@...r.kernel.org, rjw@...ysocki.net, gwendal@...omium.org,
apronin@...omium.org, Pavel Machek <pavel@....cz>,
Matthew Garrett <mgarrett@...ora.tech>,
linux-integrity@...r.kernel.org, jejb@...ux.ibm.com,
zohar@...ux.ibm.com, dlunev@...gle.com,
Eric Biggers <ebiggers@...nel.org>,
Ben Boeckel <me@...boeckel.net>, jarkko@...nel.org,
David Howells <dhowells@...hat.com>,
James Morris <jmorris@...ei.org>,
Paul Moore <paul@...l-moore.com>,
"Serge E. Hallyn" <serge@...lyn.com>, keyrings@...r.kernel.org,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH v4 04/11] security: keys: trusted: Include TPM2 creation
data
On Thu, Nov 03, 2022 at 11:01:12AM -0700, Evan Green wrote:
> In addition to the private key and public key, the TPM2_Create
> command may also return creation data, a creation hash, and a creation
> ticket. These fields allow the TPM to attest to the contents of a
> specified set of PCRs at the time the trusted key was created. Encrypted
> hibernation will use this to ensure that PCRs settable only by the
> kernel were set properly at the time of creation, indicating this is an
> authentic hibernate key.
>
> Encode these additional parameters into the ASN.1 created to represent
> the key blob. The new fields are made optional so that they don't bloat
> key blobs which don't need them, and to ensure interoperability with
> old blobs.
>
> Signed-off-by: Evan Green <evgreen@...omium.org>
There's a lot of open-coded math for the bounds checking. I didn't
immediately see any problems, but it'd be nice if there was a way to
hook a fuzzer up to this, or at least write some KUnit tests to check
boundary conditions explicitly.
Reviewed-by: Kees Cook <keescook@...omium.org>
--
Kees Cook
Powered by blists - more mailing lists