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

tlsSocket.setMaxSendFragment results in an abort #38169

Closed
zyscoder opened this issue Apr 9, 2021 · 1 comment · Fixed by #38170
Closed

tlsSocket.setMaxSendFragment results in an abort #38169

zyscoder opened this issue Apr 9, 2021 · 1 comment · Fixed by #38170
Labels
confirmed-bug Issues with confirmed bugs. tls Issues and PRs related to the tls subsystem.

Comments

@zyscoder
Copy link

zyscoder commented Apr 9, 2021

What steps will reproduce the bug?

Setup a node instance,

» node

and run the following javascript code.

new tls.TLSSocket().setMaxSendFragment();

Then the node instance occurs an abort.

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
Welcome to Node.js v14.15.1.
Type ".help" for more information.
> new tls.TLSSocket().setMaxSendFragment();
node[21216]: ../src/node_crypto.cc:2113:static void node::crypto::SSLWrap<Base>::SetMaxSendFragment(const v8::FunctionCallbackInfo<v8::Value>&) [with Base = node::TLSWrap]: Assertion `args.Length() >= 1 && args[0]->IsNumber()' failed.
 1: 0xa03530 node::Abort() [node]
 2: 0xa035ae  [node]
 3: 0xb3673a node::crypto::SSLWrap<node::TLSWrap>::SetMaxSendFragment(v8::FunctionCallbackInfo<v8::Value> const&) [node]
 4: 0xbe369b  [node]
 5: 0xbe4c46  [node]
 6: 0xbe52c6 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
 7: 0x13ff259  [node]
[1]    21216 abort (core dumped)  node                                                                                                                                                                                                          

Additional information

@Ayase-252 Ayase-252 added the tls Issues and PRs related to the tls subsystem. label Apr 9, 2021
@aduh95 aduh95 added the confirmed-bug Issues with confirmed bugs. label Apr 9, 2021
@EladKeyshawn
Copy link

@aduh95 I'm taking a look into seems like an easy fix

@aduh95 aduh95 closed this as completed in 6e3f985 Apr 21, 2021
targos pushed a commit that referenced this issue Apr 29, 2021
PR-URL: #38170
Fixes: #38169
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[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. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants