Bug 164353

Summary: Bad: net ads join crashed
Product: [Fedora] Fedora Reporter: Andrey <afletdinov>
Component: sambaAssignee: Simo Sorce <ssorce>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: baif, davisda, lee, marius.andreiana, me, mthrift, nalin, thomas
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: e2fsprogs-1.38 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-14 20:43:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrey 2005-07-27 07:00:23 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6

Description of problem:
server: win2k sp3
client: FedoraCore 4, samba-3.0.14a-2

net ads join -Uafletdinov
afletdinov's password: 
[2005/07/27 15:56:39, 0] libads/ldap.c:ads_add_machine_acct(1405)
  ads_add_machine_acct: Host account for tserver already exists - modifying old account
Using short domain name -- DC_LOCAL
Joined 'TSERVER' to realm 'DC_LOCAL'
*** glibc detected *** net: free(): invalid pointer: 0x001b8db0 ***
======= Backtrace: =========
/lib/libc.so.6[0x222424]
/lib/libc.so.6(__libc_free+0x77)[0x22295f]
/lib/libcom_err.so.2(remove_error_table+0x4b)[0x1bcabb]
/usr/lib/libkrb5.so.3[0x1568c4]
/usr/lib/libkrb5.so.3[0x1565c7]
/usr/lib/libkrb5.so.3[0x1a79da]
/lib/ld-linux.so.2[0x11f058]
/lib/libc.so.6(exit+0xc5)[0x1e9c69]
/lib/libc.so.6(__libc_start_main+0xce)[0x1d3dee]
net[0x8860f1]
======= Memory map: ========
00111000-0012b000 r-xp 00000000 08:02 191902     /lib/ld-2.3.5.so
0012b000-0012c000 r-xp 00019000 08:02 191902     /lib/ld-2.3.5.so
0012c000-0012d000 rwxp 0001a000 08:02 191902     /lib/ld-2.3.5.so
0012d000-0013f000 r-xp 00000000 08:02 191975     /lib/libnsl-2.3.5.so
0013f000-00140000 r-xp 00011000 08:02 191975     /lib/libnsl-2.3.5.so
00140000-00141000 rwxp 00012000 08:02 191975     /lib/libnsl-2.3.5.so
00141000-00143000 rwxp 00141000 00:00 0 
00143000-00145000 r-xp 00000000 08:02 191905     /lib/libdl-2.3.5.so
00145000-00146000 r-xp 00001000 08:02 191905     /lib/libdl-2.3.5.so
00146000-00147000 rwxp 00002000 08:02 191905     /lib/libdl-2.3.5.so
00147000-001b6000 r-xp 00000000 08:02 287717     /usr/lib/libkrb5.so.3.2
001b6000-001b9000 rwxp 0006e000 08:02 287717     /usr/lib/libkrb5.so.3.2
001b9000-001bb000 r-xp 00000000 08:02 287715     /usr/lib/libkrb5support.so.0.0
001bb000-001bc000 rwxp 00001000 08:02 287715     /usr/lib/libkrb5support.so.0.0
001bc000-001be000 r-xp 00000000 08:02 191944     /lib/libcom_err.so.2.1
001be000-001bf000 rwxp 00001000 08:02 191944     /lib/libcom_err.so.2.1
001bf000-002e3000 r-xp 00000000 08:02 191903     /lib/libc-2.3.5.so
002e3000-002e5000 r-xp 00124000 08:02 191903     /lib/libc-2.3.5.so
002e5000-002e7000 rwxp 00126000 08:02 191903     /lib/libc-2.3.5.so
002e7000-002e9000 rwxp 002e7000 00:00 0 
002e9000-002eb000 r-xp 00000000 08:02 607585     /usr/lib/gconv/UTF-16.so
002eb000-002ed000 rwxp 00001000 08:02 607585     /usr/lib/gconv/UTF-16.so
002ed000-002fa000 r-xp 00000000 08:02 550999     /usr/lib/liblber-2.2.so.7.0.16
002fa000-002fb000 rwxp 0000c000 08:02 550999     /usr/lib/liblber-2.2.so.7.0.16
002fb000-00310000 r-xp 00000000 08:02 287714     /usr/lib/libsasl2.so.2.0.20
00310000-00311000 rwxp 00015000 08:02 287714     /usr/lib/libsasl2.so.2.0.20
00311000-00409000 r-xp 00000000 08:02 191949     /lib/libcrypto.so.0.9.7f
00409000-0041b000 rwxp 000f8000 08:02 191949     /lib/libcrypto.so.0.9.7f
0041b000-0041e000 rwxp 0041b000 00:00 0 
0041e000-00422000 r-xp 00000000 08:02 191858     /lib/libnss_dns-2.3.5.so
00422000-00423000 r-xp 00003000 08:02 191858     /lib/libnss_dns-2.3.5.so
00423000-00424000 rwxp 00004000 08:02 191858     /lib/libnss_dns-2.3.5.so
00424000-0042d000 r-xp 00000000 08:02 191969     /lib/libgcc_s-4.0.0-20050520.so.1
0042d000-0042e000 rwxp 00009000 08:02 191969     /lib/libgcc_s-4.0.0-20050520.so.1
00477000-00486000 r-xp 00000000 08:02 191942     /lib/libresolv-2.3.5.so
00486000-00487000 r-xp 0000e000 08:02 191942     /lib/libresolv-2.3.5.so
00487000-00488000 rwxp 0000f000 08:02 191942     /lib/libresolv-2.3.5.so
00488000-0048a000 rwxp 00488000 00:00 0 
004f3000-004f5000 r-xp 00000000 08:02 607504     /usr/lib/gconv/IBM866.so
004f5000-004f7000 rwxp 00001000 08:02 607504     /usr/lib/gconv/IBM866.so
0055b000-0058f000 r-xp 00000000 08:02 551731     /usr/lib/libldap-2.2.so.7.0.16
0058f000-00591000 rwxp 00033000 08:02 551731     /usr/lib/libldap-2.2.so.7.0.16
005aa000-005cd000 r-xp 00000000 08:02 287716     /usr/lib/libk5crypto.so.3.0
005cd000-005ce000 rwxp 00023000 08:02 287716     /usr/lib/libk5crypto.so.3.0
00660000-00665000 r-xp 00000000 08:02 191943     /lib/libcrypt-2.3.5.so
00665000-00666000 r-xp 00004000 08:02 191943     /lib/libcrypt-2.3.5.so
00666000-00667000 rwxp 00005000 08:02 191943     /lib/libcrypt-2.3.5.so
00667000-0068e000 rwxp 00667000 00:00 0 
006f7000-0072c000 r-xp 00000000 08:02 191950     /lib/libssl.so.0.9.7f
0072c000-0072f000 rwxp 00035000 08:02 191950     /lib/libssl.so.0.9.7f
0078d000-Aborted


