Marcin Giedz
2006-Nov-14 09:49 UTC
[Samba] Samba 3.0.23c PANIC during registering computer into domain
Hello, Recently I've had a chance to test samba 3.0.23c on debian etch (unstable) with LDAP as PDC. I found two problems, however I'd like to describe the second one: 1) I added users to LDAP so I could connect and I was able to authorize myself in samba via LDAP 2) I added my computer to LDAP but didn't check the SambaSID for my machine - in fact it was different than sambaSID for PDC.... but this oversight caused another PANIC in smbd. So I compiled samba with --enable-debug --enable-developer to get some details. Here is what I found: [2006/11/13 17:02:23, 0] smbd/sec_ctx.c:push_sec_ctx(194) Security context stack overflow! [2006/11/13 17:02:23, 0] lib/util.c:smb_panic(1586) smb_panic: clobber_region() last called from [account_policy_get(322)] [2006/11/13 17:02:23, 0] lib/util.c:smb_panic(1592) PANIC (pid 21823): Security context stack overflow! [2006/11/13 17:02:23, 0] lib/util.c:log_stack_trace(1699) BACKTRACE: 64 stack frames: #0 /opt/samba-3.0.23c/sbin/smbd(log_stack_trace+0x2b) [0x757b730c] #1 /opt/samba-3.0.23c/sbin/smbd(smb_panic+0x11e) [0x757b7136] #2 /opt/samba-3.0.23c/sbin/smbd(push_sec_ctx+0x8f) [0x7560cd12] #3 /opt/samba-3.0.23c/sbin/smbd(become_root+0x17) [0x7560035e] #4 /opt/samba-3.0.23c/sbin/smbd [0x7576ddf8] #5 /opt/samba-3.0.23c/sbin/smbd [0x7576d4d9] #6 /opt/samba-3.0.23c/sbin/smbd(pdb_sid_to_id+0x34) [0x7576cade] #7 /opt/samba-3.0.23c/sbin/smbd(sid_to_gid+0x176) [0x75773722] #8 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid+0x77) [0x757643bd] #9 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid_from_rid+0xf5) [0x7576ff84] #10 /opt/samba-3.0.23c/sbin/smbd(init_sam_from_buffer_v3+0x99a) [0x757686cf] #11 /opt/samba-3.0.23c/sbin/smbd(pdb_copy_sam_account+0x81) [0x757694b4] #12 /opt/samba-3.0.23c/sbin/smbd(pdb_getsampwsid+0x10d) [0x7576ace0] #13 /opt/samba-3.0.23c/sbin/smbd [0x7576de0d] #14 /opt/samba-3.0.23c/sbin/smbd [0x7576d4d9] #15 /opt/samba-3.0.23c/sbin/smbd(pdb_sid_to_id+0x34) [0x7576cade] #16 /opt/samba-3.0.23c/sbin/smbd(sid_to_gid+0x176) [0x75773722] #17 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid+0x77) [0x757643bd] #18 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid_from_rid+0xf5) [0x7576ff84] #19 /opt/samba-3.0.23c/sbin/smbd(init_sam_from_buffer_v3+0x99a) [0x757686cf] #20 /opt/samba-3.0.23c/sbin/smbd(pdb_copy_sam_account+0x81) [0x757694b4] #21 /opt/samba-3.0.23c/sbin/smbd(pdb_getsampwsid+0x10d) [0x7576ace0] #22 /opt/samba-3.0.23c/sbin/smbd [0x7576de0d] #23 /opt/samba-3.0.23c/sbin/smbd [0x7576d4d9] #24 /opt/samba-3.0.23c/sbin/smbd(pdb_sid_to_id+0x34) [0x7576cade] #25 /opt/samba-3.0.23c/sbin/smbd(sid_to_gid+0x176) [0x75773722] #26 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid+0x77) [0x757643bd] #27 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid_from_rid+0xf5) [0x7576ff84] #28 /opt/samba-3.0.23c/sbin/smbd(init_sam_from_buffer_v3+0x99a) [0x757686cf] #29 /opt/samba-3.0.23c/sbin/smbd(pdb_copy_sam_account+0x81) [0x757694b4] #30 /opt/samba-3.0.23c/sbin/smbd(pdb_getsampwsid+0x10d) [0x7576ace0] #31 /opt/samba-3.0.23c/sbin/smbd [0x7576de0d] #32 /opt/samba-3.0.23c/sbin/smbd [0x7576d4d9] #33 /opt/samba-3.0.23c/sbin/smbd(pdb_sid_to_id+0x34) [0x7576cade] #34 /opt/samba-3.0.23c/sbin/smbd(sid_to_gid+0x176) [0x75773722] #35 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid+0x77) [0x757643bd] #36 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid_from_rid+0xf5) [0x7576ff84] #37 /opt/samba-3.0.23c/sbin/smbd(init_sam_from_buffer_v3+0x99a) [0x757686cf] #38 /opt/samba-3.0.23c/sbin/smbd(pdb_copy_sam_account+0x81) [0x757694b4] #39 /opt/samba-3.0.23c/sbin/smbd(pdb_getsampwsid+0x10d) [0x7576ace0] #40 /opt/samba-3.0.23c/sbin/smbd [0x7576de0d] #41 /opt/samba-3.0.23c/sbin/smbd [0x7576d4d9] #42 /opt/samba-3.0.23c/sbin/smbd(pdb_sid_to_id+0x34) [0x7576cade] #43 /opt/samba-3.0.23c/sbin/smbd(sid_to_gid+0x176) [0x75773722] #44 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid+0x77) [0x757643bd] #45 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid_from_rid+0xf5) [0x7576ff84] #46 /opt/samba-3.0.23c/sbin/smbd(init_sam_from_buffer_v3+0x99a) [0x757686cf] #47 /opt/samba-3.0.23c/sbin/smbd(pdb_copy_sam_account+0x81) [0x757694b4] #48 /opt/samba-3.0.23c/sbin/smbd(pdb_getsampwsid+0x10d) [0x7576ace0] #49 /opt/samba-3.0.23c/sbin/smbd [0x7576de0d] #50 /opt/samba-3.0.23c/sbin/smbd [0x7576d4d9] #51 /opt/samba-3.0.23c/sbin/smbd(pdb_sid_to_id+0x34) [0x7576cade] #52 /opt/samba-3.0.23c/sbin/smbd(sid_to_gid+0x176) [0x75773722] #53 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid+0x77) [0x757643bd] #54 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid_from_rid+0xf5) [0x7576ff84] #55 /opt/samba-3.0.23c/sbin/smbd(init_sam_from_buffer_v3+0x99a) [0x757686cf] #56 /opt/samba-3.0.23c/sbin/smbd(pdb_copy_sam_account+0x81) [0x757694b4] #57 /opt/samba-3.0.23c/sbin/smbd(pdb_getsampwsid+0x10d) [0x7576ace0] #58 /opt/samba-3.0.23c/sbin/smbd [0x7576de0d] #59 /opt/samba-3.0.23c/sbin/smbd [0x7576d4d9] #60 /opt/samba-3.0.23c/sbin/smbd(pdb_sid_to_id+0x34) [0x7576cade] #61 /opt/samba-3.0.23c/sbin/smbd(sid_to_gid+0x176) [0x75773722] #62 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid+0x77) [0x757643bd] #63 /opt/samba-3.0.23c/sbin/smbd(pdb_set_group_sid_from_rid+0xf5) [0x7576ff84] [2006/11/13 17:02:23, 0] lib/util.c:smb_panic(1600) smb_panic(): calling panic action [/bin/sleep 999999999] Then I changed sambaSID in my machine entry in LDAP to the GOOD one so machine sambaSID = PDC sambaSID and I was able to register my computer into my domain. I know this was my fault but it (PANIC) shouldn't have happened anyway. If you (developers) need more info let me know. Nowadays I can reproduce this error. Best regards, Marcin ARISE