CVE-2025-7844 Details
Description
Exporting a TPM based RSA key larger than 2048 bits from the TPM could overrun a stack buffer if the default `MAX_RSA_KEY_BITS=2048` is used. If your TPM 2.0 module supports RSA key sizes larger than 2048 bit and your applications supports creating or importing an RSA private or public key larger than 2048 bits and your application calls `wolfTPM2_RsaKey_TpmToWolf` on that key, then a stack buffer could be overrun. If the `MAX_RSA_KEY_BITS` build-time macro is set correctly (RSA bits match what TPM hardware is capable of) for the hardware target, then a stack overrun is not possible.
A buffer overrun vulnerability has been identified in the wolfSSL wolfTPM library when exporting RSA keys larger than 2048 bits from a TPM 2.0 module. This issue arises if the default maximum RSA key size is used and the TPM hardware supports larger key sizes. When an application exports such a key using the 'wolfTPM2_RsaKey_TpmToWolf' function, the buffer overrun can occur. However, if the 'MAX_RSA_KEY_BITS' macro is correctly set to match the TPM hardware capabilities, the stack overrun vulnerability is mitigated.
Users should ensure that the 'MAX_RSA_KEY_BITS' macro is set correctly to match the RSA key size capabilities of their TPM hardware. This adjustment can prevent the buffer overrun vulnerability during RSA key export.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Aug 4, 2025CISA-ADP
Assessed Aug 5, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/wolfSSL/wolfTPM/pull/427 | [email protected] | Issue TrackingVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-121 | Stack-based Buffer Overflow | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| wolfSSL wolfTPM | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Aug 4, 2025 | New CVE Received | [email protected] |
Volerion