Description
In the Linux kernel, the following vulnerability has been resolved:

tpm: Make the TPM character devices non-seekable

The TPM character devices expose a sequential command/response
interface, but their open handlers leave FMODE_PREAD and FMODE_PWRITE
enabled.

After a command leaves a response pending, pread(fd, buf, 16, 0x1400)
passes 0x1400 as *off to tpm_common_read(). The transfer length is
bounded by response_length, but the offset is used unchecked when
forming data_buffer + *off. A sufficiently large offset therefore causes
an out-of-bounds heap read through copy_to_user() and, if the copy
succeeds, an out-of-bounds zero-write through the following memset().

Positional I/O does not provide coherent semantics for this interface.
An arbitrary pread offset cannot represent how much of a response has
been consumed sequentially. The write callback always stores a command
at the start of data_buffer, while pwrite() does not update file->f_pos
and can leave the sequential read cursor stale.

Call nonseekable_open() from both open handlers. This removes
FMODE_PREAD and FMODE_PWRITE, causing positional reads and writes to
fail with -ESPIPE before reaching the TPM callbacks, and explicitly
marks the files non-seekable. Normal read() and write() continue to use
the existing sequential f_pos cursor, leaving the response state machine
unchanged.

Tested on Linux 6.12 with KASAN and a swtpm TPM2 device:

- sequential partial reads returned the complete response
- pread() and preadv() with offset 0x1400 returned -ESPIPE
- pwrite() and pwritev() with offset zero returned -ESPIPE
- the pending response remained intact after the rejected operations
- a subsequent normal command/response cycle completed normally
- no KASAN report was produced.
Published: 2026-08-15
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

Generated by OpenCVE AI on August 18, 2026 at 22:42 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that includes the non‑seekable patch (e.g., Linux 6.12 or later).
  • Restrict access to /dev/tpm0 and /dev/tpmrm0 so that only trusted users or services can open them, using file permissions or ACLs.
  • If the kernel cannot be updated immediately, temporarily disable the TPM device drivers or reboot the system to clear any pending responses before the patch is applied.

Generated by OpenCVE AI on August 18, 2026 at 22:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 18 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-122

Tue, 18 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-823
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 17 Aug 2026 20:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-122

Mon, 17 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-788

Mon, 17 Aug 2026 06:00:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Sat, 15 Aug 2026 09:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-788

Sat, 15 Aug 2026 06:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: tpm: Make the TPM character devices non-seekable The TPM character devices expose a sequential command/response interface, but their open handlers leave FMODE_PREAD and FMODE_PWRITE enabled. After a command leaves a response pending, pread(fd, buf, 16, 0x1400) passes 0x1400 as *off to tpm_common_read(). The transfer length is bounded by response_length, but the offset is used unchecked when forming data_buffer + *off. A sufficiently large offset therefore causes an out-of-bounds heap read through copy_to_user() and, if the copy succeeds, an out-of-bounds zero-write through the following memset(). Positional I/O does not provide coherent semantics for this interface. An arbitrary pread offset cannot represent how much of a response has been consumed sequentially. The write callback always stores a command at the start of data_buffer, while pwrite() does not update file->f_pos and can leave the sequential read cursor stale. Call nonseekable_open() from both open handlers. This removes FMODE_PREAD and FMODE_PWRITE, causing positional reads and writes to fail with -ESPIPE before reaching the TPM callbacks, and explicitly marks the files non-seekable. Normal read() and write() continue to use the existing sequential f_pos cursor, leaving the response state machine unchanged. Tested on Linux 6.12 with KASAN and a swtpm TPM2 device: - sequential partial reads returned the complete response - pread() and preadv() with offset 0x1400 returned -ESPIPE - pwrite() and pwritev() with offset zero returned -ESPIPE - the pending response remained intact after the rejected operations - a subsequent normal command/response cycle completed normally - no KASAN report was produced.
Title tpm: Make the TPM character devices non-seekable
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-17T05:40:45.521Z

Reserved: 2026-08-09T03:40:39.907Z

Link: CVE-2026-72135

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-15T06:21:30.973

Modified: 2026-08-17T06:18:13.280

Link: CVE-2026-72135

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-15T00:00:00Z

Links: CVE-2026-72135 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-18T22:45:03Z

Weaknesses
  • CWE-823

    Use of Out-of-range Pointer Offset