CVE-2020-35875 in tokio-rustls Crateinfo

Summary

by MITRE • 12/31/2020

An issue was discovered in the tokio-rustls crate before 0.13.1 for Rust. Excessive memory usage may occur when data arrives quickly.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 12/31/2020

The vulnerability identified in the tokio-rustls crate prior to version 0.13.1 represents a significant memory consumption issue that can lead to system instability and potential denial of service conditions. This flaw specifically manifests when rapid data arrival occurs within the TLS implementation, creating a scenario where memory allocation patterns become inefficient and potentially unbounded. The tokio-rustls crate serves as a critical component in Rust applications requiring secure communication over TLS protocols, making this vulnerability particularly concerning for systems handling high-throughput network traffic.

The technical root cause of this memory usage issue stems from how the crate manages buffer allocations during rapid data ingress scenarios. When data arrives at high speeds, the internal buffering mechanisms fail to properly manage memory consumption, leading to excessive heap allocation that can grow without proper bounds. This behavior creates a memory leak-like condition where allocated memory remains unused but cannot be reclaimed by the garbage collector or memory management system. The vulnerability operates at the intersection of asynchronous I/O handling and TLS protocol implementation, where the tokio runtime's event loop interacts with rustls's cryptographic operations in a manner that exacerbates memory allocation patterns.

From an operational impact perspective, systems utilizing affected versions of tokio-rustls may experience progressive memory degradation over time when processing high-frequency data streams. This can result in applications consuming increasingly more memory until system resources are exhausted, leading to application crashes, performance degradation, or complete system instability. The vulnerability affects any network service relying on TLS encryption through this crate, including web servers, database connections, API gateways, and microservices architectures that handle substantial data throughput. Attackers could potentially exploit this weakness by crafting rapid data streams to trigger memory exhaustion, making it a vector for denial of service attacks against vulnerable systems.

The vulnerability aligns with CWE-401, which addresses improper handling of memory allocation failures in software implementations. Additionally, this issue can be mapped to ATT&CK technique T1499.004, which covers network disruption through resource exhaustion attacks. Organizations should prioritize updating to version 0.13.1 or later of the tokio-rustls crate to address this vulnerability. System administrators should monitor memory usage patterns in applications using this crate and implement proper alerting for unusual memory consumption trends. The mitigation strategy involves not only upgrading the affected dependency but also implementing robust resource monitoring and rate limiting mechanisms to prevent exploitation through rapid data arrival attacks. Regular security audits of Rust application dependencies remain crucial for identifying similar vulnerabilities in other cryptographic libraries and network components.

Disclosure

12/31/2020

Moderation

accepted

CPE

ready

EPSS

0.01336

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!