Version-Release number of selected component (if applicable):
samba-3.0.14a-2

How reproducible:
Always

Steps to Reproduce:
1. fedora core 4 
2. net join
3.
  

Additional info:

Comment 1 Baif 2005-08-17 08:03:34 UTC
And I got the same problem. Same configs work fine with other distribuitions.

WIN 2K3(vsout sp*)
FC 4 : samba 3.0.14a

rpm -qa | grep krb5
krb5-devel-1.4-3
pam_krb5-2.1.7-3
krb5-server-1.4-3
krb5-libs-1.4-3
krb5-workstation-1.4-3
krb5-auth-dialog-0.2-5


Comment 2 Michael Thrift 2005-08-19 00:43:11 UTC
I also get the same thing:

$rpm -qa | grep samba
samba-common-3.0.20rc2-1
system-config-samba-1.2.31-1
samba-3.0.20rc2-1
samba-client-3.0.20rc2-1

$rpm -qa | grep krb5
krb5-auth-dialog-0.2-5
krb5-libs-1.4.1-5
krb5-workstation-1.4.1-5

When I attempt to join the domain, it dies, and my system is listed under Active
Directory Users and Computers as a Domain Controller.  Here's what happens:
================================================================
[root@hostname ~]# net ads join -U [USERNAME]
[USERNAME]'s password:
[2005/08/18 18:22:51, 0] libads/ldap.c:ads_add_machine_acct(1400)
  ads_add_machine_acct: Host account for [HOSTNAME] already exists - modifying
old account
Using short domain name -- [SHORTNAME]
Joined '[HOSTNAME]' to realm '[REALM]'
*** glibc detected *** net: free(): invalid pointer: 0x00217db0 ***
======= Backtrace: =========
/lib/libc.so.6[0x2fb424]
/lib/libc.so.6(__libc_free+0x77)[0x2fb95f]
/lib/libcom_err.so.2(remove_error_table+0x4b)[0x111abb]
/usr/lib/libkrb5.so.3[0x1b58c4]
/usr/lib/libkrb5.so.3[0x1b55c7]
/usr/lib/libkrb5.so.3[0x2069da]
/lib/ld-linux.so.2[0xce0058]
/lib/libc.so.6(exit+0xc5)[0x2c2c69]
/lib/libc.so.6(__libc_start_main+0xce)[0x2acdee]
net[0x566ca1]
======= Memory map: ========
00111000-00113000 r-xp 00000000 03:06 576357     /lib/libcom_err.so.2.1
00113000-00114000 rwxp 00001000 03:06 576357     /lib/libcom_err.so.2.1
00114000-00121000 r-xp 00000000 03:06 657449     /usr/lib/liblber-2.2.so.7.0.16
00121000-00122000 rwxp 0000c000 03:06 657449     /usr/lib/liblber-2.2.so.7.0.16
00122000-00157000 r-xp 00000000 03:06 1025680    /lib/libssl.so.0.9.7f
00157000-0015a000 rwxp 00035000 03:06 1025680    /lib/libssl.so.0.9.7f
0015a000-0015c000 r-xp 00000000 03:06 644734     /usr/lib/gconv/IBM850.so
0015c000-0015e000 rwxp 00001000 03:06 644734     /usr/lib/gconv/IBM850.so
00162000-00174000 r-xp 00000000 03:06 650204     /usr/lib/libz.so.1.2.2.2
00174000-00175000 rwxp 00011000 03:06 650204     /usr/lib/libz.so.1.2.2.2
00178000-0017d000 r-xp 00000000 03:06 576366     /lib/libcrypt-2.3.5.so
0017d000-0017e000 r-xp 00004000 03:06 576366     /lib/libcrypt-2.3.5.so
0017e000-0017f000 rwxp 00005000 03:06 576366     /lib/libcrypt-2.3.5.so
0017f000-001a6000 rwxp 0017f000 00:00 0
001a6000-00215000 r-xp 00000000 03:06 660238     /usr/lib/libkrb5.so.3.2
00215000-00218000 rwxp 0006e000 03:06 660238     /usr/lib/libkrb5.so.3.2
00218000-00221000 r-xp 00000000 03:06 1024053    /lib/libnss_files-2.3.5.so
00221000-00222000 r-xp 00008000 03:06 1024053    /lib/libnss_files-2.3.5.so
00222000-00223000 rwxp 00009000 03:06 1024053    /lib/libnss_files-2.3.5.so
00223000-00227000 r-xp 00000000 03:06 1024050    /lib/libnss_dns-2.3.5.so
00227000-00228000 r-xp 00003000 03:06 1024050    /lib/libnss_dns-2.3.5.so
00228000-00229000 rwxp 00004000 03:06 1024050    /lib/libnss_dns-2.3.5.so
00229000-00232000 r-xp 00000000 03:06 1024176    /lib/libgcc_s-4.0.1-20050727.so.1
00232000-00233000 rwxp 00009000 03:06 1024176    /lib/libgcc_s-4.0.1-20050727.so.1
00262000-00296000 r-xp 00000000 03:06 654761     /usr/lib/libldap-2.2.so.7.0.16
00296000-00298000 rwxp 00033000 03:06 654761     /usr/lib/libldap-2.2.so.7.0.16
00298000-003bc000 r-xp 00000000 03:06 1024103    /lib/libc-2.3.5.so
003bc000-003be000 r-xp 00124000 03:06 1024103    /lib/libc-2.3.5.so
003be000-003c0000 rwxp 00126000 03:06 1024103    /lib/libc-2.3.5.so
003c0000-003c2000 rwxp 003c0000 00:00 0
003c2000-004ba000 r-xp 00000000 03:06 1025679    /lib/libcrypto.so.0.9.7f
004ba000-004cc000 rwxp 000f8000 03:06 1025679    /lib/libcrypto.so.0.9.7f
004cc000-004cf000 rwxp 004cc000 00:00 0
00503000-00526000 r-xp 00000000 03:06 660226     /usr/lib/libk5crypto.so.3.0
00526000-00527000 rwxp 00023000 03:06 660226     /usr/lib/libk5crypto.so.3.0
00537000-00721000 r-xp 00000000 03:06 654614     /usr/bin/net
00721000-00732000 rwxp 001ea000 03:06 654614     /usr/bin/net
00732000-00742000 rwxp 00732000 00:00 0
00a74000-00a89000 r-xp 00000000 03:06 664122     /usr/lib/libsasl2.so.2.0.20
00a89000-00a8a000 rwxp 00015000 03:06 664122     /usr/lib/libsasl2.so.2.0.20
00b48000-00b4a000 r-xp 00000000 03:06 644827     /usr/lib/gconv/UTF-16.so
00b4a000-00b4c000 rwxp 00001000 03:06 644827     /usr/lib/gconv/UTF-16.so
00caf000-00cb1000 r-xp 00000000 03:06 660203     /usr/lib/libkrb5support.so.0.0
00cb1000-00cb2000 rwxp 00001000 03:06 660203     /usr/lib/libkrb5support.so.0.0
00cd2000-00cec000 r-xp 00000000 03:06 1024101    /lib/ld-2.3.5.so
00cec000-00ced000 r-xp 00019000 03:06 1024101    /lib/ld-2.3.5.so
00ced000-00cee000 rwxp 0001a000 03:06 1024101    /lib/ld-2.3.5.so
00d0f000-00d10000 r-xp 00d0f000 00:00 0
00d45000-00d47000 r-xp 00000000 03:06 576352     /lib/libdl-2.3.5.so
00d47000-00d48000 r-xp 00001000 03:06 576352     /lib/libdl-2.3.5Aborted



