J-Security Center

Title: ISC Bind 4 nslookupComplain() Format String Vulnerability

Severity: CRITICAL

Description:

BIND is a server program that implements the domain name service protocol. It is in extremely wide use on the Internet, currently being used by most Internet DNS servers.

Version 4 of BIND contains a format string vulnerability that may be exploitable by attackers to gain root access remotely.

When BIND 4 nameservers recieve a query for a hostname, the first thing that happens is that their own zone files and caches are checked for records that match requested address/hostname. If the hostname cannot be resolved through these local means, BIND obtains the nameservers that are responsible for the host's domain.

Once it has the proper NS records, BIND calls nslookup() to obtain the IP addresses of these nameservers. The nslookup() function checks each nameserver IP address for validity. If it is invalid (ie, 0.0.0.0, 255.255.255.255 or a multicast address), it calls nslookupComplain()to log the error to syslog.

A condition exists in the nslookupComplain() function that may allow a remote attacker to overwrite arbitrary locations in memory with almost arbitrary values. This is due to passing syslog() a string containing attacker-supplied input (nameserver hostname) as its format string argument. Any format specifiers that are within the hostname will be acted upon by the *printf() function used by syslog().

If an attacker utilizes certain format specifiers, arbitrary locations in memory can be overwritten. An attacker may, for example, overwrite a function return address with a value pointing to shellcode in memory.

It may require that the attacker use more than one malicious DNS server to build a fully qualified domain name long enough to contain the format specifiers.

It should be noted that this may not be exploitable due to restrictions on characters in domain names.

Affected Products:

  • HP HP-UX 10.10.0
  • HP HP-UX 10.20.0
  • HP HP-UX 10.24.0
  • HP HP-UX 11.0.0
  • HP HP-UX 11.0.0 4
  • ISC BIND 4.9.0
  • ISC BIND 4.9.3
  • ISC BIND 4.9.4
  • ISC BIND 4.9.5
  • ISC BIND 4.9.5P1
  • ISC BIND 4.9.6
  • ISC BIND 4.9.7
  • ISC BIND 4.9.7-T1B
  • ISC BIND 8.2.0

References:

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.