SkipNavigation
US-CERT
American Flag
  Vulnerability
Notes
Database

Search Vulnerability Notes

Vulnerability Notes Help Information


 
 View Notes By
  Name

ID Number

CVE Name

Date Public

Date Published

Date Updated

Severity Metric



 Other Documents
  Technical Alerts

Technical Bulletins

Alerts

Security Tips

 

Vulnerability Note VU#738331

Domain Name System (DNS) resolver libraries vulnerable to read buffer overflow

Overview

DNS stub resolvers from multiple vendors contain a buffer overflow vulnerability. The impact of this vulnerability appears to be limited to denial of service.

I. Description

A read buffer overflow vulnerability exists in BIND 4 and BIND 8.2.x stub resolver libraries. Other resolver libraries derived from BIND 4 are also affected, including BSD libc, GNU/Linux glibc, and System 5 UNIX libresolv. This vulnerability is similar in scope to VU#803539 and VU#542971, which are referenced by CERT Advisory CA-2002-19.

The name server itself, named, is not affected. The vulnerability exists in DNS stub resolver libraries that are used by network applications to obtain host or network information, typically host names and IP addresses. For example, when a web browser attempts to access http://www.cert.org/, it calls functions in a DNS stub resolver library in order to determine an IP address for www.cert.org.

Within the DNS resolver library, a buffer size value that is smaller than the maximum size of a potential DNS response is passed to the functions that perform DNS resolution. If a response is encountered that is larger than the allocated buffer, the response is truncated and returned to the calling function, along with the amount of buffer space that would be required to handle the entire response. The calling function may use this value for the size of the buffer and read beyond the end of the actual DNS response. In some cases, unmapped memory may be read, which typically causes the calling application to crash. In other cases, mapped memory may be read, and the contents included in the DNS response, which the calling application typically handles as a malformed response.

Applications that call DNS resolution functions directly may also be vulnerable, depending on how those applications handle the returned buffer size value. MIT Kerberos 5, KTH Heimdal Kerberos, nss_ldap, and fetchmail are known to be affected.

Quoting from the ISC advisory:

    When looking up address (gethostbyname(), gethostbyaddr() etc.) a less than maximum sized buffer is passed to res_search() / res_query(). If the answer is too large to fit in the buffer the size of buffer required is returned along with the part of the message that will fit. This value is not checked and is passed to getanswer which then may read past the end of the buffer depending up the contents in the answer section.

II. Impact

An attacker who is able to send DNS responses to a vulnerable system could cause a denial of service, crashing the application that made calls to a vulnerable resolver library. It does not appear that this vulnerability can be leveraged to execute arbitrary code. There may be some risk of information disclosure if a vulnerable system returns the contents of memory adjacent to a DNS response.

III. Solution

Patch or Upgrade

Apply a patch or upgrade as specified by your vendor. In the case of statically linked binaries, it is necessary to recompile using the patched version of the DNS stub resolver libraries. ISC has provided the following guidance for applications that call DNS resolution functions directly:

    For application writers. Use a maximum sized buffer (64k), be prepared to redo the calls res_search(), res_query(), res_send(), res_nsearch(), res_nquery() and res_send() with a bigger buffer or take the minimum of the answer buffer size and the value returned by these calls and be aware that the answer is truncated.
Local Caching DNS Server Not Effective

A local caching DNS server will not prevent malicious responses from reaching vulnerable client resolvers.

Systems Affected

VendorStatusDate Updated
3ComUnknown1-Oct-2002
AlcatelUnknown1-Oct-2002
Apple Computer Inc.Not Vulnerable23-Aug-2002
AT&TUnknown3-Oct-2002
BlueCat NetworksUnknown3-Oct-2002
Check PointUnknown15-Apr-2003
Cisco Systems Inc.Unknown1-Oct-2002
Computer AssociatesNot Vulnerable1-Oct-2002
ConectivaVulnerable8-Nov-2002
Cray Inc.Unknown1-Oct-2002
Data GeneralUnknown24-Sep-2002
DebianVulnerable8-Nov-2002
djbdnsNot Vulnerable1-Oct-2002
F5 NetworksUnknown3-Oct-2002
FetchmailVulnerable18-Oct-2002
FreeBSDVulnerable13-Nov-2002
FujitsuVulnerable16-Oct-2002
GNU adnsNot Vulnerable3-Oct-2002
GNU glibcVulnerable16-Oct-2002
Guardian Digital Inc. Vulnerable10-Oct-2002
Hewlett-Packard CompanyVulnerable15-Apr-2003
HitachiVulnerable8-Nov-2002
IBMVulnerable16-Oct-2002
InfobloxUnknown1-Oct-2002
IntelUnknown3-Oct-2002
ISCVulnerable16-Oct-2002
Juniper NetworksVulnerable16-Oct-2002
KAME ProjectVulnerable1-Oct-2002
KTH KerberosUnknown24-Aug-2002
Lotus SoftwareUnknown3-Oct-2002
Lucent TechnologiesNot Vulnerable21-Aug-2002
MandrakeSoftVulnerable8-Nov-2002
MetaSolv Software Inc.Vulnerable1-Oct-2002
Microsoft CorporationNot Vulnerable23-Aug-2002
MIT Kerberos Development TeamVulnerable16-Oct-2002
NEC CorporationUnknown16-Oct-2002
NetBSDVulnerable10-Oct-2002
Network ApplianceUnknown3-Oct-2002
NixuNot Vulnerable14-Oct-2002
NominumUnknown1-Oct-2002
Nortel NetworksVulnerable8-Nov-2002
OpenBSDUnknown15-Aug-2002
OpenLDAPUnknown24-Aug-2002
Openwall GNU/*/LinuxVulnerable16-Oct-2002
Oracle CorporationUnknown1-Oct-2002
Red Hat Inc.Vulnerable8-Nov-2002
Secure Computing CorporationNot Vulnerable16-Oct-2002
SendmailUnknown3-Oct-2002
SequentUnknown3-Oct-2002
SGINot Vulnerable23-Aug-2002
Sony CorporationUnknown3-Oct-2002
Sun Microsystems Inc.Vulnerable8-Nov-2002
SuSE Inc.Vulnerable25-Oct-2002
The SCO GroupUnknown24-Sep-2002
Unisphere NetworksUnknown3-Oct-2002
UnisysUnknown3-Oct-2002
Wind River Systems Inc.Unknown15-Aug-2002
Xerox CorporationVulnerable15-Apr-2003

References

VU#803539, VU#542971, CA-2002-19

Credit

The CERT/CC thanks Mark Andrews of ISC for reporting this vulnerability.

This document was written by Art Manion.

Other Information

Date Public10/01/2002
Date First Published10/01/2002 06:03:45 PM
Date Last Updated04/15/2003
CERT Advisory 
CVE NameCAN-2002-1146
US-CERT Technical Alerts 
Metric19.04
Document Revision40

If you have feedback, comments, or additional information about this vulnerability, please send us email.
 

 
Page Corner Image
Copyright 2002 Carnegie Mellon University
Disclaimers and copyright information
Get Adobe Reader Get Adobe Reader