From: Jarkko Sakkinen <jarkko@kernel.org>
To: Guanglei Zhu <zhugl3@xiaopeng.com>
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 13:02:19 +0200 [thread overview]
Message-ID: <ausQu4DY8WARe_2j@kernel.org> (raw)
In-Reply-To: <20261104025809.787723-1-zhugl3@xiaopeng.com>
On Wed, Nov 04, 2026 at 10:58:09AM +0800, Guanglei Zhu wrote:
> 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.
Yeah, this is exactly what I wanted to know. Could you refine the
patch and send a new version with this?
It's really good stuff to have in the commit log when looking back
at old changes.
Br, Jarkko
next prev parent reply other threads:[~2026-11-04 11:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 8:41 [PATCH] tpm: eventlog: check the payload size before reading tag events Guanglei Zhu
2026-11-03 13:00 ` Jarkko Sakkinen
2026-11-04 2:58 ` Guanglei Zhu
2026-11-04 11:02 ` Jarkko Sakkinen [this message]
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=ausQu4DY8WARe_2j@kernel.org \
--to=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 \
--cc=zhugl3@xiaopeng.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.