Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: Segfault due to non-reentrant GeoIP?

2010-02-09 by Enrico Scholz

Emmanuel Dreyfus <manu-S783fYmB3Ccdnm+yROfE0A@...> writes:

>> This seems to happen when two hosts connect within a very short time. I
>> think that GeoIP_id_by_name() is called for the second host while this
>> function is still executed for the first one.  As both are operating on
>> the same 'geoip_handle' handle, this will corrupt internal state when
>> geoip is not reentrant.
>
> And reentrant it is not: nm shows that gethostbyname is used. 

This is harmless because it is used in the update code only.  Problem seems
to be the GeoIP _check_mtime() function and other races (e.g. non-atomic
lseek() + read() sequences).


> Will you contribute a fix?

I sent a patch to the maillist; I hope that yahoo groups accepts it...


Enrico

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.