Vulnerabilities > CVE-2007-5794 - Race Condition vulnerability in NSS Ldap NSS Ldap
Attack vector
NETWORK Attack complexity
MEDIUM Privileges required
NONE Confidentiality impact
PARTIAL Integrity impact
NONE Availability impact
NONE 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.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 1 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (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.
Nessus
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 last seen 2020-06-01 modified 2020-06-02 plugin id 60407 published 2012-08-01 reporter This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/60407 title Scientific Linux Security Update : nss_ldap on SL5.x i386/x86_64 code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text is (C) Scientific Linux. # include("compat.inc"); if (description) { script_id(60407); script_version("1.5"); script_cvs_date("Date: 2019/10/25 13:36:17"); script_cve_id("CVE-2007-5794"); script_name(english:"Scientific Linux Security Update : nss_ldap on SL5.x i386/x86_64"); script_summary(english:"Checks rpm output for the updated package"); script_set_attribute( attribute:"synopsis", value:"The remote Scientific Linux host is missing a security update." ); script_set_attribute( attribute:"description", value: "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." ); # https://listserv.fnal.gov/scripts/wa.exe?A2=ind0805&L=scientific-linux-errata&T=0&P=1350 script_set_attribute( attribute:"see_also", value:"http://www.nessus.org/u?be52862b" ); script_set_attribute( attribute:"solution", value:"Update the affected nss_ldap package." ); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:N/A:N"); script_cwe_id(362); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"x-cpe:/o:fermilab:scientific_linux"); script_set_attribute(attribute:"vuln_publication_date", value:"2007/11/13"); script_set_attribute(attribute:"patch_publication_date", value:"2008/05/21"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/08/01"); script_set_attribute(attribute:"generated_plugin", value:"current"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"Scientific Linux Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/RedHat/release", "Host/RedHat/rpm-list"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("rpm.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); release = get_kb_item("Host/RedHat/release"); if (isnull(release) || "Scientific Linux " >!< release) audit(AUDIT_HOST_NOT, "running Scientific Linux"); if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING); cpu = get_kb_item("Host/cpu"); if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH); if (cpu >!< "x86_64" && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Scientific Linux", cpu); flag = 0; if (rpm_check(release:"SL5", reference:"nss_ldap-253-12.el5")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get()); else security_warning(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
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 2020-06-01 modified 2020-06-02 plugin id 30197 published 2008-02-06 reporter This script is Copyright (C) 2008-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/30197 title SuSE 10 Security Update : nss_ldap (ZYPP Patch Number 4781) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The text description of this plugin is (C) Novell, Inc. # include("compat.inc"); if (description) { script_id(30197); script_version ("1.16"); script_cvs_date("Date: 2019/10/25 13:36:30"); script_cve_id("CVE-2007-5794"); script_name(english:"SuSE 10 Security Update : nss_ldap (ZYPP Patch Number 4781)"); script_summary(english:"Checks rpm output for the updated packages"); script_set_attribute( attribute:"synopsis", value:"The remote SuSE 10 host is missing a security-related patch." ); script_set_attribute( attribute:"description", value: "nss_ldap returned incorrect data under certain circumstances to the calling process. Some applications could therefore work with wrong user data. (CVE-2007-5794)" ); script_set_attribute( attribute:"see_also", value:"http://support.novell.com/security/cve/CVE-2007-5794.html" ); script_set_attribute(attribute:"solution", value:"Apply ZYPP patch number 4781."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:N/A:N"); script_cwe_id(362); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"cpe:/o:suse:suse_linux"); script_set_attribute(attribute:"patch_publication_date", value:"2007/12/04"); script_set_attribute(attribute:"plugin_publication_date", value:"2008/02/06"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2008-2019 Tenable Network Security, Inc."); script_family(english:"SuSE Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/SuSE/release", "Host/SuSE/rpm-list"); exit(0); } include("global_settings.inc"); include("rpm.inc"); if (!get_kb_item("Host/local_checks_enabled")) exit(0, "Local checks are not enabled."); if (!get_kb_item("Host/SuSE/release")) exit(0, "The host is not running SuSE."); if (!get_kb_item("Host/SuSE/rpm-list")) exit(1, "Could not obtain the list of installed packages."); cpu = get_kb_item("Host/cpu"); if (isnull(cpu)) exit(1, "Failed to determine the architecture type."); if (cpu >!< "x86_64" && cpu !~ "^i[3-6]86$") exit(1, "Local checks for SuSE 10 on the '"+cpu+"' architecture have not been implemented."); flag = 0; if (rpm_check(release:"SLED10", sp:1, reference:"nss_ldap-246-14.20")) flag++; if (rpm_check(release:"SLED10", sp:1, cpu:"x86_64", reference:"nss_ldap-32bit-246-14.20")) flag++; if (rpm_check(release:"SLES10", sp:1, reference:"nss_ldap-246-14.20")) flag++; if (rpm_check(release:"SLES10", sp:1, cpu:"x86_64", reference:"nss_ldap-32bit-246-14.20")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get()); else security_warning(0); exit(0); } else exit(0, "The host is not affected.");
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 2020-06-01 modified 2020-06-02 plugin id 29338 published 2007-12-12 reporter This script is Copyright (C) 2007-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/29338 title Debian DSA-1430-1 : libnss-ldap - denial of service 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 2020-06-01 modified 2020-06-02 plugin id 30196 published 2008-02-06 reporter This script is Copyright (C) 2008-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/30196 title openSUSE 10 Security Update : nss_ldap (nss_ldap-4773) 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 last seen 2020-06-01 modified 2020-06-02 plugin id 60452 published 2012-08-01 reporter This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/60452 title Scientific Linux Security Update : nss_ldap on SL4.x i386/x86_64 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 last seen 2020-06-01 modified 2020-06-02 plugin id 32426 published 2008-05-22 reporter This script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/32426 title RHEL 5 : nss_ldap (RHSA-2008:0389) 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 2020-06-01 modified 2020-06-02 plugin id 28322 published 2007-11-26 reporter This script is Copyright (C) 2007-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/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 last seen 2020-06-01 modified 2020-06-02 plugin id 33583 published 2008-07-25 reporter This script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/33583 title RHEL 4 : nss_ldap (RHSA-2008:0715) 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 2020-06-01 modified 2020-06-02 plugin id 37403 published 2009-04-23 reporter This script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/37403 title Mandriva Linux Security Advisory : nss_ldap (MDVSA-2008:049)
Oval
accepted | 2013-04-29T04:07:11.908-04:00 | ||||||||||||||||||||||||
class | vulnerability | ||||||||||||||||||||||||
contributors |
| ||||||||||||||||||||||||
definition_extensions |
| ||||||||||||||||||||||||
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 | 27 |
Redhat
advisories |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rpms |
|
Seebug
bulletinFamily | exploit |
description | BUGTRAQ ID: 26452 CVE(CAN) ID: CVE-2007-5794 nss_ldap模块可在AIX、Linux、Solaris等操作系统上提供LDAP名称服务交换服务。 如果应用程序链接到pthread并使用nss_ldap调用然后fork的话,这两个进程就会共享ldap连接,没有锁定机制。这可能导致通过共享的LDAP连接向进程返回错误数据。 这个漏洞的起因是当__pthread_once为非空就表示__pthread_atfork也为非空这个假设是错误的。这两个变量之间没有联系,调用pthread_atfork对nss_ldap中的__pthread_atfork值没有影响,反之亦然。 Padl Software nss_ldap < Build 259 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: <a href="http://www.padl.com/download/nss_ldap.tgz" target="_blank">http://www.padl.com/download/nss_ldap.tgz</a> |
id | SSV:2433 |
last seen | 2017-11-19 |
modified | 2007-11-17 |
published | 2007-11-17 |
reporter | Root |
title | PADL Nss_ldap竞争条件漏洞 |
References
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453868
- http://bugs.gentoo.org/show_bug.cgi?id=198390
- http://lists.opensuse.org/opensuse-security-announce/2008-02/msg00003.html
- http://secunia.com/advisories/27670
- http://secunia.com/advisories/27768
- http://secunia.com/advisories/27839
- http://secunia.com/advisories/28061
- http://secunia.com/advisories/28838
- http://secunia.com/advisories/29083
- http://secunia.com/advisories/30352
- http://secunia.com/advisories/31227
- http://secunia.com/advisories/31524
- http://security.gentoo.org/glsa/glsa-200711-33.xml
- http://support.avaya.com/elmodocs2/security/ASA-2008-332.htm
- http://wiki.rpath.com/wiki/Advisories:rPSA-2007-0255
- http://www.debian.org/security/2007/dsa-1430
- http://www.dovecot.org/list/dovecot/2005-April/006859.html
- http://www.dovecot.org/list/dovecot/2005-March/006345.html
- http://www.mandriva.com/security/advisories?name=MDVSA-2008:049
- http://www.redhat.com/support/errata/RHSA-2008-0389.html
- http://www.redhat.com/support/errata/RHSA-2008-0715.html
- http://www.securityfocus.com/archive/1/487985/100/0/threaded
- http://www.securityfocus.com/bid/26452
- http://www.securitytracker.com/id?1020088
- https://bugzilla.redhat.com/show_bug.cgi?id=154314
- https://bugzilla.redhat.com/show_bug.cgi?id=367461
- https://exchange.xforce.ibmcloud.com/vulnerabilities/38505
- https://issues.rpath.com/browse/RPL-1913
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10625