Bug 757172

Summary: nss_ldap segfault when some user is touched and server is not available
Product: Red Hat Enterprise Linux 5 Reporter: Aleš Mareček <amarecek>
Component: nss_ldapAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: high    
Version: 5.8CC: jhrozek, jplans, prc
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-28 09:19:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 754028    
Attachments:
Description Flags
Valgrind log none

Description Aleš Mareček 2011-11-25 16:48:03 UTC
Description of problem:
nss_ldap-253-47.el5
glibc-2.5-72

$ useradd SudoUser1; echo $?; useradd sudouser; echo $?
Segmentation fault
139
Segmentation fault
139
i:x86_64|m:x86_64 root@sgi-xe310-03 [bz632235-sudo-using-active-directory-gives-a-cache-error]# cat /etc/nsswitch.conf 
passwd:     files [!NOTFOUND=return] ldap
shadow:     files [!NOTFOUND=return] ldap
group:      files [!NOTFOUND=return] ldap
hosts:      files dns
bootparams: nisplus [NOTFOUND=return] files
ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
services:   files
netgroup:   nisplus
publickey:  nisplus
automount:  files nisplus
aliases:    files nisplus


i:x86_64|m:x86_64 root@sgi-xe310-03 [bz632235-sudo-using-active-directory-gives-a-cache-error]# gdb --args useradd SudoUser1
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-42.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/useradd...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/sbin/useradd SudoUser1
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x2aaaaaaab000

Program received signal SIGSEGV, Segmentation fault.
0x00002aaaae388e2c in _nss_ldap_db_get () from /lib64/libnss_ldap.so.2

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. See the description part

  
Actual results:
Segfault.

Expected results:
No segfault.

Additional info:
As you can see in valgrind log it seems there is some unfreed space.

Comment 1 Aleš Mareček 2011-11-25 16:49:48 UTC
Created attachment 536376 [details]
Valgrind log

Comment 4 Jakub Hrozek 2011-11-28 09:19:35 UTC

*** This bug has been marked as a duplicate of bug 756783 ***