Skip to content
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.createDiffieHellman" results in an abort #37808

Closed
zyscoder opened this issue Mar 19, 2021 · 0 comments · Fixed by #37810
Closed

"crypto.createDiffieHellman" results in an abort #37808

zyscoder opened this issue Mar 19, 2021 · 0 comments · Fixed by #37810
Labels
confirmed-bug Issues with confirmed bugs. crypto Issues and PRs related to the crypto subsystem.

Comments

@zyscoder
Copy link

What steps will reproduce the bug?

Setup a node instance,

» node

and run the following javascript code.

crypto.createDiffieHellman('',true);

Then an abort occurs.

How often does it reproduce? Is there a required condition?

This abort can always be triggered following the steps above.

What is the expected behavior?

If any error occurs, an exception or other similar error-reporting stuff should be thrown. There is no reason to abort the whole node process.

What do you see instead?

» node
crypto.createDiffieHellman('',true);
node[79037]: ../src/util-inl.h:490:node::ArrayBufferViewContents<T, kStackStorageSize>::ArrayBufferViewContents(v8::Local<v8::Value>) [with T = char; long unsigned int kStackStorageSize = 64]: Assertion `value->IsArrayBufferView()' failed.
 1: 0xa03530 node::Abort() [node]
 2: 0xa035ae  [node]
 3: 0xb396fa node::ArrayBufferViewContents<char, 64ul>::ArrayBufferViewContents(v8::Local<v8::Value>) [node]
 4: 0xb30625 node::crypto::DiffieHellman::New(v8::FunctionCallbackInfo<v8::Value> const&) [node]
 5: 0xbe4695  [node]
 6: 0xbe4c9f  [node]
 7: 0xbe52c6 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
 8: 0x13ff259  [node]
[1]    79037 abort (core dumped)  node
                                                                                                                                                                                                                                                 

Additional information

@aduh95 aduh95 added confirmed-bug Issues with confirmed bugs. crypto Issues and PRs related to the crypto subsystem. labels Mar 19, 2021
aduh95 added a commit to aduh95/node that referenced this issue Mar 19, 2021
@aduh95 aduh95 closed this as completed in 98ff5ac Mar 23, 2021
ruyadorno pushed a commit that referenced this issue Mar 24, 2021
Fixes: #37808

PR-URL: #37810
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos pushed a commit that referenced this issue May 1, 2021
Fixes: #37808

PR-URL: #37810
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. crypto Issues and PRs related to the crypto subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants