Operating System:

Published:

09 October 2002

Protect yourself against future threats.

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

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

                     ESB-2002.561 -- RHSA-2002:175-16
               Updated nss_ldap packages fix buffer overflow
                              09 October 2002

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

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

Product:                nss_ldap
Vendor:                 Red Hat
Operating System:       Red Hat Linux 6.2
                        Red Hat Linux 7.0
                        Red Hat Linux 7.1
                        Red Hat Linux 7.2
                        Red Hat Linux 7.3
Platform:               Alpha
                        i386
                        IA-64
                        SPARC
Impact:                 Execute Arbitrary Code/Commands
                        Denial of Service
Access Required:        Remote

Ref:                    ESB-2002.263

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

- ---------------------------------------------------------------------
                   Red Hat, Inc. Red Hat Security Advisory

Synopsis:          Updated nss_ldap packages fix buffer overflow
Advisory ID:       RHSA-2002:175-16
Issue date:        2002-08-12
Updated on:        2002-10-03
Product:           Red Hat Linux
Keywords:          nss_ldap dns automatic configuration MAXPACKET
Cross references:  
Obsoletes:         RHSA-2002:084
CVE Names:         CAN-2002-0825 CAN-2002-0374
- ---------------------------------------------------------------------

1. Topic:

Updated nss_ldap packages are now available for Red Hat Linux 6.2, 7, 7.1,
7.2, and 7.3. These updates fix a potential buffer overflow which can occur
when nss_ldap is set to configure itself using information stored in DNS,
a format string bug in logging functions used in pam_ldap, and to properly
handle truncated DNS responses.

2. Relevant releases/architectures:

Red Hat Linux 6.2 - alpha, i386, sparc
Red Hat Linux 7.0 - alpha, i386
Red Hat Linux 7.1 - alpha, i386, ia64
Red Hat Linux 7.2 - i386, ia64
Red Hat Linux 7.3 - i386

3. Problem description:

nss_ldap is a set of C library extensions that allow X.500 and LDAP
directory servers to be used as a primary source of aliases, ethers,
groups, hosts, networks, protocols, users, RPCs, services, and shadow
passwords (instead of or in addition to using flat files or NIS).

When versions of nss_ldap prior to nss_ldap-198 are configured without a
value for the "host" setting, nss_ldap will attempt to configure itself by
using SRV records stored in DNS.  When parsing the results of the DNS
query, nss_ldap does not check that the data returned by the server will
fit into an internal buffer, leaving it vulnerable to a buffer overflow.
The Common Vulnerabilities and Exposures project (cve.mitre.org) has
assigned the name CAN-2002-0825 to this issue.

When versions of nss_ldap prior to nss_ldap-199 are configured without a
value for the "host" setting, nss_ldap will attempt to configure itself by
using SRV records stored in DNS.  When parsing the results of the DNS
query, nss_ldap does not check that the data returned has not been
truncated by the resolver libraries to avoid a buffer overflow, and may
attempt to parse more data than is actually available, leaving it
vulnerable to a read buffer overflow.  

Versions of pam_ldap prior to version 144 include a format string bug in
the logging function. The packages included in this erratum update pam_ldap
to version 144, fixing this bug.  The Common Vulnerabilities and Exposures
project (cve.mitre.org) has assigned the name CAN-2002-0374 to this issue.

All users of nss_ldap should update to these errata packages which are not
vulnerable to the above issues. The errata packages are based on
nss_ldap-189 with the addition of a backported security patch and pam_ldap
version 144.

Thanks to the nss_ldap and pam_ldap team at padl.com for providing
information about these issues.

4. Solution:

Before applying this update, make sure all previously released errata
relevant to your system have been applied.

To update all RPMs for your particular architecture, run:

rpm -Fvh [filenames]

where [filenames] is a list of the RPMs you wish to upgrade.  Only those
RPMs which are currently installed will be updated.  Those RPMs which are
not installed but included in the list will not be updated.  Note that you
can also use wildcards (*.rpm) if your current directory *only* contains the
desired RPMs.

Please note that this update is also available via Red Hat Network.  Many
people find this an easier way to apply updates.  To use Red Hat Network,
launch the Red Hat Update Agent with the following command:

up2date

This will start an interactive process that will result in the appropriate
RPMs being upgraded on your system.

5. RPMs required:

Red Hat Linux 6.2:

SRPMS:
ftp://updates.redhat.com/6.2/en/os/SRPMS/nss_ldap-189-3.6.src.rpm

alpha:
ftp://updates.redhat.com/6.2/en/os/alpha/nss_ldap-189-3.6.alpha.rpm

i386:
ftp://updates.redhat.com/6.2/en/os/i386/nss_ldap-189-3.6.i386.rpm

sparc:
ftp://updates.redhat.com/6.2/en/os/sparc/nss_ldap-189-3.6.sparc.rpm

Red Hat Linux 7.0:

SRPMS:
ftp://updates.redhat.com/7.0/en/os/SRPMS/nss_ldap-189-3.7.src.rpm

