CVE-2024-29039 Overview
CVE-2024-29039 affects tpm2-tools, the source repository for Trusted Platform Module (TPM) 2.0 command-line utilities. The vulnerability allows attackers to manipulate the output of the tpm2_checkquote command by altering the TPML_PCR_SELECTION structure inside the Platform Configuration Register (PCR) input file. Digest values are then incorrectly mapped to PCR slots and banks, producing a misleading view of the TPM state. The flaw is categorized as Reliance on Untrusted Inputs in a Security Decision [CWE-807]. Maintainers patched the issue in tpm2-tools version 5.7.
Critical Impact
An attacker can forge a misleading attestation result that appears valid to verifiers, undermining the integrity guarantees of TPM-based remote attestation.
Affected Products
- tpm2-tools versions prior to 5.7
- Fedora distributions shipping vulnerable tpm2-tools packages
- Any platform using tpm2_checkquote for TPM attestation verification
Discovery Timeline
- 2024-06-28 - CVE-2024-29039 published to NVD
- 2025-11-04 - Last updated in NVD database
Technical Details for CVE-2024-29039
Vulnerability Analysis
The tpm2-tools suite provides utilities for interacting with TPM 2.0 devices, including attestation workflows. The tpm2_checkquote command validates a quote produced by a TPM, confirming that PCR digest values match expected platform state. This verification step is the trust anchor for remote attestation. The vulnerability arises because tpm2_checkquote accepts an externally supplied PCR input file and trusts the TPML_PCR_SELECTION structure inside it without binding the selection to the original quoted data. An attacker who controls that input file can rearrange how individual digest values are interpreted, causing the verifier to associate digests with PCR slots and hash banks that were never quoted.
Root Cause
The root cause is improper validation of untrusted input used in a security decision [CWE-807]. The PCR selection metadata that drives digest-to-slot mapping is read from a user-controlled file rather than being authoritatively derived from the signed quote payload. Because the integrity-protected quote and the parsing logic disagree on which digest belongs to which PCR, an attacker can repurpose otherwise valid digests to misrepresent platform state.
Attack Vector
Exploitation requires the attacker to supply or tamper with the PCR input file consumed by tpm2_checkquote. In remote attestation pipelines, this file is often transmitted alongside the quote and signature. A man-in-the-middle or a compromised attester can rewrite the TPML_PCR_SELECTION to remap digests, producing a check that passes while the underlying platform is in an unattested or compromised state. No authentication, user interaction, or elevated privileges are required on the verifier, though successful exploitation depends on attestation workflow specifics.
No verified public exploit code is available. Refer to the GitHub Security Advisory GHSA-8rjm-5f5f-h4q6 for technical specifics.
Detection Methods for CVE-2024-29039
Indicators of Compromise
- Attestation logs showing tpm2_checkquote successes that conflict with independently collected platform measurements.
- PCR input files whose TPML_PCR_SELECTION fields do not match the selection encoded in the corresponding signed quote.
- Discrepancies between digests reported by verifiers and digests retrieved directly via tpm2_pcrread from the target system.
Detection Strategies
- Inventory hosts running tpm2-tools versions below 5.7 using software bill of materials or package manager queries (rpm -q tpm2-tools, dpkg -l tpm2-tools).
- Re-verify historical attestation evidence by cross-checking the TPML_PCR_SELECTION against the selection embedded in the signed quote structure.
- Compare verifier output against an out-of-band source of platform measurements to surface remapped digests.
Monitoring Recommendations
- Centralize attestation verification logs and alert on tpm2_checkquote invocations originating from unpatched binaries.
- Track integrity of PCR input files in transit using transport authentication and message-level signatures.
- Monitor package update events on Fedora and other distributions to confirm rollout of tpm2-tools 5.7 or later.
How to Mitigate CVE-2024-29039
Immediate Actions Required
- Upgrade tpm2-tools to version 5.7 or later on all systems performing TPM quote verification.
- Apply distribution patches for Fedora and downstream rebuilds referenced in the Fedora package announcement.
- Re-run verification against any attestation evidence accepted with vulnerable versions and treat unexplained discrepancies as suspect.
Patch Information
The fix is included in tpm2-tools release 5.7. Details and remediation guidance are documented in GitHub Security Advisory GHSA-8rjm-5f5f-h4q6. Fedora users should apply updates referenced in the Fedora package announcement.
Workarounds
- Restrict the PCR input file to trusted, integrity-protected channels and reject any file whose selection diverges from the signed quote.
- Implement an independent verifier that parses the TPMS_ATTEST structure directly from the quote rather than relying on the supplied PCR file for selection metadata.
- Pin attestation policies to specific PCR banks and slots and reject quotes whose declared selection does not match the policy.
# Upgrade tpm2-tools on Fedora
sudo dnf upgrade --refresh tpm2-tools
# Verify installed version is 5.7 or later
tpm2_checkquote --version
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

