lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <25436.1328904125@redhat.com>
Date:	Fri, 10 Feb 2012 20:02:05 +0000
From:	David Howells <dhowells@...hat.com>
To:	Jim Rees <rees@...ch.edu>
Cc:	dhowells@...hat.com, jmorris@...ei.org, keyrings@...ux-nfs.org,
	linux-nfs@...r.kernel.org, linux-security-module@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-cifs@...r.kernel.org,
	linux-api@...r.kernel.org, libc-alpha@...rceware.org
Subject: Re: [PATCH 2/2] Define ENONAMESERVICE and ENAMEUNKNOWN to indicate name service errors

Jim Rees <rees@...ch.edu> wrote:

>   > Would this be the same as NXDOMAIN?  That is, does it mean the name server
>   > couldn't find a record, or does it mean that the record doesn't exist?
>   
>   Is there a way to tell the difference?  Can you store a negative record in
>   the DNS?  Or is it that the DNS has records for the name, just not records
>   of the type you're looking for (eg. NO_ADDRESS/NO_DATA from
>   gethostbyname())?
> 
> It's an important distinction to the resolver if you want to avoid dns
> hijacking.  See rfc2308.  There doesn't seem to be a way to tell the
> difference from the gethostbyname call, which was designed before this was a
> problem.  The on-the-wire dns query protocol does make the distinction.
> 
> I suspect kernel dns clients won't need to know the difference, but I think
> it's useful if we decide on and document the meaning of the error codes.
> Maybe the answer is that ENAMEUNKNOWN means the same as a HOST_NOT_FOUND
> from gethostbyname().

Should I propose an extra error code?  Perhaps giving:

	ENONAMESERVICE	"Network name service unavailable"
	ENAMEUNKNOWN	"Network name not known"
	ENONAMERECORD	"Network name query returned no records"

Note that ENONAMESERVICE covers all of: not having a name service configured,
not being able to contact the configured name server and the configured name
server not being able to chain to the authoritative name server.  However, I
think this is probably okay.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