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

Bump ws from 0.7.1 to 1.1.5 #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Dec 8, 2020

Bumps ws from 0.7.1 to 1.1.5.

Release notes

Sourced from ws's releases.

1.1.5

Bug fixes

  • Fixed a DoS vulnerability (f8fdcd4).

1.1.4

Notable changes

  • Removed istanbul coverage folder from npm package (fac50ac).

1.1.3

Notable changes

  • Added support for bufferutil@>1 and utf-8-validate@>2 (b4cf110).

1.1.2

Bug fixes

  • The masking key is now generated using crypto.randomBytes() instead of Math.random() (#994).
  • Fixed an issue that could cause a stack overflow crash (c1f3b21).

1.1.1

websockets/ws@1.1.0...1.1.1

1.1.0

websockets/ws@1.0.1...1.1.0

Buffer vulnerability

There has been vulnerability in the ping functionality of the ws module which allowed clients to allocate memory by simply sending a ping frame. The ping functionality by default responds with a pong frame and the previously given payload of the ping frame. This is exactly what you expect, but internally we always transform all data that we need to send to a Buffer instance and this is where the problem was. We didn't do any checks for the type of data we were sending. With buffers in node when you allocate it when a number instead of a string it will allocate the amount of bytes.

var x = new Buffer(100);
// vs
var x = new Buffer('100');

This would allocate 100 bytes of memory in the first example and just 3 bytes with 100 as value in the second example. So when the server would receive a ping message of 1000 it would allocate 1000 bytes on the server and returned non-zeroed buffer to the client instead of the actual 100 message.

var ws = require('ws')
var server = new ws.Server({ port: 9000 })
var client = new ws('ws://localhost:9000')
client.on('open', function () {
console.log('open')
client.ping(50) // this makes the server return a non-zeroed buffer of 50 bytes
client.on('pong', function (data) {
console.log('got pong')
</tr></table>

... (truncated)

Commits
  • 24edef5 [dist] 1.1.5
  • f8fdcd4 [security] Fix DoS vulnerability
  • f7cfc51 [pkg] Remove .npmignore in favor of files package.json field
  • 19106a1 [dist] 1.1.4
  • fac50ac [ignore] Add coverage folder to .npmignore
  • 3213205 [dist] 1.1.3
  • b4cf110 [fix] Add compatibility with bufferutil@>1 and utf-8-validate@>2
  • 98f0d21 [dist] 1.1.2
  • b6ac431 [minor] Avoid using process.nextTick()
  • c1f3b21 [fix] Fix stack overflow crash
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by lpinca, a new releaser for ws since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants