CVE-2026-98728

tpm: fix off-by-four bounds check in tpm2_get_random()

Published Oct 18, 2026 CVSS 3.1 · 2.5 Low EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

tpm: fix off-by-four bounds check in tpm2_get_random()

When the response carries the TPM2_ST_SESSIONS tag, tpm2_get_random()
skips the 4-byte parameter size field before locating the random data,
but the bounds check still validates the response length against
TPM_HEADER_SIZE. A truncated response can pass the check and make
memcpy() read up to 4 bytes past the response end, so stale buffer
contents end up in the caller's random bytes.

Fix this by checking the response length against 'offset', which
already includes the skipped parameter size field.

Analysis

AI-generated

Technical impact

In the Linux kernel, the TPM2 driver contains an off‑by‑four bounds check in the tpm2_get_random() routine. When a response bearing the TPM2_ST_SESSIONS tag is processed, the driver skips the 4‑byte parameter size field before locating the random data, yet the bounds check still validates the response length against TPM_HEADER_SIZE. A truncated response can therefore pass the check and cause a memcpy() to read up to four bytes past the end of the actually received buffer, resulting in stale kernel memory being returned as random data. This flaw constitutes a buffer over‑read (CWE‑125) that can inadvertently leak information stored in the kernel stack or surrounding memory.

Affected Systems

All Linux kernel distributions that ship the unpatched TPM2 driver are susceptible. The vulnerability is independent of distribution; any kernel built from a source tree prior to the commit that introduced the valid bounds check is affected. Administrators must verify whether the implicated commit is present in their current kernel build, as the advisory does not list a specific kernel version.

Risk and Exploitability

The EPSS score is < 1%, indicating a low probability of exploitation. The vulnerability is not listed in the CISA KEV catalog. The CVSS score is 2.5, indicating low severity. The buffer over‑read may allow information disclosure, but it does not provide remote code execution or a denial‑of‑service on its own. The likely attack vector requires an attacker to supply a malformed TPM response to the kernel, implying either local privilege or control over TPM command exchange. This inference is based on the description of how the kernel processes TPM responses, as the advisory does not detail an explicit attack path.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel update that includes the commit which fixes the bounds check in tpm2_get_random()
  • Restrict access to the /dev/tpm device or TPM subsystem for untrusted users or applications until the patch is applied, using SELinux, AppArmor or PAM policies
  • Monitor system logs for anomalous TPM activity, such as unexpected random data length errors, to detect any residual exploitation attempts

Generated by OpenCVE AI on October 23, 2026 at 22:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4850-1 linux-6.12 security update
Ubuntu USN Ubuntu USN USN-9018-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9018-2 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9160-1 Linux kernel (Azure) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-119
Type Values Removed Values Added
Weaknesses CWE-125
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Low

Type Values Removed Values Added
Weaknesses CWE-119
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: tpm: fix off-by-four bounds check in tpm2_get_random() When the response carries the TPM2_ST_SESSIONS tag, tpm2_get_random() skips the 4-byte parameter size field before locating the random data, but the bounds check still validates the response length against TPM_HEADER_SIZE. A truncated response can pass the check and make memcpy() read up to 4 bytes past the response end, so stale buffer contents end up in the caller's random bytes. Fix this by checking the response length against 'offset', which already includes the skipped parameter size field.
Title tpm: fix off-by-four bounds check in tpm2_get_random()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 9:24 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 18, 2026, 4:17 PM
Modified
Oct 19, 2026, 10:19 AM
Severity
Low
Public date
Oct 18, 2026, 12:00 AM