PT-2019-19975 · Rust · Http Crate

Publicado

2019-11-16

·

Atualizado

2022-06-16

·

CVE-2020-25574

CVSS v3.1

7.5

Alta

VetorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions http crate versions prior to 0.1.20
Description An issue in the http crate for Rust could result in denial of service, such as an infinite loop, due to an integer overflow in HeaderMap::reserve(). The HeaderMap::reserve() function uses usize::next power of two() to calculate the increased capacity, but next power of two() silently overflows to 0 if given a sufficiently large number in release mode. If the map is not empty when the overflow happens, the library invokes self.grow(0) and starts infinite probing, allowing an attacker who controls the argument to reserve() to cause a potential denial of service.
Recommendations For http crate versions prior to 0.1.20, update to version 0.1.20 or later to resolve the issue. As a temporary workaround, consider restricting the use of the reserve() function in HeaderMap to minimize the risk of exploitation. Avoid using the reserve() function with large arguments until the issue is resolved.

Exploit

Correção

Infinite Loop

Integer Overflow

Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾

Enumeração de Fraquezas

Identificadores relacionados

CVE-2020-25574
GHSA-X7VR-C387-8W57
GHSA-XVC9-XWGJ-4CQ9
RUSTSEC-2019-0033

Produtos afetados

Http Crate