Subject: NetBSD Security Advisory 2007-003: BIND multiple denial of service vulnerabilities
To: None <netbsd-announce@NetBSD.org>
From: NetBSD Security-Officer <security-officer@netbsd.org>
List: netbsd-announce
Date: 03/08/2007 20:02:24
-----BEGIN PGP SIGNED MESSAGE-----
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


Abstract
========

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.2.3.4/24; 127.0.0.1/32; ::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:

		http://www.netbsd.org/Documentation/current/


* 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:
		dist/bind/lib/dns/resolver.c
		dist/bind/lib/dns/validator.c
		dist/bind/lib/dns/include/dns/validator.h
		dist/bind/version

	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> \ 
			dist/bind/lib/dns/include/dns/validator.h
		# 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 
  ftp://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2007-003.txt.asc

Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.org/ and http://www.NetBSD.org/Security/.


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 $

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iQCVAwUBRfBlAT5Ru2/4N2IFAQKeHAP9EtOMZA2jmJNDuO/HFZF4SIyTMpGjgU0F
5rI1YxDoHD08EnhF7cYSzClJz2auByW33i29c90cFCMCUVt7r8UOAONxKuOd9ClK
M6tFKIlFozHNUrxe90X1L22uFwSMAUQteOZ5n8Fg9N4bNEhsbRqE96/rLatjBIPP
h0BAEpAZcBc=
=7g3k
-----END PGP SIGNATURE-----