Linux Integrity Measurement development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Matthew Garrett <matthewg@nvidia.com>,
	keyrings@vger.kernel.org,  linux-integrity@vger.kernel.org,
	rafael@kernel.org, linux-pm@vger.kernel.org,
		linux-efi@vger.kernel.org
Subject: Re: [PATCH 01/17] tpm: Define a kernel-owned TPM NV index that can't be modified by userland
Date: Sun, 11 Oct 2026 08:04:27 +0200	[thread overview]
Message-ID: <059384e86fd256618498b9a7214b6421d38fdf1f.camel@HansenPartnership.com> (raw)
In-Reply-To: <asqthz69ohnMVCye@srcf.ucam.org>

On Sat, 2026-10-10 at 14:26 -0700, Matthew Garrett wrote:
> On Sat, Oct 10, 2026 at 11:22:34AM +0200, James Bottomley wrote:
> 
> > The reason I never really proposed such a scheme is the rollback
> > problem (old version of OS or non-Linux OS can create the NV index
> > from user space bypassing the kernel only block) which you try to
> > solve with PCR5.  Do you have any data for how widespread measuring
> > exitbootservices is?  I know edk2 does it, but I just looked on my
> > XPS13 and I only have two PCR5 events: a separator and the GPT
> > table, so it's definitely in violation, but if Dells don't do this
> > then it's indicative that many other manufacturers might not as
> > well.
> 
> Does your log replay correctly for PCR 5? It's *extremely* common for
> the extension to happen without logging, since logging needs to be
> done  into the late events table and almost nobody got that right
> until a few years ago (hence 
> https://github.com/google/go-attestation/blob/master/attest/eventlog_workarounds.go#L70
> )

It seems to.  This is what tpm2-eventlog returns (edited only to show
PCR 5):

---
version: 1
events:
- EventNum: 20
  PCRIndex: 5
  EventType: EV_SEPARATOR
  DigestCount: 2
  Digests:
  - AlgorithmId: sha1
    Digest: "9069ca78e7450a285173431b3e52c5c25299e473"
  - AlgorithmId: sha256
    Digest: "df3f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81119"
  EventSize: 4
  Event: "00000000"
- EventNum: 22
  PCRIndex: 5
  EventType: EV_EFI_GPT_EVENT
  DigestCount: 2
  Digests:
  - AlgorithmId: sha1
    Digest: "bcd4ef027ee6b70a1ce07b37378da7ad02bfc545"
  - AlgorithmId: sha256
    Digest: "ed5eaf5ac436743417c862277ac71e1f202e6ff734fcf9a4ecdabc0d045d20a3"
  EventSize: 484
  Event: "4546492050415254000001005c000000de83a7fd000000000100000000000000af129e3b0000000022000000000000008e129e3b00000000fc1e83487e221840b908f829a235f48b02000000000000008000000080000000983fc1db030000000000000028732ac11ff8d211ba4b00a0c93ec93bb131ae393c3797438f4a8bf58beeaef50008000000000000ff071000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000af3dc60f838472478e793d69d8477de4cde1b4fc71d4a245a89533bb0b524e9b0008100000000000ff0f5e3b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006dfd5706aba4c44384e50933c84b4f4fb29b70a77c1da04da9d7f36291c77dc000105e3b000000008e129e3b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
pcrs:
  sha256:
    5  : 0x9c41c9e22fb5275e84b88f7eda8a764961f67ede9dfad9626e84208c9f7de63c

and

jejb@lingrow:~> cat /sys/class/tpm/tpm0/pcr-sha256/5
9C41C9E22FB5275E84B88F7EDA8A764961F67EDE9DFAD9626E84208C9F7DE63C


So that's a match.

Regards,

James

  reply	other threads:[~2026-10-11  6:04 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 13:20 [RFC] Make hibernation work with lockdown Matthew Garrett
2026-10-08 13:20 ` [PATCH 01/17] tpm: Define a kernel-owned TPM NV index that can't be modified by userland Matthew Garrett
2026-10-08 13:41   ` Matthew Garrett
2026-10-08 16:24     ` Jarkko Sakkinen
2026-10-08 16:23   ` Jarkko Sakkinen
2026-10-09  8:33     ` Matthew Garrett
2026-10-10 21:36       ` Jarkko Sakkinen
2026-10-08 17:06   ` Ilias Apalodimas
2026-10-10  9:22   ` James Bottomley
2026-10-10 21:26     ` Matthew Garrett
2026-10-11  6:04       ` James Bottomley [this message]
2026-10-11 10:23         ` Matthew Garrett
2026-10-11 10:27           ` James Bottomley
2026-10-11 11:28             ` Matthew Garrett
2026-10-11  8:21       ` James Bottomley
2026-10-08 13:20 ` [PATCH 02/17] efi: Add a mechanism to modify TPM state depending on kernel security features Matthew Garrett
2026-10-08 16:38   ` Jarkko Sakkinen
2026-10-08 13:20 ` [PATCH 03/17] tpm: Allow tpm2_start_auth_session() to start an audit session Matthew Garrett
2026-10-08 13:20 ` [PATCH 04/17] tpm: Log commands executed in " Matthew Garrett
2026-10-08 13:20 ` [PATCH 05/17] tpm: Add a kernel attestation key and signed audit digest retrieval Matthew Garrett
2026-10-08 16:45   ` James Bottomley
2026-10-09  8:29     ` Matthew Garrett
2026-10-08 13:20 ` [PATCH 06/17] tpm: Use TPM2_NV_ReadPublic to read NV index names Matthew Garrett
2026-10-08 13:20 ` [PATCH 07/17] tpm: Add in-kernel support for reading NV indices Matthew Garrett
2026-10-08 13:20 ` [PATCH 08/17] tpm: Add NV define, undefine and write helpers Matthew Garrett
2026-10-08 13:20 ` [PATCH 09/17] tpm: Provision the kernel NV index at registration Matthew Garrett
2026-10-08 13:20 ` [PATCH 10/17] tpm: Move the bounds-checked response reader to a header Matthew Garrett
2026-10-08 13:20 ` [PATCH 11/17] tpm: Add kernel signing key creation with audited provenance Matthew Garrett
2026-10-08 17:00   ` James Bottomley
2026-10-09  8:31     ` Matthew Garrett
2026-10-08 13:20 ` [PATCH 12/17] tpm: Add signing with the kernel signing key Matthew Garrett
2026-10-08 13:20 ` [PATCH 13/17] tpm: Add verification of kernel signing key provenance Matthew Garrett
2026-10-10  9:34   ` James Bottomley
2026-10-10 21:18     ` Matthew Garrett
2026-10-10  9:42   ` James Bottomley
2026-10-10 21:20     ` Matthew Garrett
2026-10-08 13:20 ` [PATCH 14/17] PM: hibernate: Add image digest and signature page infrastructure Matthew Garrett
2026-10-08 13:20 ` [PATCH 15/17] PM: hibernate: Sign and verify images with a kernel-generated TPM key Matthew Garrett
2026-10-08 13:20 ` [PATCH 16/17] PM: hibernate: Refuse to verify images with a virtual TPM Matthew Garrett
2026-10-08 13:20 ` [PATCH 17/17] PM: hibernate: Allow hibernation under lockdown with signed images Matthew Garrett
2026-10-08 16:53   ` Jarkko Sakkinen
2026-10-09  8:31     ` Matthew Garrett
2026-10-10 21:29       ` Jarkko Sakkinen
2026-10-08 15:56 ` [RFC] Make hibernation work with lockdown Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=059384e86fd256618498b9a7214b6421d38fdf1f.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=matthewg@nvidia.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox