[Home]

Summary:ASTERISK-11545: variable data truncated when attempting password changes using odbc backed
Reporter:Bruce McAlister (asgaroth)Labels:
Date Opened:2008-02-29 05:34:34.000-0600Date Closed:2008-02-29 17:57:35.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) mylog_root13775.log
( 1) psqlodbc_root13775.log
( 2) trace.log
Description:Our uniqid field for our voicemail accounts is a 36 character variable field which is a generated guid. What appears to be happening is that when the update to the voicemailaccounts table is run, to update the password, only half of this guid is passed into the query, ie, only 18 characters of the 36 character uniqid is passed in the update query.

For example:

UPDATE voicemailaccounts SET password='56789' WHERE uniqueid='fcdadd0c-a2b3-4e77-'

in this case uniqueid is supposed to be:

'fcdadd0c-a2b3-4e77-88d0-e2d37ab185f2'

The asterisk console does not report any errors and Alison says that the password has been successfully changed.

However, the password is unchanged as the update query mentioned above would not have found a record to update.

****** STEPS TO REPRODUCE ******

[1] Install PostgreSQL 8.2.6
[2] Install unixODBC 2.2.12
[3] Install pgsqlODBC driver 08.01.0200
[4] Build and install asterisk 1.4.18 with ODBC voicemail storage enabled
[5] Create database and tables for use with sip peers and voicemail.
[6] Create sippeers, sipusers and voicemail dsn's for odbc and associate with extconfig.conf
[7] Create an extension to select a mailbox, and attempt a password change.
Comments:By: Bruce McAlister (asgaroth) 2008-02-29 05:38:42.000-0600

I have uploaded the unixODBC trace.log, and the pgsqlODBC driver communication log and debug log to help try and get to the bottom of this issue. If you require any additional information, please dont hesitate to ask.

This particular issue is a show stopper for us in migration to odbc voicemail storage. I cannot see anything obvious wrong with the ODBC driver as it is working well otherwise.

By: Digium Subversion (svnbot) 2008-02-29 07:50:16.000-0600

Repository: asterisk
Revision: 105261

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r105261 | file | 2008-02-29 07:50:14 -0600 (Fri, 29 Feb 2008) | 4 lines

Bump up the size of the uniqueid variable.
(closes issue ASTERISK-11545)
Reported by: asgaroth

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=105261

By: Digium Subversion (svnbot) 2008-02-29 07:51:38.000-0600

Repository: asterisk
Revision: 105262

_U  trunk/
U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r105262 | file | 2008-02-29 07:51:36 -0600 (Fri, 29 Feb 2008) | 12 lines

Merged revisions 105261 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105261 | file | 2008-02-29 09:48:13 -0400 (Fri, 29 Feb 2008) | 4 lines

Bump up the size of the uniqueid variable.
(closes issue ASTERISK-11545)
Reported by: asgaroth

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=105262

By: Digium Subversion (svnbot) 2008-02-29 17:30:56.000-0600

Repository: asterisk
Revision: 105409

U   branches/1.4/main/autoservice.c

------------------------------------------------------------------------
r105409 | russell | 2008-02-29 17:30:48 -0600 (Fri, 29 Feb 2008) | 23 lines

Fix a major bug in autoservice.  There was a race condition in the handling of
the list of channels in autoservice.  The problem was that it was possible for
a channel to get removed from autoservice and destroyed, while the autoservice
was still messing with the channel.  This led to memory corruption, and caused
crashes.  This explains multiple backtraces I have seen that have references
to autoservice, but do to the nature of the issue (memory corruption), could
cause crashes in a number of areas.

(fixes the crash in BE-386)
(closes issue ASTERISK-11165)
(closes issue ASTERISK-11391)

The following issues could be related.  If you are the reporter of one of these,
please update to include this fix and try again.

(potentially fixes issue ASTERISK-10713)
(potentially fixes issue ASTERISK-11545)
(potentially fixes issue ASTERISK-11058)
(potentially fixes issue ASTERISK-11453)
(potentially fixes issue ASTERISK-10713)
(potentially fixes issue ASTERISK-11437)
(potentially fixes issue ASTERISK-11259)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=105409

