Bug Tracker item #2815880, was opened at 2009-07-02 17:11
Message generated for change (Comment added) made by csmr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=2815880&group_id=250683

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: daemon
Group: v3.9.0
Status: Open
Resolution: None
Priority: 9
Private: No
Submitted By: Carlo Rodrigues (csmr)
Assigned to: Stevan Bajic (sbajic)
Summary: Another email that crashes dspam 3.9.0 git

Initial Comment:
dspam crashes when classifying this email. I noticed it while running 
dspam_train, but it also crashes by invoking dspam, isolated, or in 
client/server mode.

dspam --class=spam --source=corpus --user [email protected] < 
Spam/1222473209.13708_2.relay-2.lx.esp\,S\=2939\:2\,S
*** glibc detected *** dspam: munmap_chunk(): invalid pointer: 
0x00000000036cfb60 ***                                                 
*** glibc detected *** dspam: malloc(): memory corruption: 0x00000000036cf880 
***

NOTE: 3.8.0 does not crash, but 3.9.0 does.

I'm using the latest git code, after commit 
9d7c29ac1ced95157a814754595b2b9d7a14f4cd .

I'm uploading the offending message.

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

>Comment By: Carlo Rodrigues (csmr)
Date: 2009-07-03 12:21

Message:
Sorry. In 32bit is also crashes, when I test it as the root user.
It crashes even if I change --user to anything else, and with a empty db.

In 64bit it just crashed if --user was [email protected].

# dspam --client --class=spam --source=corpus --user [email protected] <
/mnt/home/csmr/1222473209.13708_2.relay-2.lx.esp\,S\=2939\:2\,S      
*** glibc detected *** dspam: double free or corruption (!prev):
0x0953fa68 ***                                                             
                   
======= Backtrace: =========                                              
                                                                           
         
/lib/libc.so.6[0x3cd0f1]                                                  
                                                                           
         
/lib/libc.so.6(cfree+0x90)[0x3d0bc0]                                      
                                                                           
         
/usr/lib/libdspam.so.7(_ds_degenerate_message+0x1ce)[0xcdf52e]            
                                                                           
         
/usr/lib/libdspam.so.7(dspam_process+0x1f5)[0xcd70e5]                     
                                                                           
         
dspam(process_message+0xc6a)[0x805284a]                                   
                                                                           
         
dspam(process_users+0x972)[0x8053972]                                     
                                                                           
         
dspam(main+0x440)[0x8054750]                                              
                                                                           
         
/lib/libc.so.6(__libc_start_main+0xdc)[0x379e8c]                          
                                                                           
         
dspam[0x804adf1]                                                          
                                                                           
         
======= Memory map: ========                                              
                                                                           
         
00110000-00119000 r-xp 00000000 fd:00 393428     /lib/libnss_files-2.5.so 
                                                                           
         
00119000-0011a000 r-xp 00008000 fd:00 393428     /lib/libnss_files-2.5.so 
                                                                           
         
0011a000-0011b000 rwxp 00009000 fd:00 393428     /lib/libnss_files-2.5.so 
                                                                           
         
0011b000-0011f000 r-xp 00000000 fd:00 393253     /lib/libnss_dns-2.5.so   
                                                                           
         
0011f000-00120000 r-xp 00003000 fd:00 393253     /lib/libnss_dns-2.5.so   
                                                                           
         
00120000-00121000 rwxp 00004000 fd:00 393253     /lib/libnss_dns-2.5.so   
                                                                           
         
001ff000-00207000 r-xp 00000000 fd:00 1353304   
/usr/lib/libkrb5support.so.0.1                                             
                                   
00207000-00208000 rwxp 00007000 fd:00 1353304   
/usr/lib/libkrb5support.so.0.1                                             
                                   
0020a000-00237000 r-xp 00000000 fd:00 1349443   
/usr/lib/libgssapi_krb5.so.2.2                                             
                                   
00237000-00238000 rwxp 0002d000 fd:00 1349443   
/usr/lib/libgssapi_krb5.so.2.2                                             
                                   
00291000-00292000 r-xp 00291000 00:00 0          [vdso]                   
                                                                           
         
00346000-00360000 r-xp 00000000 fd:00 393218     /lib/ld-2.5.so           
                                                                           
         
00360000-00361000 r-xp 00019000 fd:00 393218     /lib/ld-2.5.so           
                                                                           
         
00361000-00362000 rwxp 0001a000 fd:00 393218     /lib/ld-2.5.so           
                                                                           
         
00364000-004a2000 r-xp 00000000 fd:00 393234     /lib/libc-2.5.so         
                                                                           
         
004a2000-004a4000 r-xp 0013e000 fd:00 393234     /lib/libc-2.5.so
004a4000-004a5000 rwxp 00140000 fd:00 393234     /lib/libc-2.5.so
004a5000-004a8000 rwxp 004a5000 00:00 0
004aa000-004ac000 r-xp 00000000 fd:00 393249     /lib/libdl-2.5.so
004ac000-004ad000 r-xp 00001000 fd:00 393249     /lib/libdl-2.5.so
004ad000-004ae000 rwxp 00002000 fd:00 393249     /lib/libdl-2.5.so
004b0000-004d5000 r-xp 00000000 fd:00 393245     /lib/libm-2.5.so
004d5000-004d6000 r-xp 00024000 fd:00 393245     /lib/libm-2.5.so
004d6000-004d7000 rwxp 00025000 fd:00 393245     /lib/libm-2.5.so
004d9000-004ec000 r-xp 00000000 fd:00 393247     /lib/libpthread-2.5.so
004ec000-004ed000 r-xp 00012000 fd:00 393247     /lib/libpthread-2.5.so
004ed000-004ee000 rwxp 00013000 fd:00 393247     /lib/libpthread-2.5.so
004ee000-004f0000 rwxp 004ee000 00:00 0
004f2000-0052d000 r-xp 00000000 fd:00 393255     /lib/libsepol.so.1
0052d000-0052e000 rwxp 0003a000 fd:00 393255     /lib/libsepol.so.1
0052e000-00538000 rwxp 0052e000 00:00 0
0053a000-00550000 r-xp 00000000 fd:00 393256     /lib/libselinux.so.1
00550000-00552000 rwxp 00015000 fd:00 393256     /lib/libselinux.so.1
0055f000-00571000 r-xp 00000000 fd:00 1344678    /usr/lib/libz.so.1.2.3
00571000-00572000 rwxp 00011000 fd:00 1344678    /usr/lib/libz.so.1.2.3
00574000-0057f000 r-xp 00000000 fd:00 393254    
/lib/libgcc_s-4.1.2-20080825.so.1
0057f000-00580000 rwxp 0000a000 fd:00 393254    
/lib/libgcc_s-4.1.2-20080825.so.1
00655000-00668000 r-xp 00000000 fd:00 393413     /lib/libnsl-2.5.so
00668000-00669000 r-xp 00012000 fd:00 393413     /lib/libnsl-2.5.so
00669000-0066a000 rwxp 00013000 fd:00 393413     /lib/libnsl-2.5.so
0066a000-0066c000 rwxp 0066a000 00:00 0
0066e000-00677000 r-xp 00000000 fd:00 393291     /lib/libcrypt-2.5.so
00677000-00678000 r-xp 00008000 fd:00 393291     /lib/libcrypt-2.5.so
00678000-00679000 rwxp 00009000 fd:00 393291     /lib/libcrypt-2.5.so
00679000-006a0000 rwxp 00679000 00:00 0
006c4000-006c6000 r-xp 00000000 fd:00 393433     /lib/libcom_err.so.2.1
006c6000-006c7000 rwxp 00001000 fd:00 393433     /lib/libcom_err.so.2.1
006e8000-006f7000 r-xp 00000000 fd:00 393431     /lib/libresolv-2.5.so
006f7000-006f8000 r-xp 0000e000 fd:00 393431     /lib/libresolv-2.5.so
006f8000-006f9000 rwxp 0000f000 fd:00 393431     /lib/libresolv-2.5.so
006f9000-006fb000 rwxp 006f9000 00:00 0
006fd000-006ff000 r-xp 00000000 fd:00 393429     /lib/libkeyutils-1.2.so
006ff000-00700000 rwxp 00001000 fd:00 393429    
/lib/libkeyutils-1.2Aborted

If I can be of any further assistance, just ask.

Carlo Rodrigues

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

Comment By: Carlo Rodrigues (csmr)
Date: 2009-07-03 12:06

Message:
I'm testing it against CentOS 5.3 32bit / 64 bit.

In the 32bit environment it does not crash.

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

Comment By: Carlo Rodrigues (csmr)
Date: 2009-07-03 11:46

Message:
# cat /var/dspam/group
default:shared,managed:*
[email protected]:shared,managed:*[email protected]



Just tested it against another user (from the same group)  and it did not
complain this time.

