CryptoLib Memory Leak Vulnerability in Counter Handling Function

Vulnerability

A memory leak vulnerability has been identified in CryptoLib versions through 1.3.3. The issue arises in the 'crypto_handle_incrementing_nontransmitted_counter' function within 'crypto_tc.c', where memory is allocated using 'malloc' without proper deallocation. This flaw can lead to resource exhaustion and degraded system performance, particularly in long-running processes or environments handling large volumes of data. As a result, the vulnerability could potentially cause a Denial of Service (DoS) in such scenarios.

Impact

The vulnerability causes a memory leak, leading to resource exhaustion and reduced system performance. In environments where CryptoLib is used in long-running processes or with high data volumes, this could result in a Denial of Service (DoS).

Reproduction

To reproduce this vulnerability, compile CryptoLib with AddressSanitizer enabled. Then, pass a crafted input to the 'Crypto_TC_ProcessSecurity' function, which will trigger the 'crypto_handle_incrementing_nontransmitted_counter' function. Afterward, check the AddressSanitizer logs, which will indicate a memory leak of 2 bytes from the unfreed 'temp_counter' variable.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
6.0
remediation
0.0
relevance
0.0
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.