Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add advisory for hyperium/http/issues/352 #217

Merged
merged 1 commit into from
Jan 9, 2020
Merged

Conversation

Qwaz
Copy link
Contributor

@Qwaz Qwaz commented Jan 9, 2020

HeaderMap::reserve() used usize::next_power_of_two() to calculate the increased capacity. However, next_power_of_two() silently overflows to 0 if given a sufficently 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.2.0 release of http crate.

@tarcieri tarcieri merged commit 8c9c29b into rustsec:master Jan 9, 2020
tarcieri added a commit that referenced this pull request Jan 9, 2020
@kpcyrd
Copy link
Contributor

kpcyrd commented Jan 9, 2020

Any plans to backport this to http 0.1?

@Qwaz
Copy link
Contributor Author

Qwaz commented Jan 9, 2020

@kpcyrd The fix is available on v0.1.20, and the affected version range has been updated in this PR.

@tarcieri tarcieri added advisory security advisory PRs memory corruption attacker can modify memory labels Jan 16, 2020
@Qwaz Qwaz deleted the http1 branch June 27, 2020 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advisory security advisory PRs memory corruption attacker can modify memory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants