copyright | disclaimer | privacy | contact  
Australia's Leading Computer Emergency Response Team
 
Search this site

 
On this site

 > HOME
 > About AusCERT
 > Membership
 > Contact Us
 > PKI Services
 > Training
 > Publications
 > Sec. Bulletins
 > Conferences
 > News & Media
 > Services
 > Web Log
 > Site Map
 > Site Help
 > Member login





 

ESB-2002.643 -- FreeBSD-SA-02:43.bind [REVISED] -- multiple vulnerabilities in BIND [REVISED]

Date: 18 November 2002
References: ESB-2002.636  

Click here for printable version
Click here for PGP verifiable version
-----BEGIN PGP SIGNED MESSAGE-----

===========================================================================
             AUSCERT External Security Bulletin Redistribution

              ESB-2002.643 -- FreeBSD-SA-02:43.bind [REVISED]
                multiple vulnerabilities in BIND [REVISED]
                             18 November 2002

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:                BIND 8
Vendor:                 FreeBSD
Operating System:       FreeBSD
Impact:                 Execute Arbitrary Code/Commands
                        Denial of Service
Access Required:        Remote

Ref:                    ESB-2002.636

- --------------------------BEGIN INCLUDED TEXT--------------------

- -----BEGIN PGP SIGNED MESSAGE-----

=============================================================================
FreeBSD-SA-02:43.bind                                       Security Advisory
                                                          The FreeBSD Project

Topic:          multiple vulnerabilities in BIND [REVISED]

Category:       core
Module:         bind
Announced:      2002-11-15
Credits:        ISS X-Force <xforce@iss.net>
Affects:        All released versions of FreeBSD
Corrected:      2002-11-14 05:15:15 UTC (RELENG_4)
                2002-11-14 02:05:57 UTC (RELENG_4_7)
                2002-11-14 03:18:41 UTC (RELENG_4_6)
                2002-11-14 04:05:12 UTC (RELENG_4_5)
                2002-11-14 05:11:57 UTC (RELENG_4_4)
FreeBSD only:   NO

0.   Revision History

v1.0  2002-11-14  Initial release.
v1.1  2002-11-15  Correct patch instructions.  Clarify workaround.
                      Add CVE references.

I.   Background

BIND 8 is an implementation of the Domain Name System (DNS) protocols.

II.  Problem Description

