CVE-2026-143098: tpm: eventlog: check the payload size before reading tag events
In the Linux kernel, the following vulnerability has been resolved:
tpm: eventlog: check the payload size before reading tag events
The EVENTTAG branch of geteventname() casts the event payload to struct tcpapcevent and reads from it:
pcevent = (struct tcpapcevent )evententry;
switch (doendianconversion(pcevent->eventid)) { ... for (i = 0; i < 20; i++) dlen += sprintf(&data[2i], "%02x", pcevent->eventdata[i]);
The log iterators only verify that the event header plus the declared eventsize stays within the log buffer; they do not require the payload of an EVENTTAG entry to be large enough for the fields the branch reads. A truncated entry makes the branch read up to 20 bytes of eventdata[] past the end of the entry, and, for the last entry in the log, past the end of the buffer itself.
The legacy PC Client spec defines the EVEVENTTAG payload as a TCPAPCEVENT - eventid, eventsize and event-type-specific data - so a conformant entry carries the 8-byte header and the hash-type ids carry a full digest. The log itself, however, is an ACPI table the firmware leaves in memory: the TPM never measures the log, so the kernel cannot tell a conformant log from a corrupted one. The iterators already work on that assumption - they stop once the declared eventsize runs past the buffer end - and the readers should apply the same rule to what they take off the payload.
Skip entries whose payload cannot even hold the event id, and skip the 20-byte digest dump when the payload cannot hold the full tcpapcevent header plus the digest, so the branch never reads beyond the entry it is formatting.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the event-log reader, check payload sizes before reading event data; skip entries too small to hold the event ID and skip EVENT_TAG entries whose payload cannot hold the fields being read, including the full 20-byte digest.