Skip to content

JsonRpcConnection#Disconnect(): don't cleanly shutdown TLS (nor TCP)#10220

Closed
Al2Klimov wants to merge 3 commits intomasterfrom
Al2Klimov-patch-6
Closed

JsonRpcConnection#Disconnect(): don't cleanly shutdown TLS (nor TCP)#10220
Al2Klimov wants to merge 3 commits intomasterfrom
Al2Klimov-patch-6

Conversation

@Al2Klimov
Copy link
Member

@Al2Klimov Al2Klimov commented Nov 7, 2024

The TCP connection may be broken, e.g. by some firewall (or attacker) in the middle, so that the TLS shutdown takes longer than necessary, if it even completes successfully.

On the other hand, the peer isn't a browser, but also an Icinga 2 node, designed to handle TLS/TCP stream truncation (what effectively happens now) gracefully. A clean TLS shutdown also doesn't improve security as, again, a MITM could prevent it.

closes #10210

…er cancelling I/O

While #Disconnect() is running in foreground on #m_IoStrand, #WriteOutgoingMessages() could wait for #m_OutgoingMessagesQueued or, theoretically, pending I/O. Also cancelling such I/O makes sense, to wake up #WriteOutgoingMessages() first if necessary.
The TCP connection may be broken, e.g. by some firewall (or attacker) in the middle, so that the TLS shutdown takes longer than necessary, if it even completes successfully.

On the other hand, the peer isn't a browser, but also an Icinga 2 node, designed to handle TLS stream truncation (what effectively happens now) gracefully. A clean TLS shutdown also doesn't improve security as, again, a MITM could prevent it.
It's neither cleanly shutting down TLS already, so the TCP stream may also be truncated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant