Mailing List Archive

segv in clamscan (also clamd)
Hi.

I'm not sure if this is the right place to post a bug report; apologies if
it isn't, but here goes.

The attached email causes clamscan to try and follow a null pointer. The
gdb stack trace is as follows (and it's t_line which turns out to be NULL).

Arguments for clamscan were "clamscan --mbox blah".

Regards,
Al.


0x40025666 in messageToBlob (m=0x86a50c8) at message.c:553
553 line = t_line->t_text;
(gdb) where
#0 0x40025666 in messageToBlob (m=0x86a50c8) at message.c:553
#1 0x40023e52 in insert (mainMessage=0x0, blobsIn=0x0, nBlobs=0, textIn=0x0,
dir=0x8652db8 "/tmp/96f42b184eb770a8", rfc821Table=0x8684248,
subtypeTable=0x8050a50) at mbox.c:705
#2 0x4002422d in insert (mainMessage=0x8050c50, blobsIn=0x0, nBlobs=0,
textIn=0x0, dir=0x8652db8 "/tmp/96f42b184eb770a8", rfc821Table=0x8684248,
subtypeTable=0x8050a50) at mbox.c:864
#3 0x40023da1 in insert (mainMessage=0x0, blobsIn=0x0, nBlobs=0, textIn=0x0,
dir=0x8652db8 "/tmp/96f42b184eb770a8", rfc821Table=0x8684248,
subtypeTable=0x8050a50) at mbox.c:665
#4 0x40023360 in cl_mbox (dir=0x8652db8 "/tmp/96f42b184eb770a8", desc=5)
at mbox.c:288
#5 0x4001deed in cli_scanmail (desc=5, virname=0xbffff4a8, scanned=0x804f53c,
root=0x8051a30, limits=0x8652da0, options=65, reclev=0xbffff468)
at scanners.c:539
#6 0x4001e174 in cli_magic_scandesc (desc=5, virname=0xbffff4a8,
scanned=0x804f53c, root=0x8051a30, limits=0x8652da0, options=65,
reclev=0xbffff468) at scanners.c:605
#7 0x4001e21c in cl_scandesc (desc=5, virname=0xbffff4a8, scanned=0x804f53c,
root=0x8051a30, limits=0x8652da0, options=65) at scanners.c:630
#8 0x0804c6d1 in checkfile (
filename=0x804f5a0 "mail.2003-09-06.16:58:34-l54iIo", root=0x8051a30,
limits=0x8652da0, options=65) at manager.c:744
#9 0x0804b983 in scanfile (
filename=0x804f5a0 "mail.2003-09-06.16:58:34-l54iIo", root=0x8051a30,
user=0x40184fa0, opt=0x804f578, limits=0x8652da0) at manager.c:426
#10 0x0804b269 in scanmanager (opt=0x804f578) at manager.c:250
#11 0x08049991 in clamscan (opt=0x804f578) at clamscan.c:125
#12 0x08049feb in main (argc=3, argv=0xbffff7d4) at options.c:147
#13 0x4007e17d in __libc_start_main (main=0x8049e60 <main>, argc=3,
ubp_av=0xbffff7d4, init=0x804907c <_init>, fini=0x804d600 <_fini>,
rtld_fini=0x4000a534 <_dl_fini>, stack_end=0xbffff7cc)
at ../sysdeps/generic/libc-start.c:129
Re: segv in clamscan (also clamd) [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 09 Sep 2003 8:19 am, Al Smith wrote:
> Hi.
>
> I'm not sure if this is the right place to post a bug report; apologies if
> it isn't, but here goes.

Which version of clamscan, which operating system and what architecture?

- -Nigel

- --
Nigel Horne. Arranger, Composer, Conductor, Typesetter.
Owner of the brass band group of the Internet. ICQ#20252325
njh@bandsman.co.uk http://www.bandsman.co.uk/music.htm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/XYW/Ov/MqfDWaY8RApeAAJ4wX8xunH+ID0arK6GrI0FRLc1/SACgiw0W
pUujlgfwBtfbWOJLfOJ8vs8=
=TdU+
-----END PGP SIGNATURE-----
Re: segv in clamscan (also clamd) [ In reply to ]
On Tue, 9 Sep 2003, Nigel Horne wrote:

> > I'm not sure if this is the right place to post a bug report;
> > apologies if it isn't, but here goes.
>
> Which version of clamscan, which operating system and what architecture?

clamav 0.60
linux 2.4.22
intel x86
gcc-2.95.3

Regards,
Al.
Re: segv in clamscan (also clamd) [ In reply to ]
Al Smith wrote:
> On Tue, 9 Sep 2003, Nigel Horne wrote:
>
>
>>>I'm not sure if this is the right place to post a bug report;
>>>apologies if it isn't, but here goes.
>>
>>Which version of clamscan, which operating system and what architecture?
>
>
> clamav 0.60
> linux 2.4.22
> intel x86
> gcc-2.95.3
>
> Regards,
> Al.
>>>>>
Do you dare to compile & install the current CVS version (preferable
with --enable-debug)?

Thomas
Re: segv in clamscan (also clamd) [ In reply to ]
On Wed, 10 Sep 2003, Thomas Lamy wrote:
> Al Smith wrote:
> > On Tue, 9 Sep 2003, Nigel Horne wrote:
> >
> >
> >>>I'm not sure if this is the right place to post a bug report;
> >>>apologies if it isn't, but here goes.
> >>
> >>Which version of clamscan, which operating system and what architecture?
> >
> >
> > clamav 0.60
> > linux 2.4.22
> > intel x86
> > gcc-2.95.3
> >
>
> Do you dare to compile & install the current CVS version (preferable
> with --enable-debug)?

Of course...

Sourceforge's CVS server kept giving me 'end of file from server', so I
fetched http://clamav.sourceforge.net/snapshot/clamav-devel-20030909.tar.gz
instead.

I fixed a typo in unrarlib.c (line 918: semicolon needs to be a comma),
and now this particular email is scannable. However, it also tells me
(twice) "LibClamAV Warning: Empty attachment not saved". Am I missing
something and all the parts of this particular email are being looked
at after all?

Debug output attached.

Thanks,
Al.