CVE-2025-7844
BaseFortify
Publication date: 2025-08-04
Last updated on: 2025-08-05
Assigner: wolfSSL Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| wolfssl | wolftpm | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-121 | A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability occurs when exporting a TPM-based RSA key larger than 2048 bits from the TPM using wolfTPM2_RsaKey_TpmToWolf function. If the default MAX_RSA_KEY_BITS=2048 is used and the TPM hardware supports larger keys, a stack buffer overrun can happen because the buffer size is insufficient for keys larger than 2048 bits. This can lead to memory corruption. The issue can be avoided by setting the MAX_RSA_KEY_BITS macro correctly to match the hardware capabilities.
How can this vulnerability impact me? :
The vulnerability can cause a stack buffer overrun when handling RSA keys larger than 2048 bits, potentially leading to memory corruption or unexpected behavior in applications using the affected TPM module. This could affect the stability or security of the system relying on these cryptographic operations.
What immediate steps should I take to mitigate this vulnerability?
Ensure that the build-time macro MAX_RSA_KEY_BITS is set correctly to match the RSA key size supported by your TPM hardware (2048 bits or less if the hardware does not support larger keys). Avoid exporting TPM based RSA keys larger than 2048 bits unless your TPM and application fully support it with the correct configuration. This prevents the stack buffer overrun vulnerability.