Subject: NetBSD Security Advisory 2007-003: BIND multiple denial of service vulnerabilities
To: None <>
From: NetBSD Security-Officer <>
List: netbsd-announce
Date: 03/08/2007 20:02:24
Hash: SHA1

		 NetBSD Security Advisory 2007-003

Topic:		BIND multiple denial of service vulnerabilities

Version:	NetBSD-current:	source prior to January 27, 2007
		NetBSD 4.0_BETA2:	affected
		NetBSD 3.1:		affected
		NetBSD 3.0.*:		affected
		NetBSD 3.0:		affected
		NetBSD 2.1:		not affected
		NetBSD 2.0.*:		not affected
		NetBSD 2.0:		not affected
		pkgsrc:			bind-9.3.2 and earlier

Severity:	Denial of service

Fixed:		NetBSD-current:		January 27, 2007
		NetBSD-4 branch:	March 04, 2007
		NetBSD-3-1 branch:	March 04, 2007
		NetBSD-3-0 branch:	March 04, 2007
		NetBSD-3 branch:	March 04, 2007
		pkgsrc:			bind-9.3.4 corrects the issue


Two denial of service vulnerabilities have been reported in bind which
can cause the name server daemon to crash.  The vulnerabilities relate
to the processing of type * (ANY) queries and recursive queries.

The ANY query processing issue has been assigned CVE reference CVE-2007-0493.
The recursive query issue has been assigned CVE reference CVE-2007-0494.

Technical Details

Issue #1: * (ANY) query processing

This issue is relating to the way in which the server processes
a type * (ANY) query.  In order for this attack to be successful
the query must return multiple RRsets in the answer section.  In
addition to this the server must be configured with dnssec
validation enabled.

Issue #2: Recursive query handling

This issue is relating to the way in which the server processes
recursive queries.  The request, in this case, can cause named to 
read a freed fetch context.  The server needs to be enabled to
receive recursive queries in order for this attack to be successful.

Solutions and Workarounds

If you have not enabled dnssec validation in your name server then you
are not vulnerable to the * (ANY) denial of service attack.  Both
vulnerabilities can be mitigated by limiting who can perform specific
queries against the name server.  

In particular, it is recommended practice, regardless of this
vulnerability, to accept recursive queries only from local clients who
would be expected to query this nameserver directly, not from unknown
Internet sources.  The 'allow-recursion' directive in the options
section of named.conf should be configured with an appropriate address
list, as in the following simple example:

options {
        directory "/etc/namedb";
        allow-recursion {;; ::1; };

It is recommended that NetBSD users of vulnerable versions update
their binaries.

The following instructions describe how to upgrade your bind
binaries by updating your source tree and rebuilding and
installing a new version of bind.

* NetBSD-current:

	Systems running NetBSD-current dated from before 2007-01-27
	should be upgraded to NetBSD-current dated 2007-01-28 or later.

	Due to the amount of changes introduced in the BIND upgrade
	in CVS HEAD it is recommended that users of NetBSD-current
	perform a full system upgrade to sources dated after 2007-01-28.

	For more information on how to do this, see:

* NetBSD 3.*:

	Systems running NetBSD 3.* sources dated from before
	2007-03-04 should be upgraded from NetBSD 3.* sources dated
	2007-03-05 or later.

	The following files need to be updated from the
	netbsd-3, netbsd-3-0 or netbsd-3-1 branch:

	To update from CVS, re-build, and re-install bind:

		# cd src
		# cvs update -r <branch_name> dist/bind/lib/dns/resolver.c
		# cvs update -r <branch_name> dist/bind/lib/dns/validator.c
		# cvs update -r <branch_name> \ 
		# cvs update -r <branch_name> dist/bind/version
		# cd usr.sbin/bind
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

Thanks To

The Internet Software Consortium is credited with the discovery and 
correction of both issues.

Revision History

	2007-03-08	Initial release

More Information

Advisories may be updated as new information becomes available.
The most recent version of this advisory (PGP signed) can be found at

Information about NetBSD and NetBSD security can be found at and

Copyright 2007, The NetBSD Foundation, Inc.  All Rights Reserved.
Redistribution permitted only in full, unmodified form.

$NetBSD: NetBSD-SA2007-003.txt,v 1.2 2007/03/08 19:32:38 adrianp Exp $

Version: GnuPG v1.4.7 (NetBSD)