-
Notifications
You must be signed in to change notification settings - Fork 6k
fix(ext/node): fix TLS socket error ordering and app data leak before identity verification #33585
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -278,6 +278,10 @@ Object.setPrototypeOf(TLSSocket.prototype, net.Socket.prototype); | |
| Object.setPrototypeOf(TLSSocket, net.Socket); | ||
|
|
||
| tlsWrap.TLSWrap.prototype.close = function close(cb) { | ||
| // Signal to Rust that this TLSWrap is being closed, so it won't | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quick sanity-check question — is Reading the flow: JS Is that the only path? If JS rejects via some other mechanism (e.g., a Not blocking — the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes -- Even the user-code case (
|
||
| // send buffered application data after a failed identity check. | ||
| this.setClosing(); | ||
|
|
||
| let ssl; | ||
| if (this._owner) { | ||
| ssl = this._owner.ssl; | ||
|
|
@@ -301,7 +305,7 @@ tlsWrap.TLSWrap.prototype.close = function close(cb) { | |
|
|
||
| if (this._parentWrap) { | ||
| if (this._parentWrap._handle === null) { | ||
| queueMicrotask(done); | ||
| nextTick(done); | ||
| return; | ||
| } | ||
|
|
||
|
|
@@ -313,7 +317,7 @@ tlsWrap.TLSWrap.prototype.close = function close(cb) { | |
| } | ||
|
|
||
| // Defer so callers can register "close" listeners after destroy(). | ||
| queueMicrotask(done); | ||
| nextTick(done); | ||
| }; | ||
|
|
||
| TLSSocket.prototype._wrapHandle = function (wrap, handle) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.