CVEfocus › CVE database › CVE-2023-22745

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

CVSS 6.4 MediumEPSS 0.4% (higher than 22% of CVEs)Published 2023-01-19Updated 2025-11-21Assigner: GitHub_M

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.

CWE-120

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

13Fixed
2Fix pending
3Will not fix
3Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04tpm2-tssNot affected
vulnerable_code_not_present
Ubuntu 25.10tpm2-tssNot affected
vulnerable_code_not_present
Ubuntu 24.04tpm2-tssNot affected
vulnerable_code_not_present
Ubuntu 22.04tpm2-tssFixed3.2.0-1ubuntu1.1UBUNTU-CVE-2023-22745
Ubuntu 20.04tpm2-tssFixed2.3.2-1ubuntu0.20.04.2UBUNTU-CVE-2023-22745
Ubuntu 18.04tpm2-tssFix pending
Ubuntu 16.04tpm2-tssFix pending
Debian 14tpm2-tssFixed3.2.1-3DEBIAN-CVE-2023-22745
Debian 13tpm2-tssFixed3.2.1-3DEBIAN-CVE-2023-22745
Debian 12tpm2-tssFixed3.2.1-3DEBIAN-CVE-2023-22745
Red Hat Enterprise Linux 9tpm2-tssFixed0:3.2.2-2.el9RHSA-2023:6685
Red Hat Enterprise Linux 9tpm2-tss-develFixed0:3.2.2-2.el9RHSA-2023:6685
Red Hat Enterprise Linux 8tpm2-tssFixed0:2.3.2-5.el8RHSA-2023:7166
Red Hat Enterprise Linux 8tpm2-tss-develFixed0:2.3.2-5.el8RHSA-2023:7166
Red Hat Enterprise Linux 7tpm2-tssWill not fix
Out of support scope
Red Hat Enterprise Linux 7tpm2-tss-develWill not fix
Out of support scope
Red Hat Enterprise Linux 7tpm2-tss-utilsWill not fix
Out of support scope
AlmaLinux 9tpm2-tssFixed3.2.2-2.el9ALSA-2023:6685
AlmaLinux 9tpm2-tss-develFixed3.2.2-2.el9ALSA-2023:6685
AlmaLinux 8tpm2-tssFixed2.3.2-5.el8ALSA-2023:7166
AlmaLinux 8tpm2-tss-develFixed2.3.2-5.el8ALSA-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.

References

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.