[Pymilter] pymilter dies on IPv6 addresses

Attila Nagy nagy.attila at gmail.com
Tue Nov 21 02:56:28 EST 2017


Sorry, this is the full backtrace which gdb gives:
(gdb) bt
#0  strlen (str=0xffffffffdf3f9d40 <Address 0xffffffffdf3f9d40 out of
bounds>)
    at /usr/src/lib/libc/string/strlen.c:100
#1  0x0000000800ae2ae7 in PyString_FromString ()
   from /usr/local/lib/libpython2.7.so.1
#2  0x0000000805a760a7 in milter_wrap_connect ()
   from /usr/local/lib/python2.7/site-packages/milter.so
#3  0x0000000805c82c7b in mi_sendok () from /usr/local/lib/libmilter.so.6
#4  0x0000000805c81bc5 in mi_engine () from /usr/local/lib/libmilter.so.6
#5  0x0000000805c84d11 in mi_start_session ()
   from /usr/local/lib/libmilter.so.6
#6  0x000000080082ac35 in thread_start (curthread=0x801d9d800)
    at /usr/src/lib/libthr/thread/thr_create.c:289
#7  0x0000000000000000 in ?? ()


On 20 November 2017 at 17:54, Stuart Gathman <stuart at gathman.org> wrote:

> This seems to be a postfix problem, as it does not happen with sendmail -
> indeed on my servers most mail traffic is IPv6.   EL7 has postfix 2.10, do
> you know if it has the problem?  I'll try in a bit.  What version of
> pymilter?
>
> Possibly, postfix passes the args to the connect callback slightly
> differently than sendmail, and there may be a work around we could do in
> pymilter.
>
> Your traceback needs to include a function within miltermodule.c to be
> useful.  It is unlikely that strlen is the problem.
>
> On 11/20/2017 07:24 AM, Attila Nagy wrote:
>
> Pymilter segfaults when I try to connect to postfix (3.2) from an IPv6
> address.
> An easy way to reproduce this is to add:
> smtpd_authorized_xclient_hosts = 127.0.0.0/8
> to postfix main.cf
> and then do the following:
> $ nc localhost 25
> 220 localhost ESMTP Postfix
> XCLIENT ADDR=IPV6:::1
>
> pymilter dies with:
> Segmentation fault (core dumped)
>
> postfix logs this:
> warning: milter unix:/tmp/milter.sock: can't read SMFIC_CONNECT reply
> packet header: No error: 0
>
> gdb says:
> #0  strlen (str=0xffffffffdf3f9d40 <Address 0xffffffffdf3f9d40 out of
> bounds>)
>     at /usr/src/lib/libc/string/strlen.c:100
>
>
> _______________________________________________
> Pymilter mailing list
> Pymilter at gathman.org
> https://gathman.org/mailman/listinfo/pymilter
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gathman.org/pipermail/pymilter/attachments/20171121/022656e6/attachment.html>


More information about the Pymilter mailing list