Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 06 Dec 2018 19:18:20 +0100
From: Florian Weimer <fweimer@...hat.com>
To: Natanael Copa <ncopa@...inelinux.org>
Cc: musl@...ts.openwall.com,  Tarun Johar <tjohar@...alphase.com>
Subject: Re: DNS resolver patch

* Natanael Copa:

> On Thu, 06 Dec 2018 15:53:43 +0100
> Florian Weimer <fweimer@...hat.com> wrote:
>
>> * Tarun Johar:
>> 
>> > The VirtualBox --natdnsresolver does not support IPv6 AAAA address
>> > queries.  It returns "NotImp" (code 4) for such queries.  
>> 
>> I think that's not the only bug, and glibc fails to work around all of
>> them.  We occasionally get bug reports about DNS resolution issues under
>> VirtualBox, too.  Oracle really needs to fix this properly.
>> 
>> Thanks,
>> Florian
>
> Problem is here:
> https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/Network/slirp/hostres.c?rev=59202#L408
>
> 402	    if (   qtype != Type_A
> 403	        && qtype != Type_CNAME
> 404	        && qtype != Type_PTR
> 405	        && qtype != Type_ANY)
> 406	    {
> 407	        LogErr(("NAT: hostres: unsupported qtype %d\n", qtype));
> 408	        return refuse(pData, m, RCode_NotImp);
> 409	    }
>
>
> They should return RCode_NXDomain instead of RCode_NotImp. Seems like
> they also have more of those invalid use of NotImp.

I think that's probably worse because NXDOMAIN says that there is no
data at that name, so there's no A record either.  It will confuse some
DNS resolvers.

The alternative, using a NOERROR/NODATA response, confuses musl search
processing.  In order to fix this properly, you need to pass through the
AAAA records (even if there's no actual IPv6 networking support in the
code; I haven't checked this and it does not matter for name
resolution).

Thanks,
Florian

Powered by blists - more mailing lists

Your e-mail address:

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