Impact
The kernel’s TPM character device interface incorrectly permits positional reads and writes because the open handlers leave FMODE_PREAD and FMODE_PWRITE enabled. A pread with an offset larger than the pending response length applies that offset unchecked to the data buffer, leading to an out-of-bounds heap read via copy_to_user() and a subsequent zero-write through memset(). This flaw does not provide coherent semantics for sequential read/write and can corrupt memory buffers used by the TPM subsystem, potentially revealing data or causing a denial of service.
Affected Systems
The vulnerability affects Linux kernel implementations that expose TPM devices, including all distributions using an upstream kernel prior to the patch commit. It was confirmed on Linux 6.12 with a swtpm TPM 2.0 device. Any system that mounts the /dev/tpm0 or /dev/tpmrm0 character devices is susceptible when the kernel has not been updated to make these devices non‑seekable.
Risk and Exploitability
CVSS score is 7.8 and EPSS indicates a probability less than 1 %. The flaw is not listed in the CISA KEV catalog. An attacker would need local access to the TPM device file, which is normally restricted to privileged users or processes. Based on the description, the attack vector is inferred to be local access to the TPM device file and is not explicitly stated. The out-of-bounds read/write could enable local privilege escalation or a service interruption. The patch removes FMODE_PREAD/FWRITE from the device opens, ensuring positional I/O fails with –ESPIPE and sandboxing the interface.
OpenCVE Enrichment