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 — tls: do not free cert in `.getCertificate()` by addaleax · Pull Request #25490 · nodejs/node

Conversation

@addaleax

@addaleax addaleax commented Jan 14, 2019

Copy link
Copy Markdown
Member

The documentation of SSL_get_certificate states that it returns
an internal pointer that must not be freed by the caller.

Therefore, using a smart pointer to take ownership is incorrect.

Refs: https://man.openbsd.org/SSL_get_certificate.3
Refs: #24261

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

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
@addaleax
tls: do not free cert in .getCertificate()
7611f1b
The documentation of `SSL_get_certificate` states that it returns
an internal pointer that must not be freed by the caller.

Therefore, using a smart pointer to take ownership is incorrect.

Refs: https://man.openbsd.org/SSL_get_certificate.3
Refs: nodejs#24261
Fixes: https://github.com/nodejs-private/security/issues/217
@nodejs-github-bot

nodejs-github-bot commented Jan 14, 2019

Copy link
Copy Markdown
Collaborator

@addaleax sadly an error occured when I tried to trigger a build :(

All reactions

Sorry, something went wrong.

Uh oh!

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

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. labels Jan 14, 2019
@addaleax addaleax mentioned this pull request Jan 14, 2019
tls: get the local certificate after tls handshake #24261
Closed
4 tasks done
@addaleax addaleax added the tls Issues and PRs related to the tls subsystem. label Jan 14, 2019
@addaleax

addaleax commented Jan 14, 2019

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

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

danbev
danbev approved these changes Jan 14, 2019
View reviewed changes
cjihrig
cjihrig approved these changes Jan 14, 2019
View reviewed changes
jasnell
jasnell approved these changes Jan 14, 2019
View reviewed changes
sam-github
sam-github approved these changes Jan 14, 2019
View reviewed changes
@addaleax

addaleax commented Jan 14, 2019

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax addaleax added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Jan 14, 2019
lpinca
lpinca approved these changes Jan 14, 2019
View reviewed changes
This was referenced Jan 16, 2019
CI failures: 20190110 - 20190116 nodejs/reliability#20
Closed
Investigate flaky known_issues/test-vm-timeout-escape-queuemicrotask #25529
Closed
@addaleax

addaleax commented Jan 21, 2019

Copy link
Copy Markdown
Member Author

Resume CI again: https://ci.nodejs.org/job/node-test-pull-request/20229/

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax

addaleax commented Jan 21, 2019

Copy link
Copy Markdown
Member Author

Landed in e888f66

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax addaleax closed this Jan 21, 2019
@addaleax
addaleax deleted the get-certificate-nofree branch January 21, 2019 19:27
addaleax added a commit that referenced this pull request Jan 21, 2019
@addaleax
tls: do not free cert in .getCertificate()
e888f66
The documentation of `SSL_get_certificate` states that it returns
an internal pointer that must not be freed by the caller.

Therefore, using a smart pointer to take ownership is incorrect.

Refs: https://man.openbsd.org/SSL_get_certificate.3
Refs: #24261
Fixes: https://github.com/nodejs-private/security/issues/217

PR-URL: #25490
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
addaleax added a commit that referenced this pull request Jan 23, 2019
@addaleax
tls: do not free cert in .getCertificate()
c3409f5
The documentation of `SSL_get_certificate` states that it returns
an internal pointer that must not be freed by the caller.

Therefore, using a smart pointer to take ownership is incorrect.

Refs: https://man.openbsd.org/SSL_get_certificate.3
Refs: #24261
Fixes: https://github.com/nodejs-private/security/issues/217

PR-URL: #25490
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2019
v11.8.0 proposal #25687
Merged
zcbenz pushed a commit to electron/node that referenced this pull request Mar 27, 2019
@addaleax @zcbenz
tls: do not free cert in .getCertificate()
afbc0fd
The documentation of `SSL_get_certificate` states that it returns
an internal pointer that must not be freed by the caller.

Therefore, using a smart pointer to take ownership is incorrect.

Refs: https://man.openbsd.org/SSL_get_certificate.3
Refs: nodejs/node#24261
Fixes: https://github.com/nodejs-private/security/issues/217

PR-URL: nodejs/node#25490
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
sam-github pushed a commit to sam-github/node that referenced this pull request Apr 29, 2019
@addaleax @sam-github
tls: do not free cert in .getCertificate()
8c7406f
The documentation of `SSL_get_certificate` states that it returns
an internal pointer that must not be freed by the caller.

Therefore, using a smart pointer to take ownership is incorrect.

Refs: https://man.openbsd.org/SSL_get_certificate.3
Refs: nodejs#24261
Fixes: https://github.com/nodejs-private/security/issues/217

PR-URL: nodejs#25490
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
This was referenced Aug 9, 2020
[Snyk] Fix for 2 vulnerabilities kissofire/node#17
Open
[Snyk] Fix for 2 vulnerabilities ron-a20/node#14
Open
[Snyk] Fix for 2 vulnerabilities sitedata/node#6
Open
This was referenced Aug 10, 2020
[Snyk] Fix for 2 vulnerabilities meghasfdc/node#17
Open
[Snyk] Fix for 2 vulnerabilities 137717unity/node#7
Open
[Snyk] Fix for 2 vulnerabilities Rednickle/node-1#2
Open
[Snyk] Fix for 3 vulnerabilities turkdevops/node#2
Merged
@snyk-bot snyk-bot mentioned this pull request Oct 29, 2020
[Snyk] Security upgrade gatsby from 2.18.18 to 2.23.20 Rednickle/node-1#4
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@lpinca lpinca lpinca approved these changes
@cjihrig cjihrig cjihrig approved these changes
+2 more reviewers
@sam-github sam-github sam-github approved these changes
@danbev danbev danbev 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++. crypto Issues and PRs related to the crypto subsystem. tls Issues and PRs related to the tls subsystem.

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.

7 participants

@addaleax @nodejs-github-bot @sam-github @danbev @jasnell @lpinca @cjihrig
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 01402775 — 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.