GHSA-xvc9-xwgj-4cq9

Suggest an improvement
Source
https://github.com/advisories/GHSA-xvc9-xwgj-4cq9
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-xvc9-xwgj-4cq9/GHSA-xvc9-xwgj-4cq9.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-xvc9-xwgj-4cq9
Aliases
Withdrawn
2024-02-21T19:50:55Z
Published
2022-06-16T23:08:02Z
Modified
2024-02-21T19:50:55Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
Duplicate Advisory: Integer Overflow in HeaderMap::reserve() can cause Denial of Service
Details

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-x7vr-c387-8w57. This link is maintained to preserve external references.

Original Description

HeaderMap::reserve() used usize::nextpoweroftwo() to calculate the increased capacity. However, nextpoweroftwo() silently overflows to 0 if given a sufficiently large number in release mode.

If the map was not empty when the overflow happens, the library will invoke self.grow(0) and start infinite probing. This allows an attacker who controls the argument to reserve() to cause a potential denial of service (DoS).

The flaw was corrected in 0.1.20 release of http crate.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-190"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2022-06-16T23:08:02Z"
}
References

Affected packages

crates.io / http

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.1.20

Ecosystem specific

{
    "affected_functions": [
        "http::header::HeaderMap::reserve"
    ]
}