You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On 4 April 2017, Node.js versions v4.8.2 and v6.10.2 were
released. These versions bumped the vendored zlib library from
v1.2.8 to v1.2.11 in response to what it describes as low-severity
CVEs. In zlib v1.2.9, a change was made that causes an error to be
raised when a raw deflate stream is initialised with windowBits set
to 8.
In zlib v1.2.9, 8 become an invalid value for this parameter, and Node's zlib
module will crash if you call this:
```
zlib.createDeflateRaw({windowBits: 8})
```
On some versions this crashes Node and you cannot recover from it, while on some
versions it throws an exception. The permessage-deflate library up to
version v0.1.5 does make such a call with no try/catch
This commit reverts to the original behavior of zlib by gracefully changed
windowBits: 8 to windowBits: 9 for raw deflate streams.
Original-PR-URL: nodejs-private/node-private#95
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
PR-URL: #16511
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Copy file name to clipboardExpand all lines: test/parallel/test-zlib-failed-init.js
-17Lines changed: 0 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -5,23 +5,6 @@ const common = require('../common');
5
5
constassert=require('assert');
6
6
constzlib=require('zlib');
7
7
8
-
// For raw deflate encoding, requests for 256-byte windows are rejected as
9
-
// invalid by zlib (http://zlib.net/manual.html#Advanced).
10
-
// This check was introduced in version 1.2.9 and prior to that there was
11
-
// no such rejection which is the reason for the version check below
0 commit comments