Skip to content

tls: fix segfault on destroy after partial read - #11898

Merged
bnoordhuis merged 1 commit into
nodejs:masterfrom
bnoordhuis:fix11885
Mar 20, 2017
Merged

tls: fix segfault on destroy after partial read#11898
bnoordhuis merged 1 commit into
nodejs:masterfrom
bnoordhuis:fix11885

Conversation

@bnoordhuis

Copy link
Copy Markdown
Member

Refs: #11885

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. tls Issues and PRs related to the tls subsystem. labels Mar 17, 2017

@cjihrigcjihrig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Confirmed that the test segfaults without this patch.

@Fishrock123

Copy link
Copy Markdown
Contributor

@bnoordhuis

Copy link
Copy Markdown
MemberAuthor

Curious, I started https://ci.nodejs.org/job/node-test-pull-request/6898/ but it didn't show up?

OnRead() calls into JS land which can result in the SSL context object
being destroyed on return. Check that `ssl_ != nullptr` afterwards.
Fixes: nodejs#11885
PR-URL: nodejs#11898
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@bnoordhuis
bnoordhuis deleted the fix11885 branch March 20, 2017 15:53
@bnoordhuis
bnoordhuis merged commit 03a6c6e into nodejs:masterMar 20, 2017
@jcstanaway

Copy link
Copy Markdown

Will this get merged into the 6.x release? If so, when would this be expected to happen?

@addaleax

Copy link
Copy Markdown
Member

@ccs018 The general rule is that a patch has to live for 2 weeks in a Current (v7.x) release before it gets backported to the LTS branches.

@jcstanaway

Copy link
Copy Markdown

Thanks. Just trying to determine if we need to build a private patched version or wait for an official release.

@bnoordhuis

Copy link
Copy Markdown
MemberAuthor

Lead time between 'fix merged' and 'available in a LTS release' is on the order of a month, assuming no regressions.

jungx098 pushed a commit to jungx098/node that referenced this pull request Mar 21, 2017
OnRead() calls into JS land which can result in the SSL context object
being destroyed on return. Check that `ssl_ != nullptr` afterwards.
Fixes: nodejs#11885
PR-URL: nodejs#11898
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@italoacasas

Copy link
Copy Markdown

This PR need backport to v7

@bnoordhuis

Copy link
Copy Markdown
MemberAuthor

@italoacasas How are you trying to merge this into v7? It should apply cleanly, there have been no other changes.

@italoacasas

italoacasas commented Mar 21, 2017

Copy link
Copy Markdown

@bnoordhuis yeah don't worry, I'm sick and I was not thinking clearly.

italoacasas pushed a commit to italoacasas/node that referenced this pull request Mar 21, 2017
OnRead() calls into JS land which can result in the SSL context object
being destroyed on return. Check that `ssl_ != nullptr` afterwards.
Fixes: nodejs#11885
PR-URL: nodejs#11898
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@italoacasasitaloacasas mentioned this pull request Mar 21, 2017
cjihrig added a commit that referenced this pull request Mar 21, 2017
Notable changes:
* deps: Add node-inspect 1.10.6 (Jan Krems) #11869
* inspector: proper WS URLs when bound to 0.0.0.0 (Eugene Ostroukhov) #11850
* tls: fix segfault on destroy after partial read. (Ben Noordhuis) #11898
PR-URL: #11941
cjihrig added a commit that referenced this pull request Mar 21, 2017
Notable changes:
* deps: Add node-inspect 1.10.6 (Jan Krems) #11869
* inspector: proper WS URLs when bound to 0.0.0.0 (Eugene Ostroukhov) #11850
* tls: fix segfault on destroy after partial read. (Ben Noordhuis) #11898
PR-URL: #11941
MylesBorins pushed a commit that referenced this pull request Apr 18, 2017
OnRead() calls into JS land which can result in the SSL context object
being destroyed on return. Check that `ssl_ != nullptr` afterwards.
Fixes: #11885
PR-URL: #11898
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 18, 2017
OnRead() calls into JS land which can result in the SSL context object
being destroyed on return. Check that `ssl_ != nullptr` afterwards.
Fixes: #11885
PR-URL: #11898
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 19, 2017
OnRead() calls into JS land which can result in the SSL context object
being destroyed on return. Check that `ssl_ != nullptr` afterwards.
Fixes: #11885
PR-URL: #11898
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 19, 2017
OnRead() calls into JS land which can result in the SSL context object
being destroyed on return. Check that `ssl_ != nullptr` afterwards.
Fixes: #11885
PR-URL: #11898
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This was referenced Apr 19, 2017
imyller added a commit to imyller/meta-nodejs that referenced this pull request Apr 20, 2017
 Notable changes:
