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

Integer overflow in receiving code #118

Closed
bsergean opened this issue Oct 23, 2019 · 0 comments
Closed

Integer overflow in receiving code #118

bsergean opened this issue Oct 23, 2019 · 0 comments

Comments

@bsergean
Copy link
Collaborator

(quoting the email exchange with a reporter)

There is an integer overflow on the receiving frame size

if (_rxbuf.size() < ws.header_size + ws.N)
that can be used to sneak past the guard clause _rxbuf.size() < ws.header_size + ws.N check.

Should be a simple fix - either by adding a reasonable limit to the ws.N value or checking for overflow before doing the addition. According to the websocket spec "the most significant bit MUST be 0" so that is a safe and simple check to do.

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

No branches or pull requests

1 participant