Skip to Content.
Sympa Menu

freetds - [freetds] Segfault With Invalid Credentials

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: <Mitchell_Freed AT McAfee.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Segfault With Invalid Credentials
  • Date: Wed, 29 Feb 2012 08:58:39 -0800

Running against the nightly snapshot, I'm seeing a segfault when trying
to connect to the remote server when using invalid credentials.

(gdb) bt
#0 0xf7fdf430 in ?? ()
#1 0xf7d9e0a8 in *__GI_abort () at abort.c:88
#2 0xf7dd8165 in __libc_message (do_abort=2, fmt=0xf7e973e8 "*** glibc
detected *** %s: %s: 0x%s ***\n") at
../sysdeps/unix/sysv/linux/libc_fatal.c:170
#3 0xf7dddfd4 in malloc_printerr (action=2, str=0xf7e942b1 "corrupted
double-linked list", ptr=0x80647b8) at malloc.c:5994
#4 0xf7ddf697 in _int_free (av=0xf7eb2140, mem=0x8064840) at malloc.c:4717
#5 0xf7ddf8ac in *__GI___libc_free (mem=0x8064840) at malloc.c:3625
#6 0xf7f59f97 in tds_free_login (login=0x8064840) at mem.c:1066
#7 0xf7f4930a in ct_connect (con=0x80634b0, servername=0x80634f0
"10.0.2.231", snamelen=-9) at ct.c:657

The error occurs in mem.c when trying to free the TDSLOGIN*. I noticed
that the TDSLOGIN* allocated in tds_alloc_login is a different pointer
than the one being passed to tds_free_login. Looking into it a bit
closer the tds_free_login is failing on the TDSLOGIN* allocated from
tds_alloc_connection -- if that helps.

--
Mitch Freed
Mitch_Freed AT McAfee.com




Archive powered by MHonArc 2.6.24.

Top of Page