* deps: Add node-inspect 1.10.6 (Jan Krems) nodejs/node#11869
* inspector: proper WS URLs when bound to 0.0.0.0 (Eugene Ostroukhov) nodejs/node#11850
* tls: fix segfault on destroy after partial read. (Ben Noordhuis) nodejs/node#11898
PR-URL: nodejs/node#11941
Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
MylesBorins added a commit that referenced this pull request May 2, 2017
Notable Changes:
* module:
- The module loading global fallback to the Node executable's
directory now works correctly on Windows.
(Richard Lau) #9283
* src:
- fix base64 decoding in rare edgecase
(Nikolai Vavilov) #11995
* tls:
- fix rare segmentation faults when using TLS
* (Trevor Norris) #11947
* (Ben Noordhuis) #11898
* (jBarz) #11776
PR-URL: #12499
MylesBorins added a commit that referenced this pull request May 2, 2017
Notable Changes:
* module:
- The module loading global fallback to the Node executable's
directory now works correctly on Windows.
(Richard Lau) #9283
* src:
- fix base64 decoding in rare edgecase
(Nikolai Vavilov) #11995
* tls:
- fix rare segmentation faults when using TLS
* (Trevor Norris) #11947
* (Ben Noordhuis) #11898
* (jBarz) #11776
PR-URL: #12497
MylesBorins added a commit that referenced this pull request May 2, 2017
Notable Changes:
* module:
- The module loading global fallback to the Node executable's
directory now works correctly on Windows.
(Richard Lau) #9283
* src:
- fix base64 decoding in rare edgecase
(Nikolai Vavilov) #11995
* tls:
- fix rare segmentation faults when using TLS
* (Trevor Norris) #11947
* (Ben Noordhuis) #11898
* (jBarz) #11776
PR-URL: #12499
MylesBorins added a commit that referenced this pull request May 2, 2017
Notable Changes:
* module:
- The module loading global fallback to the Node executable's
directory now works correctly on Windows.
(Richard Lau) #9283
* src:
- fix base64 decoding in rare edgecase
(Nikolai Vavilov) #11995
* tls:
- fix rare segmentation faults when using TLS
* (Trevor Norris) #11947
* (Ben Noordhuis) #11898
* (jBarz) #11776
PR-URL: #12497
imyller added a commit to imyller/meta-nodejs that referenced this pull request May 2, 2017
 Notable Changes:
* module:
- The module loading global fallback to the Node executable's
directory now works correctly on Windows.
(Richard Lau) nodejs/node#9283
* src:
- fix base64 decoding in rare edgecase
(Nikolai Vavilov) nodejs/node#11995
* tls:
- fix rare segmentation faults when using TLS
* (Trevor Norris) nodejs/node#11947
* (Ben Noordhuis) nodejs/node#11898
* (jBarz) nodejs/node#11776
PR-URL: nodejs/node#12499
Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
imyller added a commit to imyller/meta-nodejs that referenced this pull request May 2, 2017
 Notable Changes:
* module:
- The module loading global fallback to the Node executable's
directory now works correctly on Windows.
(Richard Lau) nodejs/node#9283
* src:
- fix base64 decoding in rare edgecase
(Nikolai Vavilov) nodejs/node#11995
* tls:
- fix rare segmentation faults when using TLS
* (Trevor Norris) nodejs/node#11947
* (Ben Noordhuis) nodejs/node#11898
* (jBarz) nodejs/node#11776
PR-URL: nodejs/node#12497
Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
imyller added a commit to imyller/meta-nodejs that referenced this pull request May 2, 2017
 Notable Changes:
* module:
- The module loading global fallback to the Node executable's
directory now works correctly on Windows.
(Richard Lau) nodejs/node#9283
* src:
- fix base64 decoding in rare edgecase
(Nikolai Vavilov) nodejs/node#11995
* tls:
- fix rare segmentation faults when using TLS
* (Trevor Norris) nodejs/node#11947
* (Ben Noordhuis) nodejs/node#11898
* (jBarz) nodejs/node#11776
PR-URL: nodejs/node#12499
Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
imyller added a commit to imyller/meta-nodejs that referenced this pull request May 2, 2017
 Notable Changes:
* module:
- The module loading global fallback to the Node executable's
directory now works correctly on Windows.
(Richard Lau) nodejs/node#9283
* src:
- fix base64 decoding in rare edgecase
(Nikolai Vavilov) nodejs/node#11995
* tls:
- fix rare segmentation faults when using TLS
* (Trevor Norris) nodejs/node#11947
* (Ben Noordhuis) nodejs/node#11898
* (jBarz) nodejs/node#11776
PR-URL: nodejs/node#12497
Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
anchnk pushed a commit to anchnk/node that referenced this pull request May 6, 2017
Notable Changes:
* module:
- The module loading global fallback to the Node executable's
directory now works correctly on Windows.
(Richard Lau) nodejs#9283
* src:
- fix base64 decoding in rare edgecase
(Nikolai Vavilov) nodejs#11995
* tls:
- fix rare segmentation faults when using TLS
* (Trevor Norris) nodejs#11947
* (Ben Noordhuis) nodejs#11898
* (jBarz) nodejs#11776
PR-URL: nodejs#12499
anchnk pushed a commit to anchnk/node that referenced this pull request May 6, 2017
Notable Changes:
* module:
- The module loading global fallback to the Node executable's
directory now works correctly on Windows.
(Richard Lau) nodejs#9283
* src:
- fix base64 decoding in rare edgecase
(Nikolai Vavilov) nodejs#11995
* tls:
- fix rare segmentation faults when using TLS
* (Trevor Norris) nodejs#11947
* (Ben Noordhuis) nodejs#11898
* (jBarz) nodejs#11776
PR-URL: nodejs#12497
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
OnRead() calls into JS land which can result in the SSL context object
being destroyed on return. Check that `ssl_ != nullptr` afterwards.
Fixes: nodejs/node#11885
PR-URL: nodejs/node#11898
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
Notable Changes:
* module:
- The module loading global fallback to the Node executable's
directory now works correctly on Windows.
(Richard Lau) nodejs/node#9283
* src:
- fix base64 decoding in rare edgecase
(Nikolai Vavilov) nodejs/node#11995
* tls:
- fix rare segmentation faults when using TLS
* (Trevor Norris) nodejs/node#11947
* (Ben Noordhuis) nodejs/node#11898
* (jBarz) nodejs/node#11776
PR-URL: nodejs/node#12497
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.tlsIssues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@bnoordhuis@Fishrock123@jcstanaway@addaleax@italoacasas@jasnell@cjihrig@MylesBorins@nodejs-github-bot