Buffer Overlow in TSS2_RC_Decode in tpm2-tss
Key facts
- Attack vector
- Local
- Privileges required
- High
- User interaction
- None
- Attack complexity
- High
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 7 fixed, 1 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-120 and the CVSS impact.
Summary
tpm2-tss is an open source software implementation of the Trusted Computing Group (TCG) Trusted Platform Module (TPM) 2 Software Stack (TSS2). In versions prior to 4.1.0-rc0, 4.0.1, and 3.2.2-rc1, `Tss2_RC_SetHandler` and `Tss2_RC_Decode` both index into `layer_handler` with an 8 bit layer number, but the array only has `TPM2_ERROR_TSS2_RC_LAYER_COUNT` entries, so trying to add a handler for higher-numbered layers or decode a response code with such a layer number reads/writes past the end of the buffer. This Buffer overrun, could result in arbitrary code execution. An example attack would be a MiTM bus attack that returns 0xFFFFFFFF for the RC. Given the common use case of TPM modules an attacker must have local access to the target machine with local system privileges which allows access to the TPM system. Usually TPM access requires administrative privilege. Versions 4.1.0-rc0, 4.0.1, and 3.2.2-rc1 fix the issue.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| tpm2-software | tpm2-tss | before 4.0.1; before 3.2.2-rc0 | 4.0.1, 3.2.2-rc0 | Patch available | CNA |
- tpm2-tss Vendortpm2-software Affected before 4.0.1; before 3.2.2-rc0 Fixed in 4.0.1, 3.2.2-rc0 Patch available CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:tpm2_software_stack_project:tpm2_software_stack:*:*:*:*:*:*:*:* | before 3.2.2; 4.0.0 to before 4.1.0 | Vulnerable | Tpm2 Software Stack Project |
- cpe:2.3:a:tpm2_software_stack_project:tpm2_software_stack:*:*:*:*:*:*:*:* Versions before 3.2.2; 4.0.0 to before 4.1.0 Vulnerable ·Tpm2 Software Stack Project
Remediation
- Fix · CNA tpm2-tss (tpm2-software) Fixed in 4.0.1, 3.2.2-rc0
Red Hat 4 advisories
- RHSA-2024:4739 Released 2024-07-23 · Red Hat rating Moderatetpm2-tss security update
- Red Hat Enterprise Linux BaseOS EUS (v.8.8) tpm2-tss-2.3.2-5.el8_8, tpm2-tss-devel-2.3.2-5.el8_8
- RHSA-2024:4408 Released 2024-07-09 · Red Hat rating Moderatetpm2-tss security update
- Red Hat Enterprise Linux BaseOS AUS (v.8.6) tpm2-tss-2.3.2-5.el8_6, tpm2-tss-devel-2.3.2-5.el8_6
- Red Hat Enterprise Linux BaseOS E4S (v.8.6) tpm2-tss-2.3.2-5.el8_6, tpm2-tss-devel-2.3.2-5.el8_6
- Red Hat Enterprise Linux BaseOS TUS (v.8.6) tpm2-tss-2.3.2-5.el8_6, tpm2-tss-devel-2.3.2-5.el8_6
- RHSA-2023:7166 Released 2023-11-14 · Red Hat rating Lowtpm2-tss security and enhancement update
- Red Hat Enterprise Linux BaseOS (v. 8) tpm2-tss-2.3.2-5.el8, tpm2-tss-devel-2.3.2-5.el8
Show 1 more Red Hat advisories
- RHSA-2023:6685 Released 2023-11-07 · Red Hat rating Lowtpm2-tss security and enhancement update
- Red Hat CodeReady Linux Builder (v. 9) tpm2-tss-devel-3.2.2-2.el9
- Red Hat Enterprise Linux BaseOS (v. 9) tpm2-tss-3.2.2-2.el9
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat CodeReady Linux Builder (v. 9) | Fixed | RHSA-2023:6685 |
| Red Hat Enterprise Linux BaseOS (v. 8) | Fixed | RHSA-2023:7166 |
| Red Hat Enterprise Linux BaseOS (v. 9) | Fixed | RHSA-2023:6685 |
| Red Hat Enterprise Linux BaseOS AUS (v.8.6) | Fixed | RHSA-2024:4408 |
| Red Hat Enterprise Linux BaseOS E4S (v.8.6) | Fixed | RHSA-2024:4408 |
| Red Hat Enterprise Linux BaseOS EUS (v.8.8) | Fixed | RHSA-2024:4739 |
| Red Hat Enterprise Linux BaseOS TUS (v.8.6) | Fixed | RHSA-2024:4408 |
Timeline
- 2026-10-02 Threatist record created from CVE-2023-22745
References
More tpm2-software vulnerabilities
- TI-2024-19222 Fapi Verify Quote: Does not detect if quote was not generated by TPM CVSS 3.1MEDIUM 4.3
Sources
- CVE-2023-22745 · CVE Program
- CVE-2023-22745 · NVD
- FIRST EPSS
- CVE-2023-22745 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences