ID CVE-2007-5794
Summary Race condition in nss_ldap, when used in applications that are linked against the pthread library and fork after a call to nss_ldap, might send user data to the wrong process because of improper handling of the LDAP connection. NOTE: this issue was originally reported for Dovecot with the wrong mailboxes being returned, but other applications might also be affected.
References
Vulnerable Configurations
  • cpe:2.3:a:nss_ldap:nss_ldap
    cpe:2.3:a:nss_ldap:nss_ldap
CVSS
Base: 4.3 (as of 14-11-2007 - 11:05)
Impact:
Exploitability:
CWE CWE-362
CAPEC
  • Leveraging Race Conditions
    This attack targets a race condition occurring when multiple processes access and manipulate the same resource concurrently and the outcome of the execution depends on the particular order in which the access takes place. The attacker can leverage a race condition by "running the race", modifying the resource and modifying the normal execution flow. For instance a race condition can occur while accessing a file, the attacker can trick the system by replacing the original file with his version and cause the system to read the malicious file.
  • Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions
    This attack targets a race condition occurring between the time of check (state) for a resource and the time of use of a resource. The typical example is the file access. The attacker can leverage a file access race condition by "running the race", meaning that he would modify the resource between the first time the target program accesses the file and the time the target program uses the file. During that period of time, the attacker could do something such as replace the file and cause an escalation of privilege.
Access
VectorComplexityAuthentication
NETWORK MEDIUM NONE
Impact
ConfidentialityIntegrityAvailability
PARTIAL NONE NONE
nessus via4
  • NASL family SuSE Local Security Checks
    NASL id SUSE_NSS_LDAP-4781.NASL
    description nss_ldap returned incorrect data under certain circumstances to the calling process. Some applications could therefore work with wrong user data. (CVE-2007-5794)
    last seen 2019-02-21
    modified 2012-05-17
    plugin id 30197
    published 2008-02-06
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=30197
    title SuSE 10 Security Update : nss_ldap (ZYPP Patch Number 4781)
  • NASL family Scientific Linux Local Security Checks
    NASL id SL_20080724_NSS_LDAP_ON_SL4_X.NASL
    description A race condition was discovered in nss_ldap, which affected certain applications that make LDAP connections, such as Dovecot. This could cause nss_ldap to answer a request for information about one user with the information about a different user. (CVE-2007-5794) As well, this updated package fixes the following bugs : - in certain situations, on Itanium(R) architectures, when an application performed an LDAP lookup for a highly populated group, for example, containing more than 150 members, the application crashed, or may have caused a segmentation fault. As well, this issue may have caused commands, such as 'ls', to return a 'ber_free_buf: Assertion' error. - when an application enumerated members of a netgroup, the nss_ldap module returned a successful status result and the netgroup name, even when the netgroup did not exist. This behavior was not consistent with other modules. In this updated package, nss_ldap no longer returns a successful status when the netgroup does not exist. - in master and slave server environments, with systems that were configured to use a read-only directory server, if user log in attempts were denied because their passwords had expired, and users attempted to immediately change their passwords, the replication server returned an LDAP referral, instructing the pam_ldap module to resissue its request to a different server; however, the pam_ldap module failed to do so. In these situations, an error such as the following occurred : LDAP password information update failed: Can't contact LDAP server Insufficient 'write' privilege to the 'userPassword' attribute of entry [entry] In this updated package, password changes are allowed when binding against a slave server, which resolves this issue. - when a system used a directory server for naming information, and 'nss_initgroups_ignoreusers root' was configured in '/etc/ldap.conf', dbus-daemon-1 would hang. Running the 'service messagebus start' command did not start the service, and it did not fail, which would stop the boot process if it was not cancelled. As well, this updated package upgrades nss_ldap to the version as shipped with Scientific Linux 5.
    last seen 2019-02-21
    modified 2019-01-07
    plugin id 60452
    published 2012-08-01
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=60452
    title Scientific Linux Security Update : nss_ldap on SL4.x i386/x86_64
  • NASL family SuSE Local Security Checks
    NASL id SUSE_NSS_LDAP-4773.NASL
    description nss_ldap returned incorrect data under certain circumstances to the calling process. Some applications could therefore work with wrong user data (CVE-2007-5794).
    last seen 2019-02-21
    modified 2018-07-19
    plugin id 30196
    published 2008-02-06
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=30196
    title openSUSE 10 Security Update : nss_ldap (nss_ldap-4773)
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DSA-1430.NASL
    description It was reported that a race condition exists in libnss-ldap, an NSS module for using LDAP as a naming service, which could cause denial of service attacks if applications use pthreads. This problem was spotted in the dovecot IMAP/POP server but potentially affects more programs.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 29338
    published 2007-12-12
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=29338
    title Debian DSA-1430-1 : libnss-ldap - denial of service
  • NASL family Red Hat Local Security Checks
    NASL id REDHAT-RHSA-2008-0389.NASL
    description An updated nss_ldap package that fixes a security issue and several bugs is now available. This update has been rated as having low security impact by the Red Hat Security Response Team. The nss_ldap package contains the nss_ldap and pam_ldap modules. The nss_ldap module is a plug-in which allows applications to retrieve information about users and groups from a directory server. The pam_ldap module allows PAM-aware applications to use a directory server to verify user passwords. A race condition was discovered in nss_ldap which affected certain applications which make LDAP connections, such as Dovecot. This could cause nss_ldap to answer a request for information about one user with information about a different user. (CVE-2007-5794) In addition, these updated packages fix the following bugs : * a build error prevented the nss_ldap module from being able to use DNS to discover the location of a directory server. For example, when the /etc/nsswitch.conf configuration file was configured to use 'ldap', but no 'host' or 'uri' option was configured in the /etc/ldap.conf configuration file, no directory server was contacted, and no results were returned. * the 'port' option in the /etc/ldap.conf configuration file on client machines was ignored. For example, if a directory server which you were attempting to use was listening on a non-default port (i.e. not ports 389 or 636), it was only possible to use that directory server by including the port number in the 'uri' option. In this updated package, the 'port' option works as expected. * pam_ldap failed to change an expired password if it had to follow a referral to do so, which could occur, for example, when using a slave directory server in a replicated environment. An error such as the following occurred after entering a new password: 'LDAP password information update failed: Can't contact LDAP server Insufficient 'write' privilege to the 'userPassword' attribute' This has been resolved in this updated package. * when the 'pam_password exop_send_old' password-change method was configured in the /etc/ldap.conf configuration file, a logic error in the pam_ldap module caused client machines to attempt to change a user's password twice. First, the pam_ldap module attempted to change the password using the 'exop' request, and then again using an LDAP modify request. * on Red Hat Enterprise Linux 5.1, rebuilding nss_ldap-253-5.el5 when the krb5-*-1.6.1-17.el5 packages were installed failed due to an error such as the following : + /builddir/build/SOURCES/dlopen.sh ./nss_ldap-253/nss_ldap.so dlopen() of '././nss_ldap-253/nss_ldap.so' failed: ./././nss_ldap-253/nss_ldap.so: undefined symbol: request_key error: Bad exit status from /var/tmp/rpm-tmp.62652 (%build) The missing libraries have been added, which resolves this issue. When recursively enumerating the set of members in a given group, the module would allocate insufficient space for storing the set of member names if the group itself contained other groups, thus corrupting the heap. This update includes a backported fix for this bug. Users of nss_ldap should upgrade to these updated packages, which contain backported patches to correct this issue and fix these bugs.
    last seen 2019-02-21
    modified 2019-01-02
    plugin id 32426
    published 2008-05-22
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=32426
    title RHEL 5 : nss_ldap (RHSA-2008:0389)
  • NASL family Mandriva Local Security Checks
    NASL id MANDRIVA_MDVSA-2008-049.NASL
    description A race condition in nss_ldap, when used in applications that use pthread and fork after a call to nss_ldap, does not properly handle the LDAP connection, which might cause nss_ldap to return the wrong user data to the wrong process, giving one user access to data belonging to another user, in some cases. The updated package hais been patched to prevent this issue.
    last seen 2019-02-21
    modified 2018-12-05
    plugin id 37403
    published 2009-04-23
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=37403
    title Mandriva Linux Security Advisory : nss_ldap (MDVSA-2008:049)
  • NASL family Scientific Linux Local Security Checks
    NASL id SL_20080521_NSS_LDAP_ON_SL5_X.NASL
    description A race condition was discovered in nss_ldap which affected certain applications which make LDAP connections, such as Dovecot. This could cause nss_ldap to answer a request for information about one user with information about a different user. (CVE-2007-5794) In addition, these updated packages fix the following bugs : - a build error prevented the nss_ldap module from being able to use DNS to discover the location of a directory server. For example, when the /etc/nsswitch.conf configuration file was configured to use 'ldap', but no 'host' or 'uri' option was configured in the /etc/ldap.conf configuration file, no directory server was contacted, and no results were returned. - the 'port' option in the /etc/ldap.conf configuration file on client machines was ignored. For example, if a directory server which you were attempting to use was listening on a non-default port (i.e. not ports 389 or 636), it was only possible to use that directory server by including the port number in the 'uri' option. In this updated package, the 'port' option works as expected. - pam_ldap failed to change an expired password if it had to follow a referral to do so, which could occur, for example, when using a slave directory server in a replicated environment. An error such as the following occurred after entering a new password: 'LDAP password information update failed: Can't contact LDAP server Insufficient 'write' privilege to the 'userPassword' attribute' This has been resolved in this updated package. - when the 'pam_password exop_send_old' password-change method was configured in the /etc/ldap.conf configuration file, a logic error in the pam_ldap module caused client machines to attempt to change a user's password twice. First, the pam_ldap module attempted to change the password using the 'exop' request, and then again using an LDAP modify request. - on Red Hat Enterprise Linux 5.1, rebuilding nss_ldap-253-5.el5 when the krb5-*-1.6.1-17.el5 packages were installed failed due to an error such as the following : - /builddir/build/SOURCES/dlopen.sh ./nss_ldap-253/nss_ldap.so dlopen() of '././nss_ldap-253/nss_ldap.so' failed: ./././nss_ldap-253/nss_ldap.so: undefined symbol: request_key error: Bad exit status from /var/tmp/rpm-tmp.62652 (%build) The missing libraries have been added, which resolves this issue. When recursively enumerating the set of members in a given group, the module would allocate insufficient space for storing the set of member names if the group itself contained other groups, thus corrupting the heap. This update includes a backported fix for this bug.
    last seen 2019-02-21
    modified 2019-01-07
    plugin id 60407
    published 2012-08-01
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=60407
    title Scientific Linux Security Update : nss_ldap on SL5.x i386/x86_64
  • NASL family Gentoo Local Security Checks
    NASL id GENTOO_GLSA-200711-33.NASL
    description The remote host is affected by the vulnerability described in GLSA-200711-33 (nss_ldap: Information disclosure) Josh Burley reported that nss_ldap does not properly handle the LDAP connections due to a race condition that can be triggered by multi-threaded applications using nss_ldap, which might lead to requested data being returned to a wrong process. Impact : Remote attackers could exploit this race condition by sending queries to a vulnerable server using nss_ldap, possibly leading to theft of user credentials or information disclosure (e.g. Dovecot returning wrong mailbox contents). Workaround : There is no known workaround at this time.
    last seen 2019-02-21
    modified 2018-07-11
    plugin id 28322
    published 2007-11-26
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=28322
    title GLSA-200711-33 : nss_ldap: Information disclosure
  • NASL family Red Hat Local Security Checks
    NASL id REDHAT-RHSA-2008-0715.NASL
    description An updated nss_ldap package that fixes a security issue and several bugs is now available. This update has been rated as having low security impact by the Red Hat Security Response Team. The nss_ldap package contains the nss_ldap and pam_ldap modules. The nss_ldap module is a plug-in which allows applications to retrieve information about users and groups from a directory server. The pam_ldap module allows PAM-aware applications to use a directory server to verify user passwords. A race condition was discovered in nss_ldap, which affected certain applications that make LDAP connections, such as Dovecot. This could cause nss_ldap to answer a request for information about one user with the information about a different user. (CVE-2007-5794) As well, this updated package fixes the following bugs : * in certain situations, on Itanium(R) architectures, when an application performed an LDAP lookup for a highly populated group, for example, containing more than 150 members, the application crashed, or may have caused a segmentation fault. As well, this issue may have caused commands, such as 'ls', to return a 'ber_free_buf: Assertion' error. * when an application enumerated members of a netgroup, the nss_ldap module returned a successful status result and the netgroup name, even when the netgroup did not exist. This behavior was not consistent with other modules. In this updated package, nss_ldap no longer returns a successful status when the netgroup does not exist. * in master and slave server environments, with systems that were configured to use a read-only directory server, if user log in attempts were denied because their passwords had expired, and users attempted to immediately change their passwords, the replication server returned an LDAP referral, instructing the pam_ldap module to resissue its request to a different server; however, the pam_ldap module failed to do so. In these situations, an error such as the following occurred : LDAP password information update failed: Can't contact LDAP server Insufficient 'write' privilege to the 'userPassword' attribute of entry [entry] In this updated package, password changes are allowed when binding against a slave server, which resolves this issue. * when a system used a directory server for naming information, and 'nss_initgroups_ignoreusers root' was configured in '/etc/ldap.conf', dbus-daemon-1 would hang. Running the 'service messagebus start' command did not start the service, and it did not fail, which would stop the boot process if it was not cancelled. As well, this updated package upgrades nss_ldap to the version as shipped with Red Hat Enterprise Linux 5. Users of nss_ldap are advised to upgrade to this updated package, which resolves these issues.
    last seen 2019-02-21
    modified 2019-01-02
    plugin id 33583
    published 2008-07-25
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=33583
    title RHEL 4 : nss_ldap (RHSA-2008:0715)
oval via4
accepted 2013-04-29T04:07:11.908-04:00
class vulnerability
contributors
  • name Aharon Chernin
    organization SCAP.com, LLC
  • name Dragos Prisaca
    organization G2, Inc.
definition_extensions
  • comment The operating system installed on the system is Red Hat Enterprise Linux 4
    oval oval:org.mitre.oval:def:11831
  • comment CentOS Linux 4.x
    oval oval:org.mitre.oval:def:16636
  • comment Oracle Linux 4.x
    oval oval:org.mitre.oval:def:15990
  • comment The operating system installed on the system is Red Hat Enterprise Linux 5
    oval oval:org.mitre.oval:def:11414
  • comment The operating system installed on the system is CentOS Linux 5.x
    oval oval:org.mitre.oval:def:15802
  • comment Oracle Linux 5.x
    oval oval:org.mitre.oval:def:15459
description Race condition in nss_ldap, when used in applications that are linked against the pthread library and fork after a call to nss_ldap, might send user data to the wrong process because of improper handling of the LDAP connection. NOTE: this issue was originally reported for Dovecot with the wrong mailboxes being returned, but other applications might also be affected.
family unix
id oval:org.mitre.oval:def:10625
status accepted
submitted 2010-07-09T03:56:16-04:00
title Race condition in nss_ldap, when used in applications that are linked against the pthread library and fork after a call to nss_ldap, might send user data to the wrong process because of improper handling of the LDAP connection. NOTE: this issue was originally reported for Dovecot with the wrong mailboxes being returned, but other applications might also be affected.
version 24
redhat via4
advisories
  • bugzilla
    id 427370
    title RHEL 5.1 nss_ldap does not build with RHEL 5.1 krb5 packages
    oval
    AND
    • comment Red Hat Enterprise Linux 5 is installed
      oval oval:com.redhat.rhsa:tst:20070055001
    • comment nss_ldap is earlier than 0:253-12.el5
      oval oval:com.redhat.rhsa:tst:20080389002
    • comment nss_ldap is signed with Red Hat redhatrelease key
      oval oval:com.redhat.rhsa:tst:20080389003
    rhsa
    id RHSA-2008:0389
    released 2008-05-20
    severity Low
    title RHSA-2008:0389: nss_ldap security and bug fix update (Low)
  • bugzilla
    id 429101
    title dbus-daemon-1 hangs when using the option nss_initgroups_ignoreusers in /etc/ldap.conf with the user root
    oval
    AND
    • comment Red Hat Enterprise Linux 4 is installed
      oval oval:com.redhat.rhsa:tst:20060016001
    • comment nss_ldap is earlier than 0:253-5.el4
      oval oval:com.redhat.rhsa:tst:20080715002
    • comment nss_ldap is signed with Red Hat master key
      oval oval:com.redhat.rhsa:tst:20060719003
    rhsa
    id RHSA-2008:0715
    released 2008-07-24
    severity Low
    title RHSA-2008:0715: nss_ldap security and bug fix update (Low)
rpms
  • nss_ldap-0:253-12.el5
  • nss_ldap-0:253-5.el4
refmap via4
bid 26452
bugtraq 20080212 FLEA-2008-0003-1 nss_ldap
confirm
debian DSA-1430
gentoo GLSA-200711-33
mandriva MDVSA-2008:049
mlist
  • [Dovecot] 20050303 hanging imap... and users getting other users' emails!
  • [Dovecot] 20050409 Authentication and the wrong mailbox?
sectrack 1020088
secunia
  • 27670
  • 27768
  • 27839
  • 28061
  • 28838
  • 29083
  • 30352
  • 31227
  • 31524
suse SUSE-SR:2008:003
xf nssldap-ldap-race-condition(38505)
Last major update 10-08-2011 - 00:00
Published 13-11-2007 - 18:46
Last modified 15-10-2018 - 17:46
Back to Top