GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: fix invalid windowBits=8 gzip segfault by bnoordhuis · Pull Request #33045 · nodejs/node

Conversation

@bnoordhuis

@bnoordhuis bnoordhuis commented Apr 24, 2020

Copy link
Copy Markdown
Member

{ windowBits: 8 } is legal for deflate streams but not gzip streams.
Fix a nullptr dereference when formatting the error message.

Bug introduced in commit c34eae5 ("zlib: refactor zlib internals")
from September 2018.


zlib: reject windowBits=8 when mode=GZIP

It's also handled in C++ land now, per the previous commit, but
intercepting it in JS land makes for prettier error messages.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
bnoordhuis added 2 commits April 24, 2020 21:12
@bnoordhuis
src: fix invalid windowBits=8 gzip segfault
9436534
`{ windowBits: 8 }` is legal for deflate streams but not gzip streams.
Fix a nullptr dereference when formatting the error message.

Bug introduced in commit c34eae5 ("zlib: refactor zlib internals")
from September 2018.
@bnoordhuis
zlib: reject windowBits=8 when mode=GZIP
1cec86e
It's also handled in C++ land now, per the previous commit, but
intercepting it in JS land makes for prettier error messages.
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. zlib Issues and PRs related to the zlib module and its compression dependencies. labels Apr 24, 2020
addaleax
addaleax approved these changes Apr 24, 2020
View reviewed changes
Comment thread lib/zlib.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/node_zlib.cc Resolved

Uh oh!

There was an error while loading. Please reload this page.

Flarna
Flarna approved these changes Apr 24, 2020
View reviewed changes
devnexen
devnexen approved these changes Apr 24, 2020
View reviewed changes
addaleax added 2 commits May 8, 2020 01:39
@addaleax
fixup! zlib: reject windowBits=8 when mode=GZIP
4de03b1
@addaleax
fixup! src: fix invalid windowBits=8 gzip segfault
40da66d
@addaleax addaleax added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label May 7, 2020
@nodejs-github-bot

nodejs-github-bot commented May 7, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/31226/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gengjiawen
gengjiawen reviewed May 8, 2020
View reviewed changes
Comment thread lib/zlib.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@addaleax @gengjiawen
fixup! zlib: reject windowBits=8 when mode=GZIP
61b08c3
Co-authored-by: Jiawen Geng <[email protected]>
@nodejs-github-bot

nodejs-github-bot commented May 8, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/31229/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

addaleax pushed a commit that referenced this pull request May 9, 2020
@bnoordhuis @addaleax
src: fix invalid windowBits=8 gzip segfault
b8ed2a0
`{ windowBits: 8 }` is legal for deflate streams but not gzip streams.
Fix a nullptr dereference when formatting the error message.

Bug introduced in commit c34eae5 ("zlib: refactor zlib internals")
from September 2018.

PR-URL: #33045
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: David Carlier <[email protected]>
addaleax pushed a commit that referenced this pull request May 9, 2020
@bnoordhuis @addaleax
zlib: reject windowBits=8 when mode=GZIP
d8a380e
It's also handled in C++ land now, per the previous commit, but
intercepting it in JS land makes for prettier error messages.

PR-URL: #33045
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: David Carlier <[email protected]>
@addaleax

addaleax commented May 9, 2020

Copy link
Copy Markdown
Member

Landed in 3226731...d8a380e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax addaleax closed this May 9, 2020
codebytere pushed a commit that referenced this pull request May 11, 2020
@bnoordhuis @codebytere
src: fix invalid windowBits=8 gzip segfault
ef25033
`{ windowBits: 8 }` is legal for deflate streams but not gzip streams.
Fix a nullptr dereference when formatting the error message.

Bug introduced in commit c34eae5 ("zlib: refactor zlib internals")
from September 2018.

PR-URL: #33045
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: David Carlier <[email protected]>
codebytere pushed a commit that referenced this pull request May 11, 2020
@bnoordhuis @codebytere
zlib: reject windowBits=8 when mode=GZIP
736ca65
It's also handled in C++ land now, per the previous commit, but
intercepting it in JS land makes for prettier error messages.

PR-URL: #33045
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: David Carlier <[email protected]>
@codebytere codebytere mentioned this pull request May 18, 2020
v14.3.0 proposal #33452
Merged
codebytere pushed a commit that referenced this pull request Jun 7, 2020
@bnoordhuis @codebytere
src: fix invalid windowBits=8 gzip segfault
642f813
`{ windowBits: 8 }` is legal for deflate streams but not gzip streams.
Fix a nullptr dereference when formatting the error message.

Bug introduced in commit c34eae5 ("zlib: refactor zlib internals")
from September 2018.

PR-URL: #33045
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: David Carlier <[email protected]>
codebytere pushed a commit that referenced this pull request Jun 7, 2020
@bnoordhuis @codebytere
zlib: reject windowBits=8 when mode=GZIP
631e433
It's also handled in C++ land now, per the previous commit, but
intercepting it in JS land makes for prettier error messages.

PR-URL: #33045
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: David Carlier <[email protected]>
@codebytere codebytere mentioned this pull request Jun 9, 2020
v12.18.1 proposal #33811
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gengjiawen gengjiawen gengjiawen left review comments
@addaleax addaleax addaleax approved these changes
@Flarna Flarna Flarna approved these changes
+1 more reviewer
@devnexen devnexen devnexen approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. zlib Issues and PRs related to the zlib module and its compression dependencies.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@bnoordhuis @nodejs-github-bot @addaleax @gengjiawen @devnexen @Flarna
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.