{"id":"RUSTSEC-2019-0033","summary":"Integer Overflow in HeaderMap::reserve() can cause Denial of Service","details":"`HeaderMap::reserve()` used `usize::next_power_of_two()` to calculate the increased capacity.\nHowever, `next_power_of_two()` silently overflows to 0 if given a sufficiently large number\nin release mode.\n\nIf the map was not empty when the overflow happens,\nthe library will invoke `self.grow(0)` and start infinite probing.\nThis allows an attacker who controls the argument to `reserve()`\nto cause a potential denial of service (DoS).\n\nThe flaw was corrected in 0.1.20 release of `http` crate.","aliases":["CVE-2019-25008","CVE-2020-25574","GHSA-x7vr-c387-8w57","GHSA-xvc9-xwgj-4cq9"],"modified":"2023-11-08T04:01:32.294723Z","published":"2019-11-16T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/http"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2019-0033.html"},{"type":"REPORT","url":"https://github.com/hyperium/http/issues/352"}],"affected":[{"package":{"name":"http","ecosystem":"crates.io","purl":"pkg:cargo/http"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.1.20"}]}],"ecosystem_specific":{"affects":{"functions":["http::header::HeaderMap::reserve"],"arch":[],"os":[]},"affected_functions":null},"database_specific":{"informational":null,"categories":["denial-of-service"],"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2019-0033.json","cvss":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}