Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98728 Overview
CVE-2026-98728 is an out-of-bounds read vulnerability in the Linux kernel's Trusted Platform Module (TPM) 2.0 subsystem. The flaw resides in the tpm2_get_random() function, which retrieves random bytes from a TPM 2.0 device. When a response carries the TPM2_ST_SESSIONS tag, the function skips a 4-byte parameter size field before locating the random data. The bounds check, however, continues to validate the response length against TPM_HEADER_SIZE rather than the adjusted offset. A truncated response can pass this check and cause memcpy() to read up to four bytes past the end of the response buffer. Stale buffer contents then reach callers requesting random bytes, undermining the integrity of kernel randomness sourced from the TPM.
Critical Impact
An out-of-bounds read in tpm2_get_random() can leak up to four bytes of adjacent kernel memory into caller-visible random output, weakening cryptographic primitives that depend on TPM entropy.
Affected Products
- Linux kernel versions containing the vulnerable tpm2_get_random() bounds check in drivers/char/tpm/tpm2-cmd.c
- Distributions shipping unpatched stable kernel branches referenced in the upstream fix commits
- Systems using TPM 2.0 hardware or firmware TPMs for random number generation
Discovery Timeline
- 2026-10-18 - CVE-2026-98728 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98728
Vulnerability Analysis
The tpm2_get_random() function in the Linux kernel's TPM driver issues a TPM2_CC_GetRandom command and parses the response to extract random bytes. TPM 2.0 responses may carry either a TPM2_ST_NO_SESSIONS or TPM2_ST_SESSIONS tag. When the response tag is TPM2_ST_SESSIONS, the driver advances past an additional 4-byte parameter size field before reading the random data payload.
The defect lies in the length validation. The driver verifies the response length against the fixed TPM_HEADER_SIZE constant instead of the computed offset that already accounts for the skipped parameter size field. A short or truncated response can satisfy the header-size check yet lack the full payload the driver expects. The subsequent memcpy() then copies bytes starting at the adjusted offset, reading up to four bytes beyond the response buffer boundary.
Root Cause
The root cause is an off-by-four boundary condition in which the bounds check and the data pointer use different base offsets. The driver updates the read pointer when the sessions tag is present but does not update the corresponding length comparison. This mismatch classifies the issue as an out-of-bounds read driven by improper input validation of TPM response framing.
Attack Vector
Exploitation requires a TPM response that is accepted by the kernel but shorter than the driver expects. In typical deployments the TPM is trusted hardware or firmware, which limits remote exploitability. Scenarios that increase exposure include compromised or malicious firmware TPM implementations, virtualized TPM backends controlled by a hostile hypervisor or host, and physical interposers on the TPM bus. The consequence is disclosure of up to four bytes of adjacent kernel memory into buffers that callers treat as cryptographically random, which can degrade keys, nonces, and other primitives derived from TPM entropy.
No verified public exploit code is available. See the upstream fix in Kernel Commit 42bb6216 for the corrected bounds check.
Detection Methods for CVE-2026-98728
Indicators of Compromise
- Kernel log entries from the tpm driver reporting truncated or malformed TPM 2.0 responses during TPM2_CC_GetRandom operations.
- Unexpected TPM command failures or short reads correlated with services that consume kernel randomness such as getrandom() seeding paths or TPM-backed key generation.
- Firmware TPM or vTPM backends returning responses whose declared length does not match the data payload.
Detection Strategies
- Inventory running kernels against the patched versions published in the upstream stable commits referenced for CVE-2026-98728.
- Audit systems that rely on TPM-derived entropy, including disk encryption, measured boot attestation agents, and key management daemons, to confirm they are running patched kernels.
- Use configuration management tooling to flag hosts whose uname -r output matches vulnerable stable branches.
Monitoring Recommendations
- Forward dmesg and journald logs tagged with the tpm subsystem into a centralized log platform for anomaly review.
- Monitor virtualization hosts that expose vTPM devices for unusual TPM command patterns or malformed response events.
- Track package and kernel update compliance across TPM-enabled fleets to ensure the fix lands on every affected system.
How to Mitigate CVE-2026-98728
Immediate Actions Required
- Apply the stable kernel updates that include the upstream fix for tpm2_get_random() bounds checking.
- Prioritize patching on hosts that use TPM-backed random number generation for cryptographic operations, including LUKS, systemd-cryptenroll, and attestation agents.
- For virtualized environments, update hypervisor and vTPM implementations and ensure guest kernels receive the patched build.
Patch Information
The vulnerability is resolved upstream by replacing the comparison against TPM_HEADER_SIZE with a comparison against offset, which already includes the skipped parameter size field. Backports are available in the following commits:
Workarounds
- Where patching is delayed, prefer kernel entropy sources that do not route through tpm2_get_random() for sensitive key material.
- Restrict access to vTPM backends and TPM device nodes to trusted components only, reducing the surface for crafted responses.
- Validate that firmware TPM implementations are from trusted vendors and running current firmware versions.
# Verify the running kernel version to confirm patch status
uname -r
# Check for TPM device presence and driver status
ls -l /dev/tpm* /dev/tpmrm*
dmesg | grep -i tpm
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

