[bogofilter-dev] [bugreports at nn7.de: Bug#247434: bogofilter segfaults with Invalid buffer size, exiting.]
David Relson
relson at osagesoftware.com
Wed May 26 15:21:26 CEST 2004
On Wed, 26 May 2004 08:27:24 +0200
Soeren Sonnenburg wrote:
> On Thu, 2004-05-06 at 13:35, David Relson wrote:
> > Hello Soeren,
> [...]
>
> I know it took a long time but finally I found the time to do what you
> suggested.
>
> > The second method is a binary search. Split foo2 into halves and
> > run bogofilter for each half (to find which has the problem).
> > Repeat the split/run sequence until you can isolate "A" and "B".
> > I've successfully used the "split" command, as in "split -l 100000",
> > to divide a large mailbox into chuncks for this kind of search. The
> > splitting technique is admittedly crude and somewhat complicated
> > because the problem message may be broken up during the splitting
> > processing.
>
> Actually I just split the file into several small pieces of 100k and
> then did the same thing once again and then manually via vi removed
> stuff as long as it still segfaulted and voila here we go two
> connected mails that crash bogofilter.
>
> > Anyhow, with one of these techiques (or a similar one of your own
> > invention), You should be able to find the problem message without
> > much trouble.
>
> Please forward to the bogofilter list as I am not subscribed.
>
> Regards,
> Soeren
>
Hello Soeren,
An interesting message. I don't have a complete answer yet, but I've
noticed a thing or two.
First, what you sent looks like a mailbox file, except that it's
lacking the envelopes ("From who at wherever.com date") lines. After I
added the envelopes to convert it to a standard .mbx file, bogofilter
worked great. I've attached a patch that puts it in standard form.
Second, bogofilter is filling its parsing buffer because it's trying to
complete a very long html tag. The message contains
X-UIDL: DLJ!!PJ<!!8QS!!*l1!!
and the lexer sees the "<" and changes into html-tag mode.
Unfortunately there's no matching ">" to end the tag, so bogofilter says
"Invalid buffer size, exiting." and quits.
I can force an EOF rather than quitting. An EOF has the side effect of
ending _all_ processing of the file, so it could cause bogofilter to
stop processing a real mailbox.
Anyhow, I thought I'd bring you up to date while I determine the best
way to deal with this.
Regards,
David
P.S. When sending a message that causes problems like this, it's best
to gzip the message. That way the attached message doesn't trigger
bogofilter's processing.
--
David Relson Osage Software Systems, Inc.
relson at osagesoftware.com Ann Arbor, MI 48103
www.osagesoftware.com tel: 734.821.8800
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix.foobw_ab.txt
URL: <https://www.bogofilter.org/pipermail/bogofilter-dev/attachments/20040526/81d51802/attachment.txt>
More information about the bogofilter-dev
mailing list