-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

		NetBSD Security Advisory 2013-005
		=================================

Topic:		bind Denial of Service (CVE-2013-4854)


Version:	NetBSD-current:		source prior to July 28th, 2013
		NetBSD 6.1:		affected
		NetBSD 6.0:		affected
		NetBSD 5.2:		affected
		NetBSD 5.1:		affected

Severity:	Denial of Service

Fixed:		NetBSD-current:		July 27th, 2013
		NetBSD-6-0 branch:	July 29th, 2013
		NetBSD-6-1 branch:	July 29th, 2013
		NetBSD-6 branch:	July 29th, 2013
		NetBSD-5-2 branch:	July 29th, 2013
		NetBSD-5-1 branch:	July 29th, 2013
		NetBSD-5 branch:	July 29th, 2013

Please note that NetBSD releases prior to 5.1 are no longer supported.
It is recommended that all users upgrade to a supported release.


Abstract
========

A specially crafted query that includes malformed rdata can cause
named to terminate with an assertion failure while rejecting
the malformed query.

This vulnerability has been assigned CVE-2013-4854.


Technical Details
=================

Authoritative and recursive servers are equally vulnerable.
Intentional exploitation of this condition can cause a
denial of service in nameservers running affected versions
of BIND 9.  BIND Access Control Lists do not provide any
protection from malicious clients.

In addition to the named server, applications built using
libdns from the affected source distributions may crash
with assertion failures triggered in the same fashion.



Solutions and Workarounds
=========================

If feasible, as a workaround, restrict access to the nameserver
to only trusted clients via a packet filter.

Solutions:
- - Install and use a bind package from pkgsrc.

- - Update libdns from a daily build later than the fix date: fetch from
  http://nyftp.NetBSD.org/pub/NetBSD-daily/<branch>/<date>/<arch>/
  the file binary/sets/base.tgz

  for NetBSD 5.x:
  cd / && tar xzpf <base.tgz-path> ./usr/lib/libdns.so.1.4
  if your arch has 32bit-compat, update the compat lib as well,
  e.g. for amd64:
  cd / && tar xzpf <base.tgz-path> ./usr/lib/i386/libdns.so.1.4

  for NetBSD 6.x:
  cd / && tar xzpf <base.tgz-path> ./usr/lib/libdns.so.5.8
  if your arch has 32bit-compat, update the compat lib as well,
  e.g. for amd64:
  cd / && tar xzpf <base.tgz-path> ./usr/lib/i386/libdns.so.5.8

- - Rebuild your system with the fixes applied.

The wrong bounds checking is in bind's lib/dns/rdata/generic/keydata_65533.c
Fixed versions:
current:
src/external/bsd/bind/dist/lib/dns/rdata/generic/keydata_65533.c 1.6
netbsd-6:
src/external/bsd/bind/dist/lib/dns/rdata/generic/keydata_65533.c 1.3.4.2
netbsd-6-1:
src/external/bsd/bind/dist/lib/dns/rdata/generic/keydata_65533.c 1.3.4.1.6.1
netbsd-6-0:
src/external/bsd/bind/dist/lib/dns/rdata/generic/keydata_65533.c 1.3.4.1.4.1
netbsd-5:
src/dist/bind/lib/dns/rdata/generic/keydata_65533.c 1.1.2.4
netbsd-5-2:
src/dist/bind/lib/dns/rdata/generic/keydata_65533.c 1.1.2.3.2.1
netbsd-5-1:
src/dist/bind/lib/dns/rdata/generic/keydata_65533.c 1.1.4.5


Thanks To
=========

Thanks to Maxim Shudrak and the HP Zero Day Initiative for
reporting this issue and the ISC security team for their
advisory (https://kb.isc.org/article/AA-01015).


Revision History
================

	2013-07-30	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 
  http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-005.txt.asc

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


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

$NetBSD: NetBSD-SA2013-005.txt,v 1.2 2013/07/30 20:44:22 tonnerre Exp $

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJR+CX5AAoJEAZJc6xMSnBukpUQAJC3dydlOI9KumiZfQUa+MZ/
GPVFNkfSLXMqujJdsB12bE1oT4Oeu4ylSadtCZWgPyiaXZ46uEkFgPODU88JxdAr
z4ha31LoFEU+WRSPWeSgJdnX5IHvsyrSzXXoOZc0K99nVRIF67ecgAGHNkxmvghv
/zsxfJrAabbdInpX0BzDmu/KE2AlATY7KFAZigqAJH80JAIJ7tAAmnrzfVOD2jXx
FGEok/Cz3bAoEUfPG5S77OKAKrq5BmJ9iyfqLd7Hv2vZucBVyPe0FaYAKFsseevI
KkHcf9cHPgUiqCsBGnKD1+qL1oV15gAlshhcHUAl+pn7QhsKwJGebKy5ZmeWYy4i
WfkH8XMHKKJGvZBxRkqCZNmMmyby6NxSiV1xAMCsiClDVxOoxApMkF8dDsSVUBoJ
kE16/x9A3A11kizCaC0+OagezJAsOpHWqyLncIcZN1fJ+mzWFfm7eWnY9GDE22wV
26NNGhMi0AZvBvhFVqjs8GYzc50BYjMYdqWkL+FrITkofTWeGuO7QXujDGdIYsPJ
nTNUASMqcvXp9vLkXPLssV4nf3eks1kuaGDM+AdaDkFiH8pj6dVofiYkJeRCobtV
jJAc9h8xgm1Rr8h6eqQi14R+DVxt6H5Em10brQrufM16xglmhFoyb1JBm/2FDztw
ifNWNjfA+euXhJBVue3b
=oGEr
-----END PGP SIGNATURE-----