alpha:
ftp://updates.redhat.com/7.0/en/os/alpha/nss_ldap-189-3.7.alpha.rpm

i386:
ftp://updates.redhat.com/7.0/en/os/i386/nss_ldap-189-3.7.i386.rpm

Red Hat Linux 7.1:

SRPMS:
ftp://updates.redhat.com/7.1/en/os/SRPMS/nss_ldap-189-3.7.src.rpm

alpha:
ftp://updates.redhat.com/7.1/en/os/alpha/nss_ldap-189-3.7.alpha.rpm

i386:
ftp://updates.redhat.com/7.1/en/os/i386/nss_ldap-189-3.7.i386.rpm

ia64:
ftp://updates.redhat.com/7.1/en/os/ia64/nss_ldap-189-3.7.ia64.rpm

Red Hat Linux 7.2:

SRPMS:
ftp://updates.redhat.com/7.2/en/os/SRPMS/nss_ldap-189-4.src.rpm

i386:
ftp://updates.redhat.com/7.2/en/os/i386/nss_ldap-189-4.i386.rpm

ia64:
ftp://updates.redhat.com/7.2/en/os/ia64/nss_ldap-189-4.ia64.rpm

Red Hat Linux 7.3:

SRPMS:
ftp://updates.redhat.com/7.3/en/os/SRPMS/nss_ldap-189-4.src.rpm

i386:
ftp://updates.redhat.com/7.3/en/os/i386/nss_ldap-189-4.i386.rpm



6. Verification:

MD5 sum                          Package Name
- --------------------------------------------------------------------------
2acbcd575035a1afcb9e74694a6b7b39 6.2/en/os/SRPMS/nss_ldap-189-3.6.src.rpm
1a670c4c2a343b26508aa04ae06d2306 6.2/en/os/alpha/nss_ldap-189-3.6.alpha.rpm
4069002846304df7840cbe81517f8b3d 6.2/en/os/i386/nss_ldap-189-3.6.i386.rpm
e26b1be702d0bf65f455e17d16844354 6.2/en/os/sparc/nss_ldap-189-3.6.sparc.rpm
9b44c5148cd1d3d688a9603f11a4d794 7.0/en/os/SRPMS/nss_ldap-189-3.7.src.rpm
2d245d41c6a27b62670a0e3cbc48e93b 7.0/en/os/alpha/nss_ldap-189-3.7.alpha.rpm
5c34d52cfa0425e8b3d0e63838729703 7.0/en/os/i386/nss_ldap-189-3.7.i386.rpm
9b44c5148cd1d3d688a9603f11a4d794 7.1/en/os/SRPMS/nss_ldap-189-3.7.src.rpm
2d245d41c6a27b62670a0e3cbc48e93b 7.1/en/os/alpha/nss_ldap-189-3.7.alpha.rpm
5c34d52cfa0425e8b3d0e63838729703 7.1/en/os/i386/nss_ldap-189-3.7.i386.rpm
27c07eb113adebc7d79d48d8c9df9356 7.1/en/os/ia64/nss_ldap-189-3.7.ia64.rpm
d421772f8f5bd985dc2c288aee729ff6 7.2/en/os/SRPMS/nss_ldap-189-4.src.rpm
8dc0d40503cbc09a55a111fc53ec42ba 7.2/en/os/i386/nss_ldap-189-4.i386.rpm
acd545a47e2be38ed8c9b94ea9801e4c 7.2/en/os/ia64/nss_ldap-189-4.ia64.rpm
d421772f8f5bd985dc2c288aee729ff6 7.3/en/os/SRPMS/nss_ldap-189-4.src.rpm
8dc0d40503cbc09a55a111fc53ec42ba 7.3/en/os/i386/nss_ldap-189-4.i386.rpm


These packages are GPG signed by Red Hat, Inc. for security.  Our key
is available at:
    http://www.redhat.com/about/contact/pgpkey.html

You can verify each package with the following command:
    rpm --checksig  <filename>

If you only wish to verify that each package has not been corrupted or
tampered with, examine only the md5sum with the following command:
    rpm --checksig --nogpg <filename>


7. References:

http://www.padl.com/Articles/PotentialBufferOverflowin.html
http://www.padl.com/OSS/pam_ldap.html
http://archives.neohapsis.com/archives/vulnwatch/2002-q2/0053.html
http://www.kb.cert.org/vuls/id/738331
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-0825
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-0374


Copyright(c) 2000, 2001, 2002 Red Hat, Inc.

- --------------------------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: ftp://ftp.auscert.org.au/pub/auscert/AUSCERT_PGP.key

iQCVAwUBPaR2eih9+71yA2DNAQHzpwP8CBt5mWUrXXZyj/b2PZGMecoG3xluIpSW
7kLG6ee374vbBKhJqRpgwEgLt6l0W/fC5vpbUfjzQmqx4YV5QM/UjgwFoWKVHt5F
cC0R3rYB86Qomqb+iSgH84kNv48AA2j4bHQRp0RsHkT/zO3SBcLMoW2m6UXvyzb/
GSe6SGOudX8=
=FGUR
-----END PGP SIGNATURE-----