Reply to the message of Thursday December 11, 2003 11:07 +0100
-----------------------------------------------------------------
>Every time the virus database is updated (by freshclam)
>clamd will abort with a segmentation fault. What I see in
>clamd.log is typically this:

Since I've not had any response to this yet, I played around
with the problem a bit more and thought I might add some
additional information.

I can now reproduce this on a second Linux machine using
ClamAV 0.65.

After a database update, clamd will abort with a segmentation
fault or it will give an error in cli_calloc, whenever I
access a file that is monitored by clamuko. It will work ok
for normal scans (by clamdscan) up until the clamuko access.

Looking at the core dumps I can se that the crashes happen at
the beginning of cl_scanbuff() in matcher.c.

I'm not a programmer and have only rudimentary knowledge of
gdb but typically it looks like this:

$gdb /usr/local/sbin/clamd core
(...)
Loaded symbols for /lib/ld-linux.so.2
#0  cl_scanbuff (
    buffer=0x871b270 ' ' <repeats 32 times>, "README\n\n", ' ' <repeats 11
times
>, "Java(TM) 2 Runtime Environment, Standard Edition\n", ' ' <repeats 29
times>,
 "Version 1.4.0\n", ' ' <repeats 26 times>, "\n\nThe Java(TM) 2 Runtime
Enviro".
.., length=8946, virname=0xbf7ff960, root=0x8068f68) at matcher.c:189
189             if(current->islast) {
(gdb) bt
#0  cl_scanbuff (
    buffer=0x871b270 ' ' <repeats 32 times>, "README\n\n", ' ' <repeats 11
times
>, "Java(TM) 2 Runtime Environment, Standard Edition\n", ' ' <repeats 29
times>,
 "Version 1.4.0\n", ' ' <repeats 26 times>, "\n\nThe Java(TM) 2 Runtime
Enviro".
.., length=8946, virname=0xbf7ff960, root=0x8068f68) at matcher.c:189
#1  0x00000001 in ?? ()
#2  0x40020135 in cli_scandesc (desc=11, virname=0xbf7ff960, scanned=0x0,
    root=0x8068f68) at scanners.c:97
#3  0x400210d7 in cli_magic_scandesc (desc=11, virname=0xbf7ff960,
    scanned=0x0, root=0x8068f68, limits=0xbffffbd0, options=1,
    reclev=0xbf7ff8f4) at scanners.c:700
#4  0x400212e0 in cl_scandesc (desc=32, virname=0x20, scanned=0x20, root=
0x20,
    limits=0x20, options=32) at scanners.c:712
#5  0x40021364 in cl_scanfile (
    filename=0x8051d98 "/home/andersh/j2re1.4.0/README", virname=0x20,
    scanned=0x20, root=0x20, limits=0x20, options=32) at scanners.c:723
#6  0x0804de59 in clamukoth (arg=0x8051d98) at clamuko.c:214
#7  0x40055e31 in pthread_start_thread () from /lib/libpthread.so.0
(gdb)
#0  cl_scanbuff (
    buffer=0x871b270 ' ' <repeats 32 times>, "README\n\n", ' ' <repeats 11
times
>, "Java(TM) 2 Runtime Environment, Standard Edition\n", ' ' <repeats 29
times>,
 "Version 1.4.0\n", ' ' <repeats 26 times>, "\n\nThe Java(TM) 2 Runtime
Enviro".
.., length=8946, virname=0xbf7ff960, root=0x8068f68) at matcher.c:189
189             if(current->islast) {
(gdb) bt
#0  cl_scanbuff (
    buffer=0x871b270 ' ' <repeats 32 times>, "README\n\n", ' ' <repeats 11
times
>, "Java(TM) 2 Runtime Environment, Standard Edition\n", ' ' <repeats 29
times>,
 "Version 1.4.0\n", ' ' <repeats 26 times>, "\n\nThe Java(TM) 2 Runtime
Enviro".
.., length=8946, virname=0xbf7ff960, root=0x8068f68) at matcher.c:189
#1  0x00000001 in ?? ()
#2  0x40020135 in cli_scandesc (desc=11, virname=0xbf7ff960, scanned=0x0,
    root=0x8068f68) at scanners.c:97
#3  0x400210d7 in cli_magic_scandesc (desc=11, virname=0xbf7ff960,
    scanned=0x0, root=0x8068f68, limits=0xbffffbd0, options=1,
    reclev=0xbf7ff8f4) at scanners.c:700
#4  0x400212e0 in cl_scandesc (desc=32, virname=0x20, scanned=0x20, root=
0x20,
    limits=0x20, options=32) at scanners.c:712
#5  0x40021364 in cl_scanfile (
    filename=0x8051d98 "/home/andersh/j2re1.4.0/README", virname=0x20,
    scanned=0x20, root=0x20, limits=0x20, options=32) at scanners.c:723
#6  0x0804de59 in clamukoth (arg=0x8051d98) at clamuko.c:214
#7  0x40055e31 in pthread_start_thread () from /lib/libpthread.so.0
(gdb)

Anders


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Clamav-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-users

Reply via email to