By: Digium Subversion (svnbot) 2008-02-29 17:33:02.000-0600

Repository: asterisk
Revision: 105410

_U  trunk/
U   trunk/main/autoservice.c

------------------------------------------------------------------------
r105410 | russell | 2008-02-29 17:33:00 -0600 (Fri, 29 Feb 2008) | 31 lines

Merged revisions 105409 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105409 | russell | 2008-02-29 17:34:32 -0600 (Fri, 29 Feb 2008) | 23 lines

Fix a major bug in autoservice.  There was a race condition in the handling of
the list of channels in autoservice.  The problem was that it was possible for
a channel to get removed from autoservice and destroyed, while the autoservice
was still messing with the channel.  This led to memory corruption, and caused
crashes.  This explains multiple backtraces I have seen that have references
to autoservice, but do to the nature of the issue (memory corruption), could
cause crashes in a number of areas.

(fixes the crash in BE-386)
(closes issue ASTERISK-11165)
(closes issue ASTERISK-11391)

The following issues could be related.  If you are the reporter of one of these,
please update to include this fix and try again.

(potentially fixes issue ASTERISK-10713)
(potentially fixes issue ASTERISK-11545)
(potentially fixes issue ASTERISK-11058)
(potentially fixes issue ASTERISK-11453)
(potentially fixes issue ASTERISK-10713)
(potentially fixes issue ASTERISK-11437)
(potentially fixes issue ASTERISK-11259)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=105410

By: Digium Subversion (svnbot) 2008-02-29 17:57:03.000-0600

Repository: asterisk
Revision: 105409

U   branches/1.4/main/autoservice.c

------------------------------------------------------------------------
r105409 | russell | 2008-02-29 17:34:32 -0600 (Fri, 29 Feb 2008) | 23 lines

Fix a major bug in autoservice.  There was a race condition in the handling of
the list of channels in autoservice.  The problem was that it was possible for
a channel to get removed from autoservice and destroyed, while the autoservice
thread was still messing with the channel.  This led to memory corruption, and
caused crashes.  This explains multiple backtraces I have seen that have
references to autoservice, but do to the nature of the issue (memory corruption),
could cause crashes in a number of areas.

(fixes the crash in BE-386)
(closes issue ASTERISK-11165)
(closes issue ASTERISK-11391)

The following issues could be related.  If you are the reporter of one of these,
please update to include this fix and try again.

(potentially fixes issue ASTERISK-10713)
(potentially fixes issue ASTERISK-11545)
(potentially fixes issue ASTERISK-11058)
(potentially fixes issue ASTERISK-11453)
(potentially fixes issue ASTERISK-10713)
(potentially fixes issue ASTERISK-11437)
(potentially fixes issue ASTERISK-11259)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=105409

By: Digium Subversion (svnbot) 2008-02-29 17:57:35.000-0600

Repository: asterisk
Revision: 105410

_U  trunk/
U   trunk/main/autoservice.c

------------------------------------------------------------------------
r105410 | russell | 2008-02-29 17:36:46 -0600 (Fri, 29 Feb 2008) | 31 lines

Merged revisions 105409 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105409 | russell | 2008-02-29 17:34:32 -0600 (Fri, 29 Feb 2008) | 23 lines

Fix a major bug in autoservice.  There was a race condition in the handling of
the list of channels in autoservice.  The problem was that it was possible for
a channel to get removed from autoservice and destroyed, while the autoservice
thread was still messing with the channel.  This led to memory corruption, and
caused crashes.  This explains multiple backtraces I have seen that have
references to autoservice, but do to the nature of the issue (memory corruption),
could cause crashes in a number of areas.

(fixes the crash in BE-386)
(closes issue ASTERISK-11165)
(closes issue ASTERISK-11391)

The following issues could be related.  If you are the reporter of one of these,
please update to include this fix and try again.

(potentially fixes issue ASTERISK-10713)
(potentially fixes issue ASTERISK-11545)
(potentially fixes issue ASTERISK-11058)
(potentially fixes issue ASTERISK-11453)
(potentially fixes issue ASTERISK-10713)
(potentially fixes issue ASTERISK-11437)
(potentially fixes issue ASTERISK-11259)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=105410