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.
Metrics
Affected Vendors & Products
References
| Link | Providers |
|---|---|
| https://github.com/wolfSSL/wolfTPM/pull/427 |
|
History
Tue, 05 Aug 2025 14:15:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
Tue, 05 Aug 2025 11:45:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Wolfssl
Wolfssl wolftpm |
|
| Vendors & Products |
Wolfssl
Wolfssl wolftpm |
Mon, 04 Aug 2025 21:45:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | wolfTPM library wrapper function `wolfTPM2_RsaKey_TpmToWolf` copies external data to a fixed-size stack buffer without length validation potentially causing stack-based buffer overflow | |
| Weaknesses | CWE-121 | |
| References |
| |
| Metrics |
cvssV4_0
|
Status: PUBLISHED
Assigner: wolfSSL
Published: 2025-08-04T21:35:04.013Z
Updated: 2025-08-05T13:36:36.065Z
Reserved: 2025-07-18T20:01:35.602Z
Link: CVE-2025-7844
Updated: 2025-08-05T13:36:31.884Z
Status : Awaiting Analysis
Published: 2025-08-04T22:15:28.940
Modified: 2025-08-05T14:34:17.327
Link: CVE-2025-7844
No data.
ReportizFlow