Skip to content

CVE-2023-22745 Buffer Overlow in TSS2_RC_Decode in tpm2-tss

MediumCVSS 6.4 EPSS 0.54%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: total
Technology
UbuntuDebian

Description

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.

Upgrade path

7 packages: 6 fixed.

PackageAffectedFixed inStatus
debian/tpm2-tss(Debian 12) < 3.2.1-3 3.2.1-3 Fixed
debian/tpm2-tss(Debian 13) < 3.2.1-3 3.2.1-3 Fixed
debian/tpm2-tss(Debian 14) < 3.2.1-3 3.2.1-3 Fixed
tpm2 software stack project tpm2 software stack < 3.2.2; >= 4.0.0, < 4.1.0 3.2.2, 4.1.0 Fixed
ubuntu/tpm2-tss(Ubuntu 20.04) < 2.3.2-1ubuntu0.20.04.2; = 2.1.0-4; = 2.3.1-3; = 2.3.2-1 +1 more 2.3.2-1ubuntu0.20.04.2 Fixed
ubuntu/tpm2-tss(Ubuntu 22.04) < 3.2.0-1ubuntu1.1; = 3.0.3-2ubuntu1; = 3.0.3-2ubuntu2; = 3.1.0-3ubuntu1 +2 more 3.2.0-1ubuntu1.1 Fixed
tpm2-software tpm2-tss = < 3.2.2-rc0; = < 4.0.1 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
debian/tpm2-tss(Debian:12) < 3.2.1-3 3.2.1-3
debian/tpm2-tss(Debian:13) < 3.2.1-3 3.2.1-3
debian/tpm2-tss(Debian:14) < 3.2.1-3 3.2.1-3
tpm2-software tpm2-tss = < 4.0.1 No fix listed
tpm2-software tpm2-tss = < 3.2.2-rc0 No fix listed
ubuntu/tpm2-tss(Ubuntu:22.04) < 3.2.0-1ubuntu1.1 3.2.0-1ubuntu1.1
tpm2 software stack project tpm2 software stack < 3.2.2 3.2.2
tpm2 software stack project tpm2 software stack >= 4.0.0, < 4.1.0 4.1.0
ubuntu/tpm2-tss(Ubuntu:20.04) < 2.3.2-1ubuntu0.20.04.2 2.3.2-1ubuntu0.20.04.2
ubuntu/tpm2-tss(Ubuntu:20.04) = 2.1.0-4 No fix listed
ubuntu/tpm2-tss(Ubuntu:20.04) = 2.3.1-3 No fix listed
ubuntu/tpm2-tss(Ubuntu:20.04) = 2.3.2-1 No fix listed
ubuntu/tpm2-tss(Ubuntu:20.04) = 2.3.2-1ubuntu0.20.04.1 No fix listed
ubuntu/tpm2-tss(Ubuntu:22.04) = 3.0.3-2ubuntu1 No fix listed
ubuntu/tpm2-tss(Ubuntu:22.04) = 3.0.3-2ubuntu2 No fix listed
ubuntu/tpm2-tss(Ubuntu:22.04) = 3.1.0-3ubuntu1 No fix listed
ubuntu/tpm2-tss(Ubuntu:22.04) = 3.2.0-0ubuntu2 No fix listed
ubuntu/tpm2-tss(Ubuntu:22.04) = 3.2.0-1ubuntu1 No fix listed

References