curl-library
Re: Crash when re-using an scp conn when auth failed the previous time (r 7.19.6)
Date: Thu, 22 Oct 2009 09:12:16 +0200 (CEST)
On Fri, 16 Oct 2009, Liza Alenchery wrote:
> For SCP, when authentication fails (maybe due to a wrong password), and then
> the same request is made, there is an attempt to re-use the connection and
> then it crashes.
Thanks for the report. I tried some simple command lines to repeat this
problem but failed. Can you provide a simple way to repeat it? It'd be nice to
add as a test case for this if nothing else.
> I was able to make the crash go away, by setting conn->bits.close = TRUE
> after sshc->ssh_session is set to NULL, so that this connection is not
> re-used the next time. Or I can reset data->state.conn.
I think we should probably close the connection after the SESSION_FREE state.
Re-use of connections are generally done within libcurl only with successful
logins (for those protocols that offer such a concept) so a failed login or
even a session that has ended should then render a connection that can't be
re-used...
So I think the "conn->bits.close = TRUE" fix is the one I'll vote for here.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2009-10-22