ISS X-Force has disclosed several vulnerabilities affecting BIND 8.
The names which ISS has given each vulnerability are used in this
advisory.  The first is a buffer overflow in the BIND 8 code
responsible for creating DNS responses which include SIG resource
records (RRs) from its internal cache (`BIND SIG Cached RR Overflow
Vulnerability').  The second is an error in the BIND 8 code which
constructs a response to an EDNS query (i.e. a query containing OPT
RRs) with a large packet size.  A miscalculation triggers an assertion
failure (`BIND OPT DoS').  The third is a problem in the verification
of SIG RR expiry times, which can result in a null pointer dereference
(`BIND SIG Expiry Time DoS').

III. Impact

BIND SIG Cached RR Overflow Vulnerability:  A remote attacker may be
able to cause a name server with recursion enabled to execute
arbitrary code with the privileges of the name server process.

BIND OPT DoS and BIND SIG Expiry Time DoS: A remote attacker may be
able to cause the name server process to crash.

IV.  Workaround

BIND 9 is not affected by these vulnerabilities.  For those who have
the option, upgrading to BIND 9 is recommended.  BIND 9 is available
in the FreeBSD Ports Collection (ports/net/bind9).  The bind9 port
includes migration notes in /usr/local/share/doc/bind9/misc/migration.

Name servers with recursion disabled are not vulnerable to the `BIND
SIG Cached RR Overflow Vulnerability' nor to the `BIND SIG Expiry Time
DoS'.  To disable recursion, edit the BIND 8 configuration file
(default path /etc/namedb/named.conf) to add `recursion no;' and
`fetch-glue no;' to the options statement.  e.g.,

   options {
       recursion no;
       fetch-glue no;
       /* ... other options ... */
   };

Restart the name server after editing the configuration file.
NOTE: This workaround is only appropriate for name servers
which are authoritative only.  Caching name servers will no longer
function correctly if recursion is disabled.

Restricting recursion to only your own organization's clients (by
means of the `allow-recursion' directive) limits, but does not
eliminate, the impact of these vulnerabilities by making them harder
to exploit.  Restricting recursion in this fashion is generally
recommended.  To restrict recursion, edit the BIND 8 configuration
file to include an `allow-recursion' statement and an address list
appropriate for your organization.  e.g.,

    options {
        allow-recursion { 10.0.0.0/8; };
        /* ... other options ... */
    };

Running BIND 8 as a non-privileged user (rather than as the superuser)
may reduce the impact should the name server be compromised via the
`BIND SIG Cached RR Overflow Vulnerability'.  Running as a
non-privileged user is generally recommended.  Likewise, running BIND
8 in a chroot environment may reduce the impact and is generally
recommended.

V.  Solution

Do one of the following:

1) Upgrade your vulnerable system to 4.7-STABLE; or to the RELENG_4_7,
RELENG_4_6, RELENG_4_5, or RELENG_4_4 security branch dated after the
correction date (4.7-RELEASE-p2, 4.6.2-RELEASE-p5, 4.5-RELEASE-p23,
4.4-RELEASE-p30).

2) To patch your present system:

The following patch has been verified to apply to FreeBSD 4.4, 4.5,
4.6, and 4.7 systems.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:43/bind.patch
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:43/bind.patch.asc

b) Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch
# cd /usr/src/lib/libbind
# make depend && make
# cd /usr/src/lib/libisc
# make depend && make
# cd /usr/src/usr.sbin/named
# make depend && make && make install
# cd /usr/src/libexec/named-xfer
# make depend && make && make install

After upgrading or patching your system, you must restart named.
Execute the following command as root:

# ndc restart

VI.  Correction details

Path                                                             Revision
  Branch
- - -------------------------------------------------------------------------
src/contrib/bind/CHANGES
  RELENG_4                                                    1.1.1.7.2.8
  RELENG_4_7                                              1.1.1.7.2.7.2.1
  RELENG_4_6                                              1.1.1.7.2.6.2.2
  RELENG_4_5                                              1.1.1.7.2.4.4.2
  RELENG_4_4                                              1.1.1.7.2.4.2.2
src/contrib/bind/bin/named/db_defs.h
  RELENG_4                                                    1.1.1.2.2.6
  RELENG_4_7                                              1.1.1.2.2.5.2.1
  RELENG_4_6                                              1.1.1.2.2.4.2.2
  RELENG_4_5                                              1.1.1.2.2.3.4.2
  RELENG_4_4                                              1.1.1.2.2.3.2.2
src/contrib/bind/bin/named/db_sec.c
  RELENG_4                                                    1.1.1.1.4.4
  RELENG_4_7                                              1.1.1.1.4.3.4.1
  RELENG_4_6                                              1.1.1.1.4.3.2.1
  RELENG_4_5                                              1.1.1.1.4.2.6.2
  RELENG_4_4                                              1.1.1.1.4.2.4.2
src/contrib/bind/bin/named/ns_defs.h
  RELENG_4                                                    1.1.1.3.2.7
  RELENG_4_7                                              1.1.1.3.2.6.2.1
  RELENG_4_6                                              1.1.1.3.2.5.2.2
  RELENG_4_5                                              1.1.1.3.2.3.4.2
  RELENG_4_4                                              1.1.1.3.2.3.2.2
src/contrib/bind/bin/named/ns_ncache.c
  RELENG_4                                                    1.1.1.2.2.3
  RELENG_4_7                                              1.1.1.2.2.2.4.1
  RELENG_4_6                                              1.1.1.2.2.2.2.1
  RELENG_4_5                                              1.1.1.2.2.1.6.2
  RELENG_4_4                                              1.1.1.2.2.1.4.2
src/contrib/bind/bin/named/ns_req.c
  RELENG_4                                                   1.1.1.2.2.11
  RELENG_4_7                                             1.1.1.2.2.10.2.1
  RELENG_4_6                                              1.1.1.2.2.9.2.2
  RELENG_4_5                                              1.1.1.2.2.7.4.2
  RELENG_4_4                                              1.1.1.2.2.7.2.2
src/contrib/bind/bin/named/ns_resp.c
  RELENG_4                                                    1.1.1.2.2.8
  RELENG_4_7                                              1.1.1.2.2.7.2.1
  RELENG_4_6                                              1.1.1.2.2.6.2.2
  RELENG_4_5                                              1.1.1.2.2.4.4.2
  RELENG_4_4                                              1.1.1.2.2.4.2.2
src/contrib/bind/lib/nameser/ns_name.c
  RELENG_4                                                    1.1.1.2.2.4
  RELENG_4_7                                              1.1.1.2.2.3.2.1
  RELENG_4_6                                              1.1.1.2.2.2.2.2
  RELENG_4_5                                              1.1.1.2.2.1.6.2
  RELENG_4_4                                              1.1.1.2.2.1.4.2
src/contrib/bind/lib/nameser/ns_samedomain.c
  RELENG_4                                                    1.1.1.1.4.1
  RELENG_4_7                                                 1.1.1.1.14.1
  RELENG_4_6                                                 1.1.1.1.12.1
  RELENG_4_5                                                 1.1.1.1.10.1
  RELENG_4_4                                                  1.1.1.1.8.1
src/sys/conf/newvers.sh
  RELENG_4_7                                                1.44.2.26.2.4
  RELENG_4_6                                               1.44.2.23.2.22
  RELENG_4_5                                               1.44.2.20.2.24
  RELENG_4_4                                               1.44.2.17.2.29
- - -------------------------------------------------------------------------

VII. References

<URL:http://bvlive01.iss.net/issEn/delivery/xforce/alertdetail.jsp?oid=21469>
<URL:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-1219>
<URL:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-1220>
<URL:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-1221>
<URL:http://www.isc.org/products/BIND/bind-security.html>
<URL:http://www.isc.org/products/BIND/patches/>
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iQCVAwUBPdT59FUuHi5z0oilAQEQaAP+O167paqmU92KUMlxKIcjhJeV0eIQST5Y
X3K9VaKBrfE0TCMjJd8j5QnPlRkjPVy8A4wEFrZpEp1Ah94ns8JjyEoiluyA0TFF
Fx6EXnUw5rtOpyKqmdL7FPFSwcJTcv3Zs1eEsaQvRc3E9ygF6e9TJCCayfxB7qMn
SECyOVkopuA=
=9Y+6
- -----END PGP SIGNATURE-----

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content.  The decision to use any or all of this information is
the responsibility of each user or organisation, and should be done so in
accordance with site policies and procedures.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the original authors to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/Information/advisories.html

If you believe that your system has been compromised, contact AusCERT or
your representative in FIRST (Forum of Incident Response and Security
Teams).

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business 
                hours which are GMT+10:00 (AEST).  On call after hours 
                for member emergencies only.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: http://www.auscert.org.au/render.html?it=1967

iQCVAwUBPdjKNyh9+71yA2DNAQHY6AP/WbphLOc0CYQNGdyZcqPcfMT018vmI4OL
o4sFpVhytGJLRK8HCIDUvKCf96uS3PmMUaCIMYPqBMyEnzn673yjwG1rnxKNJKQo
SGe7qzbUGcanKPXewOHKYFOfaRWM8Dwop2nezzizU+Og25GA1VFkD23QLCaywY2T
7dkt6Fnb1m8=
=R4Z2
-----END PGP SIGNATURE-----