CVE-2023-22745Buffer Overlow in TSS2_RC_Decode in tpm2-tss
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.
What to do
Fixed builds are available from AlmaLinux, Debian, Red Hat, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | tpm2-tss | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | tpm2-tss | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | tpm2-tss | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | tpm2-tss | Fixed | 3.2.0-1ubuntu1.1 | UBUNTU-CVE-2023-22745 |
| Ubuntu 20.04 | tpm2-tss | Fixed | 2.3.2-1ubuntu0.20.04.2 | UBUNTU-CVE-2023-22745 |
| Ubuntu 18.04 | tpm2-tss | Fix pending | ||
| Ubuntu 16.04 | tpm2-tss | Fix pending | ||
| Debian 14 | tpm2-tss | Fixed | 3.2.1-3 | DEBIAN-CVE-2023-22745 |
| Debian 13 | tpm2-tss | Fixed | 3.2.1-3 | DEBIAN-CVE-2023-22745 |
| Debian 12 | tpm2-tss | Fixed | 3.2.1-3 | DEBIAN-CVE-2023-22745 |
| Red Hat Enterprise Linux 9 | tpm2-tss | Fixed | 0:3.2.2-2.el9 | RHSA-2023:6685 |
| Red Hat Enterprise Linux 9 | tpm2-tss-devel | Fixed | 0:3.2.2-2.el9 | RHSA-2023:6685 |
| Red Hat Enterprise Linux 8 | tpm2-tss | Fixed | 0:2.3.2-5.el8 | RHSA-2023:7166 |
| Red Hat Enterprise Linux 8 | tpm2-tss-devel | Fixed | 0:2.3.2-5.el8 | RHSA-2023:7166 |
| Red Hat Enterprise Linux 7 | tpm2-tss | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | tpm2-tss-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | tpm2-tss-utils | Will not fix Out of support scope | ||
| AlmaLinux 9 | tpm2-tss | Fixed | 3.2.2-2.el9 | ALSA-2023:6685 |
| AlmaLinux 9 | tpm2-tss-devel | Fixed | 3.2.2-2.el9 | ALSA-2023:6685 |
| AlmaLinux 8 | tpm2-tss | Fixed | 2.3.2-5.el8 | ALSA-2023:7166 |
| AlmaLinux 8 | tpm2-tss-devel | Fixed | 2.3.2-5.el8 | ALSA-2023:7166 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- tpm2-software tpm2-tss: affected: < 4.0.1, < 3.2.2-rc0
References
- https://github.com/tpm2-software/tpm2-tss/security/advisories/GHSA-4j3v-fh23-vx67
- https://github.com/tpm2-software/tpm2-tss/commit/306490c8d848c367faa2d9df81f5e69dab46ffb5
- https://github.com/tpm2-software/tpm2-tss/commit/49107d65d5c7be430671398416bbd89dae4e34e7
- https://github.com/tpm2-software/tpm2-tss/commit/7ab42953216adec046d000a5e3085f3ee5e9cabf
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.