J-Security Center

Title: Padl Software nss_ldap Local Denial of Service Vulnerability

Severity: LOW

Description:

nss_ldap is a module offered by Padl Software that allows a system to use LDAP directories as the source of information for user attributes (via getpwent, etc) and related data. A local denial of service condition is possible when nss_ldap is in use with nscd (name service caching daemon), as is the case in RedHat Linux 7.0,6.2 and 6.1 with LDAP support. Nscd is a multithreaded daemon program that processes these lookups before they are sent to nss_ldap. If an attacker makes a large number of LDAP information requests, moreso than threads nscd can handle, then they and all further requests can be blocked until the system is reset or the nscd process is killed. This can be a very effective local denial of service attack.

The reason for this condition is mutual dependence of two components on resources being free and blocking until this is the case. The problem occurs in a situation where nscd is very busy and all threads are in use (an attacker can of course create this environment). When request number n is made (n being the maximum number of threads that nscd will handle), nss_ldap locks a mutex (protecting critical memory shared between threads from race conditions) before it attempts to contact the LDAP server. All other lookup requests are blocked (they hang) until this mutex is unlocked since this is normally a rather quick process. nss_ldap then calls gethostbyname() to resolve the address of the LDAP server. Unfortunately glibc passes the gethostbyname() request to nscd, where it is blocked until a thread has been freed. This will never happen however, since the pending threads are all blocked until the nss_ldap request that called gethostbyname() releases the mutex.

All system functions that depend on host lookups or user information retrieval will be unusable until a system reboot or the nscd process is killed (root must already be logged in, login will not work nor will any remote access utility).

Affected Products:

  • PADL Software nss_ldap Build 105
  • PADL Software nss_ldap Build 113
  • PADL Software nss_ldap Build 85
  • RedHat Linux 6.1.0 alpha
  • RedHat Linux 6.1.0 i386
  • RedHat Linux 6.1.0 sparc
  • RedHat Linux 6.2.0 alpha
  • RedHat Linux 6.2.0 i386
  • RedHat Linux 6.2.0 sparc
  • RedHat Linux 7.0.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.