From 563cb062b801fd447f5a5b04b9161890d8966e4a Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 2 Feb 2020 18:53:24 +0000 Subject: [PATCH] userauth: fill in missing error path when agent goes away. If the agent client code doesn't even manage to read a full response message at all (for example, because the agent it's talking to is Pageant running in debug mode and you just ^Ced it or it crashed, which is what's been happening to me all afternoon), then previously, the userauth code would loop back round to the top of the main loop without having actually sent any request, so the client code would deadlock waiting for a response to nothing. --- ssh2userauth.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ssh2userauth.c b/ssh2userauth.c index e8b251ba..d1a0b6f5 100644 --- a/ssh2userauth.c +++ b/ssh2userauth.c @@ -782,6 +782,13 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) s->suppress_wait_for_response_packet = true; ssh_free_pktout(s->pktout); } + } else { + ppl_logevent("Pageant failed to respond to " + "signing request"); + ppl_printf("Pageant failed to " + "respond to signing request\r\n"); + s->suppress_wait_for_response_packet = true; + ssh_free_pktout(s->pktout); } }