r...@ravaso-1 dspam]# dspam --class=spam --source=corpus --user
[email protected] <
/mnt/home/csmr/1222473209.13708_2.relay-2.lx.esp\,S\=2939\:2\,S
[r...@ravaso-1 dspam]# dspam --class=spam --source=corpus --user
[email protected] <
/mnt/home/csmr/1222473209.13708_2.relay-2.lx.esp\,S\=2939\:2\,S
*** glibc detected *** dspam: munmap_chunk(): invalid pointer:
0x000000000edf5b60 ***
*** glibc detected *** dspam: malloc(): memory corruption:
0x000000000edf5880 ***


I'm going to erase all data on mysql db and /var/dspam/ and I'll do the
corpus training again, to check if the error appears again.

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

Comment By: Carlo Rodrigues (csmr)
Date: 2009-07-03 11:39

Message:
It's a text / html message.

See the attached  dspam.conf.

This is a x86_64 system. I haven't tested it in on 32 bits, though. I'll
do that as well.

The output of 'dspam --version';

# dspam --version

DSPAM Anti-Spam Suite GIT (agent/library)

Copyright (c) 2002-2009 DSPAM Project
http://dspam.sourceforge.net.

DSPAM may be copied only under the terms of the GNU General Public
License,
a copy of which can be found with the DSPAM distribution kit.

Configuration parameters: '--prefix=/usr' '--with-logdir=/var/log/dspam'
'--with-dspam-home=/var/dspam' '--with-dspam-home-mode=2775'
'--with-dspam-home-owner=dspam' '--with-dspam-home-group=dspam'
'--with-dspam-mode=0755' '--with-dspam-owner=dspam'
'--with-dspam-group=dspam' '--sysconfdir=/etc' '--enable-daemon'
'--enable-clamav' '--enable-virtual-users' '--enable-preferences-extension'
'--with-storage-driver=mysql_drv'
'--with-delivery-agent=/usr/sbin/sendmail'
'--with-mysql-libraries=/usr/lib64/mysql'
'--with-mysql-includes=/usr/include/mysql' '--enable-debug'

dspam.debug contents:

5593: [07/03/2009 11:36:17] DSPAM Instance Startup
5593: [07/03/2009 11:36:17] input args: dspam --class=spam --source=corpus
--user [email protected]
5593: [07/03/2009 11:36:17] pass-thru args:
5593: [07/03/2009 11:36:17] processing user [email protected]
5593: [07/03/2009 11:36:17] uid = 0, euid = 0, gid = 0, egid = 0
5593: [07/03/2009 11:36:17] loading preferences for user [email protected]
5593: [07/03/2009 11:36:17] _mysql_drv_getpwnam: successful returning
struct for name: [email protected]
5593: [07/03/2009 11:36:17] Loading preferences for uid 3
5593: [07/03/2009 11:36:17] Loading preferences for uid 0
5593: [07/03/2009 11:36:17] loaded default preferences externally
5593: [07/03/2009 11:36:17] using /var/dspam/opt-in/[email protected]
as path
5593: [07/03/2009 11:36:17] using
/var/dspam/opt-out/[email protected] as path
5593: [07/03/2009 11:36:17] assigning user [email protected] to group
default
5593: [07/03/2009 11:36:17] assigning user [email protected] to group
[email protected]
5593: [07/03/2009 11:36:17] sedation level set to: 5
5593: [07/03/2009 11:36:17] _mysql_drv_getpwnam: successful returning
struct for name: [email protected]
5593: [07/03/2009 11:36:17] Connecting to 127.0.0.1:3310 for virus check
5593: [07/03/2009 11:36:17] Connecting to 127.0.0.1:1060 for virus stream
transmission
5593: [07/03/2009 11:36:17] message is signed.  retaining original text
for reassembly
5593: [07/03/2009 11:36:17] message is signed.  retaining original text
for reassembly

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

Comment By: Stevan Bajic (sbajic)
Date: 2009-07-02 22:18

Message:
Hallo Carlo

Damn! That should not happen. Lt me guess: The mail is not pure text but
is a HTML mail. Right?

Could you post your dspam.conf and any other additional information you
have?


Kind Regards,

Stevan Bajic

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

Comment By: Carlo Rodrigues (csmr)
Date: 2009-07-02 17:18

Message:
By the way, I'm using mysql backend and osb tokenizer.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=2815880&group_id=250683

------------------------------------------------------------------------------
_______________________________________________
Dspam-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspam-devel

Reply via email to