cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Core dump when authentication fails?

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 25 May 2011 06:26:22 -0700

On Wed, May 25, 2011 at 01:41:36AM -0400, Saqib Ali wrote:
> I'm using Curl version 7.21.5 to do SFTP uploads from a Solaris 10 box.
> It works fine for me when I give it valid parameters (username, password, IP
> address)
>
> However, I'm testing it in the exact same scenario -- only with the wrong
> password. I'm expecting that it will be stopped because the transfer is
> interrupted by the timeout duration.. But instead of that, I'm getting a core
> dump. (See below)
>
> Has anyone else seen this behavior? What is the correct expected behavior when
> the user authentication fails?

curl_easy_perform should return error 67, CURLE_LOGIN_DENIED; libcurl should
never cause a core dump (unless the app deliberately passes in bad pointers).
But test case 628 already tests a failed login due to a bad password, so
you probably have a slightly different environment.

> * Using ssh public key file /SS8/users/lis/.ssh/id_dsa.pub
> * Using ssh private key file /SS8/users/lis/.ssh/id_dsa
> * SFTP 0xdcc38 state change from SSH_AUTH_PKEY_INIT to SSH_AUTH_PKEY
> * SSH public key authentication failed: Unable to open public key file

This looks like it might be a problem. I can't get it to fail when I
supply a nonexistent public key, but you should be able to run the program
under a debugger to find out exactly where and why this occurs.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-25