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

websocket Read Limit Fix #1950

Merged
merged 3 commits into from
Oct 18, 2019
Merged

websocket Read Limit Fix #1950

merged 3 commits into from
Oct 18, 2019

Conversation

keepalivesrc
Copy link
Contributor

This fix addresses a potential denial-of-service (DoS) vector that can cause an integer overflow in the presence of malicious WebSocket frames.

The fix adds additional checks against the remaining bytes on a connection, as well as a test to prevent regression.

Credit to Max Justicz (https://justi.cz/) for discovering and reporting this, as well as providing a robust PoC and review.

  • bugfix: fix DoS vector caused by readLimit bypass
  • bugfix: payload length 127 should read bytes as uint64
  • bugfix: defend against readLength overflows

This fix addresses a potential denial-of-service (DoS) vector that can cause an integer overflow in the presence of malicious WebSocket frames.

The fix adds additional checks against the remaining bytes on a connection, as well as a test to prevent regression.

Credit to Max Justicz (https://justi.cz/) for discovering and reporting this, as well as providing a robust PoC and review.

* bugfix: fix DoS vector caused by readLimit bypass
* bugfix: payload length 127 should read bytes as uint64
* bugfix: defend against readLength overflows
@kslr
Copy link
Contributor

kslr commented Oct 18, 2019

@xiaokangwang @boypt

@kslr kslr merged commit 31a647b into v2ray:master Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants