CVE-2025-49133 Libtpms contains a possible out-of-bound access and abort due to HMAC signing issue
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- UbuntuDebian
Description
Libtpms is a library that targets the integration of TPM functionality into hypervisors, primarily into Qemu. Libtpms, which is derived from the TPM 2.0 reference implementation code published by the Trusted Computing Group, is prone to a potential out of bounds (OOB) read vulnerability. The vulnerability occurs in the ‘CryptHmacSign’ function with an inconsistent pairing of the signKey and signScheme parameters, where the signKey is ALG_KEYEDHASH key and inScheme is an ECC or RSA scheme. The reported vulnerability is in the ‘CryptHmacSign’ function, which is defined in the "Part 4: Supporting Routines – Code" document, section "7.151 - /tpm/src/crypt/CryptUtil.c ". This vulnerability can be triggered from user-mode applications by sending malicious commands to a TPM 2.0/vTPM (swtpm) whose firmware is based on an affected TCG reference implementation. The effect on libtpms is that it will cause an abort due to the detection of the out-of-bounds access, thus for example making a vTPM (swtpm) unavailable to a VM. This vulnerability is fixed in 0.7.12, 0.8.10, 0.9.7, and 0.10.1.
Upgrade path
13 packages: 11 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| alpine/libtpms(Alpine v3.19) | < 0.9.7-r0 | 0.9.7-r0 | Fixed |
| alpine/libtpms(Alpine v3.20) | < 0.9.7-r0 | 0.9.7-r0 | Fixed |
| alpine/libtpms(Alpine v3.22) | < 0.10.1-r0 | 0.10.1-r0 | Fixed |
| alpine/libtpms(Alpine v3.23) | < 0.10.1-r0 | 0.10.1-r0 | Fixed |
| alpine/libtpms(Alpine v3.24) | < 0.10.1-r0 | 0.10.1-r0 | Fixed |
| azure linux libtpms(Azure Linux 3.0) | < 0.9.6-8 | 0.9.6-8 | Fixed |
| debian/libtpms(Debian 12) | < 0.9.2-3.1+deb12u1; = 0.9.2-3.1 | 0.9.2-3.1+deb12u1 | Fixed |
| debian/libtpms(Debian 13) | < 0.9.2-3.2 | 0.9.2-3.2 | Fixed |
| debian/libtpms(Debian 14) | < 0.9.2-3.2 | 0.9.2-3.2 | Fixed |
| ubuntu/libtpms(Ubuntu 22.04) | < 0.9.3-0ubuntu1.22.04.2 | 0.9.3-0ubuntu1.22.04.2 | Fixed |
| ubuntu/libtpms(Ubuntu 24.04) | < 0.9.3-0ubuntu4.24.04.1 | 0.9.3-0ubuntu4.24.04.1 | Fixed |
| libtpms project libtpms | = 0.7.11; = 0.8.9; = 0.9.6; = 0.10.0 | No fix listed | Versions listed |
| stefanberger libtpms | = = 0.7.11; = = 0.8.9; = = 0.9.6; = = 0.10.0 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| azure linux libtpms(Azure Linux:3.0) | < 0.9.6-8 | 0.9.6-8 |
| debian/libtpms(Debian:12) | < 0.9.2-3.1+deb12u1 | 0.9.2-3.1+deb12u1 |
| debian/libtpms(Debian:12) | = 0.9.2-3.1 | No fix listed |
| debian/libtpms(Debian:13) | < 0.9.2-3.2 | 0.9.2-3.2 |
| debian/libtpms(Debian:14) | < 0.9.2-3.2 | 0.9.2-3.2 |
| stefanberger libtpms | = = 0.7.11 | No fix listed |
| stefanberger libtpms | = = 0.8.9 | No fix listed |
| stefanberger libtpms | = = 0.9.6 | No fix listed |
| stefanberger libtpms | = = 0.10.0 | No fix listed |
| ubuntu/libtpms(Ubuntu:22.04) | < 0.9.3-0ubuntu1.22.04.2 | 0.9.3-0ubuntu1.22.04.2 |
| alpine/libtpms(Alpine:v3.19) | < 0.9.7-r0 | 0.9.7-r0 |
| alpine/libtpms(Alpine:v3.20) | < 0.9.7-r0 | 0.9.7-r0 |
| alpine/libtpms(Alpine:v3.22) | < 0.10.1-r0 | 0.10.1-r0 |
| alpine/libtpms(Alpine:v3.23) | < 0.10.1-r0 | 0.10.1-r0 |
| alpine/libtpms(Alpine:v3.24) | < 0.10.1-r0 | 0.10.1-r0 |
| ubuntu/libtpms(Ubuntu:24.04) | < 0.9.3-0ubuntu4.24.04.1 | 0.9.3-0ubuntu4.24.04.1 |
| libtpms project libtpms | = 0.7.11 | No fix listed |
| libtpms project libtpms | = 0.8.9 | No fix listed |
| libtpms project libtpms | = 0.9.6 | No fix listed |
| libtpms project libtpms | = 0.10.0 | No fix listed |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- Debian Security Tracker CVE-2025-49133 vendor-advisory
- https://github.com/stefanberger/libtpms/security/advisories/GHSA-25w5-6fjj-hf8g third-party-advisory
- https://github.com/stefanberger/libtpms/commit/04b2d8e9afc0a9b6bffe562a23e58c0de11532d1 patch
- https://trustedcomputinggroup.org/resource/tpm-library-specification product
- https://trustedcomputinggroup.org/wp-content/uploads/TPM-2.0-1.83-Part-4-Supporting-Routines-Code.pdf product
- www.kb.cert.org
- Ubuntu CVE tracker vendor-advisory
- USN-7617-1 vendor-advisory
- www.cve.org
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking