DNS implementations vulnerable to denial-of-service attacks via malformed DNS queries

ID VU:23495
Type cert
Reporter CERT
Modified 2005-11-15T00:00:00



Incorrect decoding of malformed DNS packets causes certain DNS implementations to hang or crash.


RFC1035 (DOMAIN NAMES, IMPLEMENTATION AND SPECIFICATION) defines a mechanism for conserving bytes in a DNS query or reply packet by avoiding repetition of character strings ("labels") in a domain name. Thus if the label "domain.com" appears several times in a query or response packet (i.e. "www.domain.com", "host.subdomain.domain.com", "ns.domain.com"), only the first occurrence need be fully specified - further occurrences of "domain.com" can be alluded to by using a pointer to the first occurrence. Since labels in a DNS packet are preceded by an 8 bit length field, and since individual labels are restricted to 63 characters, there are 2 unused bits in the length field. Setting these two bits 2 to "11" indicates that the following byte is not a label but rather a pointer to a prior occurrence of a label elsewhere in the packet. Programs are not required to encode packets using this label compression scheme, but all programs are required to be able to decode any such packets that are received.

Numerous DNS implementations do not perform sufficient input checking on compressed labels, allowing an attacker to craft a DNS query containing malformed compressed labels. For example, a packet can be constructed that has a pointer that points back to itself, or that contains a pointer that points to another pointer which points back to the first pointer. When vulnerable programs attempt to decode these malformed labels, various undesirable effects can be induced in the decoding process including allocating all of the process's available memory or causing the process to enter an infinite loop.

Note: Any program that performs raw decoding of DNS packets (sniffers, IDS, nameservers, etc.) may potentially exhibit this vulnerability unless care has been taken in the implementation of the decompression code. Many popular programs besides tcpdump and ethereal perform these functions, and may not have been tested for this vulnerability yet.


If a remote, unauthenticated attacker supplies a vulnerable DNS implementation with a specially crafted query, they may be able to cause that DNS software to enter an infinite loop eventually consuming 100% CPU resources. This will cause the DNS software to crash resulting in a denial-of-service condition.


Apply patch

Users are encouraged to check with their vendor to determine the appropriate patch or update to apply.

Systems Affected

Vendor| Status| Date Notified| Date Updated
Ethereal| | -| 30 May 2001
Tcpdump.Org| | -| 30 May 2001
Apple Computer, Inc.| | -| 10 Nov 2005
Microsoft Corporation| | 10 Nov 2005| 15 Nov 2005
F5 Networks, Inc.| | 10 Nov 2005| 10 Nov 2005
Internet Software Consortium| | 10 Nov 2005| 10 Nov 2005
Openwall GNU/*/Linux| | 10 Nov 2005| 10 Nov 2005
If you are a vendor and your product is affected, let us know.

CVSS Metrics

Group | Score | Vector
Base | N/A | N/A
Temporal | N/A | N/A
Environmental | N/A | N/A


  • <http://www.niscc.gov.uk/niscc/docs/al-20050524-00433.html>
  • <http://www.securityfocus.com/bid/1165>
  • <http://www.ciac.org/ciac/bulletins/l-015.shtml>
  • <http://secunia.com/advisories/15472/>
  • <http://www.cisco.com/warp/public/707/cisco-sn-20050524-dns.shtml>
  • <http://www.securityfocus.com/bid/13729>
  • <http://www.securitytracker.com/id?1014046>
  • <http://www.securitytracker.com/id?1014045>
  • <http://www.securitytracker.com/id?1014044>
  • <http://www.securitytracker.com/id?1014043>
  • <http://www.ethereal.com>
  • <http://www.tcpdump.org>


Thanks to Hugo Breton and scut@nb.in-berlin.de for reporting this vulnerability. Additional information for this issue was provided by the by the NISCC Vulnerability Management Team.

This document was written by the CERT Technical Staff.

Other Information

  • CVE IDs: CVE-2000-0333
  • Date Public: 30 May 99
  • Date First Published: 18 Jun 2001
  • Date Last Updated: 15 Nov 2005
  • Severity Metric: 41.92
  • Document Revision: 31