mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-12 08:43:53 -05:00
Terrapin warning: say if reconfiguration can help.
The Terrapin vulnerability affects the modified binary packet protocol used with ChaCha20+Poly1305, and also CBC-mode ciphers in ETM mode. It's best prevented by the new strict-kex mode, but if the server can't handle that protocol alteration, another approach is to change PuTTY's configuration so that it will negotiate a different algorithm. That may not be possible either (an obvious case being if the server has been manually configured to _only_ support vulnerable modes). But if it is possible, then it would be nice for us to detect that and show how to do it. That could be a hard problem in general, but the most likely cause of it is configuring ChaCha20 to the top of the cipher list, so that it's selected ahead of things that aren't vulnerable. And it's reasonably easy to do just one fantasy-renegotiation, having moved ChaCha20 down to below the warn line, and see if that sorts it out. If it does, we can pass on that advice to the user.
This commit is contained in:
11
ssh/common.c
11
ssh/common.c
@ -1105,6 +1105,7 @@ SeatPromptResult confirm_weak_crypto_primitive(
|
||||
algtype, algname);
|
||||
break;
|
||||
case WCR_TERRAPIN:
|
||||
case WCR_TERRAPIN_AVOIDABLE:
|
||||
seat_dialog_text_append(
|
||||
text, SDT_PARA,
|
||||
"The %s selected for this session is %s, "
|
||||
@ -1116,6 +1117,16 @@ SeatPromptResult confirm_weak_crypto_primitive(
|
||||
text, SDT_PARA,
|
||||
"Upgrading, patching, or reconfiguring this SSH server is the "
|
||||
"best way to avoid this vulnerability, if possible.");
|
||||
if (wcr == WCR_TERRAPIN_AVOIDABLE) {
|
||||
seat_dialog_text_append(
|
||||
text, SDT_PARA,
|
||||
"You can also avoid this vulnerability by abandoning "
|
||||
"this connection, moving ChaCha20 to below the "
|
||||
"'warn below here' line in PuTTY's SSH cipher "
|
||||
"configuration (so that an algorithm without the "
|
||||
"vulnerability will be selected), and starting a new "
|
||||
"connection.");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
unreachable("bad WeakCryptoReason");
|
||||
|
Reference in New Issue
Block a user