-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
crypto: handle initEDRaw pkey failure #40188
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
codebytere
force-pushed
the
handle-initedraw-failure
branch
from
September 23, 2021 11:51
ab79e03
to
323cafb
Compare
panva
approved these changes
Sep 23, 2021
This comment has been minimized.
This comment has been minimized.
codebytere
force-pushed
the
handle-initedraw-failure
branch
from
September 24, 2021 10:16
323cafb
to
b73c0a1
Compare
panva
approved these changes
Sep 24, 2021
panva
added
the
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
Sep 24, 2021
This comment has been minimized.
This comment has been minimized.
panva
requested changes
Sep 24, 2021
codebytere
force-pushed
the
handle-initedraw-failure
branch
from
September 24, 2021 18:50
b73c0a1
to
f7f01b6
Compare
panva
approved these changes
Sep 24, 2021
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Sep 24, 2021
This comment has been minimized.
This comment has been minimized.
panva
reviewed
Sep 24, 2021
Co-authored-by: Filip Skokan <[email protected]>
17 tasks
This comment has been minimized.
This comment has been minimized.
jasnell
approved these changes
Sep 25, 2021
jasnell
pushed a commit
that referenced
this pull request
Sep 25, 2021
PR-URL: #40188 Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in 17bb7b2 |
21 tasks
This was referenced Sep 27, 2021
22 tasks
targos
pushed a commit
that referenced
this pull request
Oct 4, 2021
PR-URL: #40188 Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: James M Snell <[email protected]>
21 tasks
codebytere
added a commit
to electron/electron
that referenced
this pull request
Oct 11, 2021
codebytere
added a commit
to electron/electron
that referenced
this pull request
Oct 11, 2021
codebytere
added a commit
to electron/electron
that referenced
this pull request
Oct 11, 2021
codebytere
added a commit
to electron/electron
that referenced
this pull request
Oct 11, 2021
codebytere
added a commit
to electron/electron
that referenced
this pull request
Oct 13, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
crypto
Issues and PRs related to the crypto subsystem.
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.
Refs electron/electron#31087.
It's possible that
node/src/crypto/crypto_keys.cc
Line 1106 in 4441c3e
KeyObjectHandle::InitEDRaw
will set the return value to false. This means that thedata_
member will never be assigned. However, the return value of this function is never checked by any of its callsites, meaning that a keyObject is returned but that calling any functions on it, e.g.export
orasymmetricKeyType
will cause a nullptr crash when they try to accesskey->Data()
.Fix this by checking the return value from
handle.initEdRaw()
and throwing an error onfalse
.I used the error from above the callsites but please let me know if there's another preferable one!