Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

Lists: pgsql-bugspgsql-odbc
From: eric(dot)hill(at)jmp(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #11608: ODBC driver crashes after wrong password entered
Date: 2014-10-08 17:54:46
Message-ID: 20141008175446.2567.20885@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-odbc

The following bug has been logged on the website:

Bug reference: 11608
Logged by: Eric Hill
Email address: eric(dot)hill(at)jmp(dot)com
PostgreSQL version: 9.3.5
Operating system: Windows 7, 8
Description:

This is more about your 64-bit ODBC driver than the PostgreSQL database
itself.

We are using version 9.03.03 of your 64-bit ODBC driver. We are finding
that after SQLDriverConnect() with a bad password, the driver becomes
unstable, and a second call to SQLDriverConnect() can (but does not always)
crash with an access violation. I have not tried the 32-bit driver to see
if that replicates the problem, which means I also haven't tried other
products that support ODBC, because I don't know of any other 64-bit
products with ODBC support.

Thanks

Eric


From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: eric(dot)hill(at)jmp(dot)com
Cc: PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered
Date: 2014-10-09 00:45:44
Message-ID: CAB7nPqSX_E8yKSb=jVCi7XXANVb_8bXxb-cNRwaXrCa4diWVBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-odbc

On Thu, Oct 9, 2014 at 2:54 AM, <eric(dot)hill(at)jmp(dot)com> wrote:

> This is more about your 64-bit ODBC driver than the PostgreSQL database
> itself.
>
This is more adapted on the pgsql-odbc list.

> We are using version 9.03.03 of your 64-bit ODBC driver. We are finding
> that after SQLDriverConnect() with a bad password, the driver becomes
> unstable, and a second call to SQLDriverConnect() can (but does not always)
> crash with an access violation. I have not tried the 32-bit driver to see
> if that replicates the problem, which means I also haven't tried other
> products that support ODBC, because I don't know of any other 64-bit
> products with ODBC support.
>
This should be easy to reproduce. Have you seen that on Linux/Unix as well.
--
Michael


From: "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>
To: eric(dot)hill(at)jmp(dot)com
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered
Date: 2014-10-10 04:08:23
Message-ID: 54375BB7.1080200@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-odbc

Hi Eric,

(2014/10/09 9:45), Michael Paquier wrote:
>
>
> On Thu, Oct 9, 2014 at 2:54 AM, <eric(dot)hill(at)jmp(dot)com
> <mailto:eric(dot)hill(at)jmp(dot)com>> wrote:
>
> This is more about your 64-bit ODBC driver than the PostgreSQL database
> itself.
>
> This is more adapted on the pgsql-odbc list.
>
> We are using version 9.03.03 of your 64-bit ODBC driver. We are finding
> that after SQLDriverConnect() with a bad password, the driver becomes
> unstable, and a second call to SQLDriverConnect() can (but does not
> always)
> crash with an access violation. I have not tried the 32-bit driver
> to see
> if that replicates the problem, which means I also haven't tried other
> products that support ODBC, because I don't know of any other 64-bit
> products with ODBC support.

Are you using an SSL connection?

regards,
Hiroshi Inoue

--
I am using the free version of SPAMfighter.
SPAMfighter has removed 12723 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

Do you have a slow PC? Try a Free scan
http://www.spamfighter.com/SLOW-PCfighter?cid=sigen


From: Eric Hill <Eric(dot)Hill(at)jmp(dot)com>
To: "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered
Date: 2014-10-10 13:09:56
Message-ID: dd795d3b94ee412a916f034018d60a93@MERCMBX34D.na.SAS.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-odbc

Hey, Hiroshi,

Not that I am aware of. Here is the full connection string:

DSN=PostgreSQL35W;DATABASE=postgres;SERVER=rdcesx07044.race.sas.com;PORT=5432;UID=postgres;PWD=%_PWD_%;CA=d;A6=;A7=100;A8=4096;B0=255;B1=8190;BI=0;C2=dd_;;CX=1c20502bb;A1=7.4;

HTH,

Eric

-----Original Message-----
From: Inoue, Hiroshi [mailto:inoue(at)tpf(dot)co(dot)jp]
Sent: Friday, October 10, 2014 12:08 AM
To: Eric Hill
Cc: Michael Paquier; PostgreSQL mailing lists
Subject: Re: [ODBC] [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

Hi Eric,

(2014/10/09 9:45), Michael Paquier wrote:
>
>
> On Thu, Oct 9, 2014 at 2:54 AM, <eric(dot)hill(at)jmp(dot)com
> <mailto:eric(dot)hill(at)jmp(dot)com>> wrote:
>
> This is more about your 64-bit ODBC driver than the PostgreSQL database
> itself.
>
> This is more adapted on the pgsql-odbc list.
>
> We are using version 9.03.03 of your 64-bit ODBC driver. We are finding
> that after SQLDriverConnect() with a bad password, the driver becomes
> unstable, and a second call to SQLDriverConnect() can (but does not
> always)
> crash with an access violation. I have not tried the 32-bit driver
> to see
> if that replicates the problem, which means I also haven't tried other
> products that support ODBC, because I don't know of any other 64-bit
> products with ODBC support.

Are you using an SSL connection?

regards,
Hiroshi Inoue

--
I am using the free version of SPAMfighter.
SPAMfighter has removed 12723 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

Do you have a slow PC? Try a Free scan
http://www.spamfighter.com/SLOW-PCfighter?cid=sigen


From: "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>
To: Eric Hill <Eric(dot)Hill(at)jmp(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered
Date: 2014-10-11 09:19:24
Message-ID: 5438F61C.1050902@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-odbc

Hi Eric,

On 2014/10/10 22:09, Eric Hill wrote:
> Hey, Hiroshi,
>
> Not that I am aware of. Here is the full connection string:
>
> DSN=PostgreSQL35W;DATABASE=postgres;SERVER=rdcesx07044.race.sas.com;PORT=5432;UID=postgres;PWD=%_PWD_%;CA=d;A6=;A7=100;A8=4096;B0=255;B1=8190;BI=0;C2=dd_;;CX=1c20502bb;A1=7.4;

Hmm this connection seems to use neither ssl nor libpq.
Are you using MS tools like MS access or excel?

regards,
Hiroshi Inoue


From: Eric Hill <Eric(dot)Hill(at)jmp(dot)com>
To: "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered
Date: 2014-10-11 17:28:26
Message-ID: 3b164e3b4d9243269b66d7d5c67dab77@MERCMBX34D.na.SAS.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-odbc

Hey, Hiroshi,

I am developer on the JMP statistical visualization tool dev team (www.jmp.com<http://www.jmp.com>). This is a desktop application that runs on Windows and Mac. Our product uses ODBC calls to connect to ODBC data sources and retrieve data. We have both 32-bit and 64-bit versions of the product. The scenario we are seeing this problem with is 64-bit JMP talking a Windows PostgreSQL server. The connection string is coming from the driver. I looked in the driver dialog to see if there was a way to specify SSL or something, but I did not see anything.

I have not tried connecting to the PostgreSQL server from Excel or Access, because I have 32-bit versions of those products installed and the 64-bit PostgreSQL ODBC driver. I'd be willing to try a 32-bit scenario with Excel as the client if you think that would help.

Thanks,

Eric

Sent from Windows Mail

From: Inoue, Hiroshi<mailto:inoue(at)tpf(dot)co(dot)jp>
Sent: ?Saturday?, ?October? ?11?, ?2014 ?5?:?19? ?AM
To: Eric Hill<mailto:Eric(dot)Hill(at)jmp(dot)com>
Cc: Michael Paquier<mailto:michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists<mailto:pgsql-odbc(at)postgresql(dot)org>

Hi Eric,

On 2014/10/10 22:09, Eric Hill wrote:
> Hey, Hiroshi,
>
> Not that I am aware of. Here is the full connection string:
>
> DSN=PostgreSQL35W;DATABASE=postgres;SERVER=rdcesx07044.race.sas.com;PORT=5432;UID=postgres;PWD=%_PWD_%;CA=d;A6=;A7=100;A8=4096;B0=255;B1=8190;BI=0;C2=dd_;;CX=1c20502bb;A1=7.4;

Hmm this connection seems to use neither ssl nor libpq.
Are you using MS tools like MS access or excel?

regards,
Hiroshi Inoue


From: "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>
To: Eric Hill <Eric(dot)Hill(at)jmp(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered
Date: 2014-10-14 06:46:08
Message-ID: 543CC6B0.2010001@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-odbc

(2014/10/12 2:28), Eric Hill wrote:
> Hey, Hiroshi,
>
> I am developer on the JMP statistical visualization tool dev team
> (www.jmp.com <http://www.jmp.com>). This is a desktop application that
> runs on Windows and Mac. Our product uses ODBC calls to connect to ODBC
> data sources and retrieve data. We have both 32-bit and 64-bit versions
> of the product. The scenario we are seeing this problem with is 64-bit
> JMP talking a Windows PostgreSQL server. The connection string is
> coming from the driver. I looked in the driver dialog to see if there
> was a way to specify SSL or something, but I did not see anything.

Unfortunately I can't reproduce the crash here.
What's your calling sequence of ODBC APIs after SQLDriverConnect()
with bad password?

regards,
Hiroshi Inoue

--
I am using the free version of SPAMfighter.
SPAMfighter has removed 12751 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

Do you have a slow PC? Try a Free scan
http://www.spamfighter.com/SLOW-PCfighter?cid=sigen


From: Eric Hill <Eric(dot)Hill(at)jmp(dot)com>
To: "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered
Date: 2014-10-15 12:36:55
Message-ID: e836daeb52b74a2dbb581bf90d5092b8@MERCMBX34D.na.SAS.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-odbc

Okay, I'll do my best.

Perhaps the first key to the scenario is that when you use the ODBC Administrator in Windows to set up the PostgreSQL DSN, the UI from the PostgreSQL driver is going to want a valid user name and password, which it stores in the registry. After doing that, go to the registry (HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\<PostgreSQL DSN>) and blank out the password.

In our application, we call SQLDriverConnect passing in a connection string that includes a user name but no password, and, importantly, we pass SQL_DRIVER_COMPLETE as the last parameter. So we are requesting that the driver prompt for connection information if it can't connect with the string we've passed in. It is at that point that the bad password is supplied, and that's when the access violation, sometimes, occurs. This morning, even I am having trouble reproducing the crash. It does not happen every time. Our testers in China seem to have better luck.

Eric

-----Original Message-----
From: Inoue, Hiroshi [mailto:inoue(at)tpf(dot)co(dot)jp]
Sent: Tuesday, October 14, 2014 2:46 AM
To: Eric Hill
Cc: Michael Paquier; PostgreSQL mailing lists
Subject: Re: [ODBC] [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

(2014/10/12 2:28), Eric Hill wrote:
> Hey, Hiroshi,
>
> I am developer on the JMP statistical visualization tool dev team
> (www.jmp.com <http://www.jmp.com>). This is a desktop application
> that runs on Windows and Mac. Our product uses ODBC calls to connect
> to ODBC data sources and retrieve data. We have both 32-bit and
> 64-bit versions of the product. The scenario we are seeing this
> problem with is 64-bit JMP talking a Windows PostgreSQL server. The
> connection string is coming from the driver. I looked in the driver
> dialog to see if there was a way to specify SSL or something, but I did not see anything.

Unfortunately I can't reproduce the crash here.
What's your calling sequence of ODBC APIs after SQLDriverConnect() with bad password?

regards,
Hiroshi Inoue

--
I am using the free version of SPAMfighter.
SPAMfighter has removed 12751 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

Do you have a slow PC? Try a Free scan
http://www.spamfighter.com/SLOW-PCfighter?cid=sigen