Comment 3 Garth DAttilo 2005-08-25 00:35:09 UTC
Work Around Available:
   export MALLOC_CHECK_=0

(or export MALLOC_CHECK=0 for glibc < 4.0)

With newer glibc, Looks like invalid free() calls result in an abort() call. The
work-around above tells the program to ignore the error condition. Given the
number of these error reports floating around, MANY applications are going to
need to be patched to adhere to the new glibc standards.

Comment 4 Baif 2005-08-25 15:05:26 UTC
More: http://www.delorie.com/gnu/docs/glibc/libc_33.html 
 
There is one problem with MALLOC_CHECK_: in SUID or SGID binaries it could 
possibly be exploited since diverging from the normal programs behavior it now 
writes something to the standard error descriptor. Therefore the use of 
MALLOC_CHECK_ is disabled by default for SUID and SGID binaries. It can be 
enabled again by the system administrator by adding a file 
`/etc/suid-debug' (the content is not important it could be empty).  
 So, what's the difference between using MALLOC_CHECK_ and linking with 
`-lmcheck'? MALLOC_CHECK_ is orthogonal with respect to `-lmcheck'. `-lmcheck' 
has been added for backward compatibility. Both MALLOC_CHECK_ and `-lmcheck' 
should uncover the same bugs - but using MALLOC_CHECK_ you don't need to 
recompile your application. 

