Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130815063647.GV221@brightrain.aerifal.cx>
Date: Thu, 15 Aug 2013 02:36:47 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: dn_expand() confuses postfix

On Thu, Aug 15, 2013 at 02:14:22PM +0800, orc wrote:
> On Wed, 14 Aug 2013 18:06:25 -0400
> Rich Felker <dalias@...ifal.cx> wrote:
> 
> > On Wed, Aug 14, 2013 at 02:19:20AM +0800, orc wrote:
> > > musl's dn_expand() confuses postfix - always returns 0, then
> > > postfix's libdns.a gets wrong shifts and gives up with something
> > > like:
> > > 
> > > ../test_dns_lookup: lookup yandex.ru type MX flags 2
> > > ../test_dns_lookup: dns_query: yandex.ru (MX): OK
> > > ../test_dns_lookup: warning: dns_get_fixed: bad class: 30722
> > > ../test_dns_lookup: fatal: Name service error for name=yandex.ru
> > > type=MX: Malformed or unexpected name server reply
> > > 
> > > If someone will face same error with postfix & musl, then get
> > > portable dn_expand.c from
> > > http://tclsysdns.googlecode.com/svn/trunk/unix/dn_expand.c and put
> > > it in src/dns (edit Makefile.in to include src & obj).
> > 
> > I've committed some fixes to this code. Please let me know if the
> > issue persists; I did not have test cases to check that the return
> > value is right, so there's a possibility it may be off-by-one or
> > something.
> 
> Other issue now:
> 
> ../test_dns_lookup: lookup yandex.ru type MX flags 2
> ../test_dns_lookup: dns_query: yandex.ru (MX): OK
> ../test_dns_lookup: warning: valid_hostname: invalid character 6(decimal): ?yande.?r
> ../test_dns_lookup: warning: malformed domain name in resource name of MX record for ?yande.?r: ?yande.?r
> ../test_dns_lookup: fatal: Name service error for name=yandex.ru type=MX: Malformed or unexpected name server reply
> 
> ../test_dns_lookup: lookup ya.ru type MX flags 2
> ../test_dns_lookup: dns_query: ya.ru (MX): OK
> ../test_dns_lookup: warning: valid_hostname: invalid character 2(decimal): ?y.?r
> ../test_dns_lookup: warning: malformed domain name in resource name of MX record for ?y.?r: ?y.?r
> ../test_dns_lookup: fatal: Name service error for name=ya.ru type=MX: Malformed or unexpected name server reply
> 
> temp buffer at src/dns/dns_lookup.c:287 is messed up with these.

OK, I'll see if I can dump a dns packet or two to run the code on and
see if the return values look wrong..

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.