Hi all,

I found a bug with long domain names which crashes with a segmentation fault when the vusaged is started. We have 1 client with a domainname of 57 characters and although it is not the domain name listed below, it produces the same result. I believe vpopmail supports domainnames upto 63 characters? Or am I wrong?

Steps to reproduce:

/home/vpopmail/bin/vadddomain -e postmaster 12345678901234567890123456789012345678901234567890123456.nl test
/home/vpopmail/bin/vusaged

Returns a segmentation fault:

config: using /home/vpopmail/etc/vusaged.conf
socket: listening on /tmp/vusaged.sock
controller: stage one
Segmentation fault

Running through gdb results in:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb2bb9b90 (LWP 29861)]
0xb7e656c1 in mysql_free_result () from /usr/lib/libmysqlclient.so.15
(gdb) bt
#0  0xb7e656c1 in mysql_free_result () from /usr/lib/libmysqlclient.so.15
#1 0x08059079 in vauth_getall (domain=0x8066afe "12345678901234567890123456789012345678901234567890123456.nl", first=1,
   sortit=1) at vauth.c:737
#2  0x08051244 in queue_controller ()
#3  0xb7d644b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
#4  0xb7ce0a5e in clone () from /lib/i686/cmov/libc.so.6
(gdb) bt full
#0  0xb7e656c1 in mysql_free_result () from /usr/lib/libmysqlclient.so.15
No symbol table info available.
#1 0x08059079 in vauth_getall (domain=0x8066afe "12345678901234567890123456789012345678901234567890123456.nl", first=1,
   sortit=1) at vauth.c:737
       domstr = <value optimized out>
       err = <value optimized out>
vpw = {pw_name = 0x8068f00 "", pw_passwd = 0x8068e20 "", pw_uid = 0, pw_gid = 8192, pw_flags = 8192, pw_gecos = 0x8068c60 "", pw_dir = 0x8068b80 "", pw_shell = 0x8068d40 "", pw_clear_passwd = 0x8068aa0 ""}
       more = 7106143
#2  0x08051244 in queue_controller ()
No locals.
#3  0xb7d644b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#4  0xb7ce0a5e in clone () from /lib/i686/cmov/libc.so.6
No symbol table info available.

I am guessing that a buffer size is too small. Increasing the SQL_BUFF_SIZE in vauth.c to 4096 seems to work, to the extend it throws the same error message later:

[Switching to Thread 0x7ffff134a950 (LWP 15136)]
0x00007ffff7a5b5c5 in mysql_fetch_row () from /usr/lib/libmysqlclient.so.15
(gdb) bt full
#0 0x00007ffff7a5b5c5 in mysql_fetch_row () from /usr/lib/libmysqlclient.so.15
No symbol table info available.
#1 0x00000000004117d1 in vauth_getall (domain=0x62205e "12345678901234567890123456789012345678901234567890123456.nl",
   first=<value optimized out>, sortit=1) at vauth.c:754
domstr = 0x622700 "12345678901234567890123456789012345678901234567890123456_nl"
       err = <value optimized out>
vpw = {pw_name = 0x6259c0 "", pw_passwd = 0x6258e0 "", pw_uid = 0, pw_gid = 0, pw_flags = 0, pw_gecos = 0x625720 "", pw_dir = 0x625640 "", pw_shell = 0x625800 "", pw_clear_passwd = 0x625560 ""}
       more = 1
#2  0x000000000040a21a in queue_controller ()
No locals.
#3  0x00007ffff6ee3f9a in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#4  0x00007ffff6c5856d in clone () from /lib/libc.so.6
No symbol table info available.
#5  0x0000000000000000 in ?? ()
No symbol table info available.

So I'm guessing more than 1 buffer size needs to be increased.

Sincerely,
- Wouter van der Schagt



!DSPAM:4a9e325232711452616560!

Reply via email to