Comment 5 Thomas Antony 2005-09-02 20:03:04 UTC
i have got the same problem.

Server: Windows Server 2003
Client: FC4 with samba-3.0.14a where idmap_rid is enabled.

Comment 6 Thomas Antony 2005-09-13 12:27:05 UTC
I tried again to join a AD domain and still get such error logs with FC4, but i
successfully joined the domain and i can use the network shares.

[thomas@srv003 ~]$ sudo net ads join -UAdministrator%'password'
Using short domain name -- DOMAIN
Joined 'SRV003' to realm 'DOMAIN.LOCAL'
*** glibc detected *** net: free(): invalid pointer: 0x00002aaaab2a8460 ***
======= Backtrace: =========
/lib64/libc.so.6[0x2aaaab99671e]
/lib64/libc.so.6(__libc_free+0x6e)[0x2aaaab996c4e]
/lib64/libcom_err.so.2(remove_error_table+0x43)[0x2aaaab4d0db6]
/usr/lib64/libkrb5.so.3[0x2aaaab14be05]
/usr/lib64/libkrb5.so.3[0x2aaaab14bb72]
======= Memory map: ========
2aaaaaaab000-2aaaaaac5000 r-xp 00000000 fd:00 426202                    
/lib64/ld-2.3.5.so
2aaaaaac5000-2aaaaaac6000 rw-p 2aaaaaac5000 00:00 0
2aaaaaadc000-2aaaaaadd000 rw-p 2aaaaaadc000 00:00 0
2aaaaabc4000-2aaaaabc5000 r--p 00019000 fd:00 426202                    
/lib64/ld-2.3.5.so
2aaaaabc5000-2aaaaabc6000 rw-p 0001a000 fd:00 426202                    
/lib64/ld-2.3.5.so
2aaaaabc6000-2aaaaabcb000 r-xp 00000000 fd:00 426238                    
/lib64/libcrypt-2.3.5.so
2aaaaabcb000-2aaaaacca000 ---p 00005000 fd:00 426238                    
/lib64/libcrypt-2.3.5.so
2aaaaacca000-2aaaaaccb000 r--p 00004000 fd:00 426238                    
/lib64/libcrypt-2.3.5.so
2aaaaaccb000-2aaaaaccc000 rw-p 00005000 fd:00 426238                    
/lib64/libcrypt-2.3.5.so
2aaaaaccc000-2aaaaacfa000 rw-p 2aaaaaccc000 00:00 0
2aaaaacfa000-2aaaaad0e000 r-xp 00000000 fd:00 426243                    
/lib64/libnsl-2.3.5.so
2aaaaad0e000-2aaaaae0d000 ---p 00014000 fd:00 426243                    
/lib64/libnsl-2.3.5.so
2aaaaae0d000-2aaaaae0e000 r--p 00013000 fd:00 426243                    
/lib64/libnsl-2.3.5.so
2aaaaae0e000-2aaaaae0f000 rw-p 00014000 fd:00 426243                    
/lib64/libnsl-2.3.5.so
2aaaaae0f000-2aaaaae11000 rw-p 2aaaaae0f000 00:00 0
2aaaaae11000-2aaaaae13000 r-xp 00000000 fd:00 426230                    
/lib64/libdl-2.3.5.so
2aaaaae13000-2aaaaaf13000 ---p 00002000 fd:00 426230                    
/lib64/libdl-2.3.5.so
2aaaaaf13000-2aaaaaf14000 r--p 00002000 fd:00 426230                    
/lib64/libdl-2.3.5.so
2aaaaaf14000-2aaaaaf15000 rw-p 00003000 fd:00 426230                    
/lib64/libdl-2.3.5.so
2aaaaaf15000-2aaaaaf16000 rw-p 2aaaaaf15000 00:00 0
2aaaaaf16000-2aaaaaf1d000 r-xp 00000000 fd:03 199089                    
/usr/lib64/libpopt.so.0.0.0
2aaaaaf1d000-2aaaab01d000 ---p 00007000 fd:03 199089                    
/usr/lib64/libpopt.so.0.0.0
2aaaab01d000-2aaaab01e000 rw-p 00007000 fd:03 199089                    
/usr/lib64/libpopt.so.0.0.0
2aaaab01e000-2aaaab034000 r-xp 00000000 fd:03 199096                    
/usr/lib64/libgssapi_krb5.so.2.2
2aaaab034000-2aaaab133000 ---p 00016000 fd:03 199096                    
/usr/lib64/libgssapi_krb5.so.2.2
2aaaab133000-2aaaab135000 rw-p 00015000 fd:03 199096                    
/usr/lib64/libgssapi_krb5.so.2.2
2aaaab135000-2aaaab1a5000 r-xp 00000000 fd:03 199095                    
/usr/lib64/libkrb5.so.3.2
2aaaab1a5000-2aaaab2a4000 ---p 00070000 fd:03 199095                    
/usr/lib64/libkrb5.so.3.2
2aaaab2a4000-2aaaab2a9000 rw-p 0006f000 fd:03 199095                    
/usr/lib64/libkrb5.so.3.2
2aaaab2a9000-2aaaab2aa000 rw-p 2aaaab2a9000 00:00 0
2aaaab2aa000-2aaaab2cc000 r-xp 00000000 fd:03 199094                    
/usr/lib64/libk5crypto.so.3.0
2aaaab2cc000-2aaaab3cb000 ---p 00022000 fd:03 199094                    
/usr/lib64/libk5crypto.so.3.0
2aaaab3cb000-2aaaab3cd000 rw-p 00021000 fd:03 199094                    
/usr/lib64/libk5crypto.so.3.0
2aaaab3cd000-2aaaab3cf000 r-xp 00000000 fd:03 199093                    
/usr/lib64/libkrb5support.so.0.0
2aaaab3cf000-2aaaab4cf000 ---p 00002000 fd:03 199093                    
/usr/lib64/libkrb5support.so.0.0
2aaaab4cf000-2aaaab4d0000 rw-p 00002000 fd:03 199093                    
/usr/lib64/libkrb5support.so.0.0
2aaaab4d0000-2aaaab4d2000 r-xp 00000000 fd:00 426239                    
/lib64/libcom_err.so.2.1
2aaaab4d2000-2aaaab5d1000 ---p 00002000 fd:00 426239                    
/lib64/libcom_err.so.2.1
2aaaab5d1000-2aaaab5d2000 rw-p 00001000 fd:00 426239                    
/lib64/libcom_err.so.2.1
2aaaab5d2000-2aaaab5d3000 rw-p 2aaaab5d2000 00:00 0
2aaaAbgebrochen

Comment 7 Marius Andreiana 2005-11-03 10:22:13 UTC
Same issue reported in bug #138926, with details:
SELinux is disabled, as is iptables.  The problem does not occur
  on FC2 on i386.  The samba-3.0.8 tarball directly from samba.org
doesn't have this problem


Comment 8 Marius Andreiana 2005-11-03 10:23:58 UTC
*** Bug 138926 has been marked as a duplicate of this bug. ***

Comment 9 Thomas Antony 2005-11-27 22:44:29 UTC
Can at least one responsibly person for the samba packages work on this bug or
give me an answere!

Comment 10 Christian Iseli 2007-01-22 11:20:34 UTC
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.

Comment 11 Nalin Dahyabhai 2007-03-14 20:43:21 UTC
This should be fixed with e2fsprogs 1.38 and later, which was previously
pushed as an update for FC3 and FC4, and included with FC5 at release, so
I'm going to close this.  Please reopen this report if you find that this
does not solve the problem for you.  Thanks!