CVE-2023-22745: Buffer Overlow in TSS2_RC_Decode in tpm2-tss
Last updated 24 July 2024
Other sources
tpm2-tss is an open source software implementation of the Trusted Computing Group (TCG) Trusted Platform Module (TPM) 2 Software Stack (TSS2). In affected versions Tss2RCSetHandler and Tss2RCDecode both index into layerhandler with an 8 bit layer number, but the array only has TPM2ERRORTSS2RCLAYERCOUNT 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.
— Launchpad
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, Tss2RCSetHandler and Tss2RCDecode both index into layerhandler with an 8 bit layer number, but the array only has TPM2ERRORTSS2RCLAYERCOUNT 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.
— MITRE
tpm2-tss is vulnerable to a buffer overflow, caused by improper bounds checking by the Tss2RCSetHandler and Tss2RCDecode function. By sending a specially-crafted request, a local authenticated attacker could overflow a buffer and execute arbitrary code on the system.
— IBM
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2023-22745?
CVE-2023-22745 has been classified with a moderate severity level due to potential memory corruption issues.
How do I fix CVE-2023-22745?
To fix CVE-2023-22745, upgrade to tpm2-tss versions 3.2.1-3, 4.0.1-7.2, or 4.1.3-1.
What vulnerabilities does CVE-2023-22745 affect?
CVE-2023-22745 affects the tpm2-tss versions up to and including 4.0.0 for the Trusted Platform Module 2 Software Stack.
What are the symptoms of CVE-2023-22745 exploitation?
Exploitation of CVE-2023-22745 may lead to application crashes or unexpected behavior due to memory corruption.
Is CVE-2023-22745 a remote attack vulnerability?
CVE-2023-22745 does not specifically indicate remote exploitation capabilities, focusing instead on local memory handling issues.