mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guanglei Zhu <zhugl3@xiaopeng.com>
To: jarkko@kernel.org
Cc: peterhuewe@gmx.de, jgg@ziepe.ca, linux-integrity@vger.kernel.org,
	linux-kernel@vger.kernel.org, liuc63@xiaopeng.com
Subject: Re: [PATCH] tpm: eventlog: check the payload size before reading tag events
Date: Wed,  4 Nov 2026 10:58:09 +0800	[thread overview]
Message-ID: <20261104025809.787723-1-zhugl3@xiaopeng.com> (raw)
In-Reply-To: <aunbAIcxu8XTW0Ph@kernel.org>

The legacy PC Client spec defines the EV_EVENT_TAG payload as a
TCPA_PC_EVENT: event_id, event_size and event-type-specific data.
A conformant entry carries the 8-byte header, and the hash-type
ids carry a full digest.

The catch is that the log is an ACPI table the firmware leaves in
memory: the TPM never measures the log itself, so the kernel cannot
tell a conformant log from a corrupted one.  The iterators already
work on that assumption - they stop once the declared event_size
runs past the buffer end - and this check applies the same rule to
what the EVENT_TAG branch reads off the payload.

  reply	other threads:[~2026-11-04  2:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03  8:41 Guanglei Zhu
2026-11-03 13:00 ` Jarkko Sakkinen
2026-11-04  2:58   ` Guanglei Zhu [this message]
2026-11-04 11:02     ` Jarkko Sakkinen
2026-11-04 11:26       ` [PATCH v2] " Guanglei Zhu

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=20261104025809.787723-1-zhugl3@xiaopeng.com \
    --to=zhugl3@xiaopeng.com \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuc63@xiaopeng.com \
    --cc=peterhuewe@gmx.de \
    /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

all inboxes | Powered by JetHome®