Bug 4227 - PANIC during registering computer into domain
PANIC during registering computer into domain
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: Domain Control
3.0.23c
x86 Linux
: P3 critical
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-15 05:59 UTC by Marcin Giedz
Modified: 2011-07-26 14:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Giedz 2006-11-15 05:59:49 UTC
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
Comment 1 Karolin Seeger 2009-12-11 08:05:56 UTC
Is this still an issue in Samba 3.4.3?
Comment 2 Mike A. Leonetti 2010-01-20 14:47:25 UTC
I have the same issue on 3.4.5 on Gentoo amd64.  The configuration is LDAP+Samba.  Everything was working fine prior to update.  Users on the domain can be on the domain without any issues.  But when I try and join another user to the domain (Win XP Pro SP3) I get this error in the log.[computername]:

[2010/01/20 15:20:32,  0] smbd/sec_ctx.c:196(push_sec_ctx)
  Security context stack overflow!
[2010/01/20 15:20:32,  0] lib/util.c:1480(smb_panic)
  PANIC (pid 29046): Security context stack overflow!
[2010/01/20 15:20:32,  0] lib/util.c:1584(log_stack_trace)
  BACKTRACE: 64 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x1e) [0x55555587cabe]
   #1 /usr/sbin/smbd(smb_panic+0x1f) [0x55555587cdef]
   #2 /usr/sbin/smbd(push_sec_ctx+0x18c) [0x55555567186c]
   #3 /usr/sbin/smbd(become_root+0x9) [0x5555556617b9]
   #4 /usr/sbin/smbd(pdb_get_account_policy+0x26) [0x555555819966]
   #5 /usr/sbin/smbd(pdb_get_pass_must_change_time+0x29) [0x55555580f5a9]
   #6 /usr/sbin/smbd(init_buffer_from_samu+0xb0) [0x555555812850]
   #7 /usr/sbin/smbd(pdb_copy_sam_account+0x21) [0x555555815fa1]
   #8 /usr/sbin/smbd(pdb_getsampwsid+0xa2) [0x55555581ace2]
   #9 /usr/sbin/smbd [0x55555581ae2a]
   #10 /usr/sbin/smbd [0x55555581b7a1]
   #11 /usr/sbin/smbd(pdb_lookup_rids+0x49) [0x5555558199e9]
   #12 /usr/sbin/smbd(lookup_sids+0x394) [0x55555581e844]
   #13 /usr/sbin/smbd(lookup_sid+0x82) [0x555555820022]
   #14 /usr/sbin/smbd(pdb_get_group_sid+0x16e) [0x55555581191e]
   #15 /usr/sbin/smbd(pdb_get_group_rid+0xf) [0x55555581d07f]
   #16 /usr/sbin/smbd(init_buffer_from_samu+0xed) [0x55555581288d]
   #17 /usr/sbin/smbd(pdb_copy_sam_account+0x21) [0x555555815fa1]
   #18 /usr/sbin/smbd(pdb_getsampwsid+0xa2) [0x55555581ace2]
   #19 /usr/sbin/smbd [0x55555581ae2a]
   #20 /usr/sbin/smbd [0x55555581b7a1]
   #21 /usr/sbin/smbd(pdb_lookup_rids+0x49) [0x5555558199e9]
   #22 /usr/sbin/smbd(lookup_sids+0x394) [0x55555581e844]
   #23 /usr/sbin/smbd(lookup_sid+0x82) [0x555555820022]
   #24 /usr/sbin/smbd(pdb_get_group_sid+0x16e) [0x55555581191e]
   #25 /usr/sbin/smbd(pdb_get_group_rid+0xf) [0x55555581d07f]
   #26 /usr/sbin/smbd(init_buffer_from_samu+0xed) [0x55555581288d]
   #27 /usr/sbin/smbd(pdb_copy_sam_account+0x21) [0x555555815fa1]
   #28 /usr/sbin/smbd(pdb_getsampwsid+0xa2) [0x55555581ace2]
   #29 /usr/sbin/smbd [0x55555581ae2a]
   #30 /usr/sbin/smbd [0x55555581b7a1]
   #31 /usr/sbin/smbd(pdb_lookup_rids+0x49) [0x5555558199e9]
   #32 /usr/sbin/smbd(lookup_sids+0x394) [0x55555581e844]
   #33 /usr/sbin/smbd(lookup_sid+0x82) [0x555555820022]
   #34 /usr/sbin/smbd(pdb_get_group_sid+0x16e) [0x55555581191e]
   #35 /usr/sbin/smbd(pdb_get_group_rid+0xf) [0x55555581d07f]
   #36 /usr/sbin/smbd(init_buffer_from_samu+0xed) [0x55555581288d]
   #37 /usr/sbin/smbd(pdb_copy_sam_account+0x21) [0x555555815fa1]
   #38 /usr/sbin/smbd(pdb_getsampwsid+0xa2) [0x55555581ace2]
   #39 /usr/sbin/smbd [0x55555581ae2a]
   #40 /usr/sbin/smbd [0x55555581b7a1]
   #41 /usr/sbin/smbd(pdb_lookup_rids+0x49) [0x5555558199e9]
   #42 /usr/sbin/smbd(lookup_sids+0x394) [0x55555581e844]
   #43 /usr/sbin/smbd(lookup_sid+0x82) [0x555555820022]
   #44 /usr/sbin/smbd(pdb_get_group_sid+0x16e) [0x55555581191e]
   #45 /usr/sbin/smbd(pdb_get_group_rid+0xf) [0x55555581d07f]
   #46 /usr/sbin/smbd(init_buffer_from_samu+0xed) [0x55555581288d]
   #47 /usr/sbin/smbd(pdb_copy_sam_account+0x21) [0x555555815fa1]
   #48 /usr/sbin/smbd(copy_serverinfo+0xc3) [0x5555558cc903]
   #49 /usr/sbin/smbd [0x5555557f8819]
   #50 /usr/sbin/smbd(np_open+0xa3) [0x5555557fbeb3]
   #51 /usr/sbin/smbd(open_np_file+0xd7) [0x5555556397a7]
   #52 /usr/sbin/smbd [0x555555632c1c]
   #53 /usr/sbin/smbd(reply_ntcreate_and_X+0x621) [0x555555633901]
   #54 /usr/sbin/smbd [0x5555556822e8]
   #55 /usr/sbin/smbd [0x55555568495a]
   #56 /usr/sbin/smbd [0x555555684c35]
   #57 /usr/sbin/smbd(run_events+0x136) [0x55555588dcd6]
   #58 /usr/sbin/smbd(smbd_process+0x795) [0x555555684555]
   #59 /usr/sbin/smbd [0x555555afd42d]
   #60 /usr/sbin/smbd(run_events+0x136) [0x55555588dcd6]
   #61 /usr/sbin/smbd [0x55555588e05d]
   #62 /usr/sbin/smbd(_tevent_loop_once+0x90) [0x55555588e450]
   #63 /usr/sbin/smbd(main+0xa19) [0x555555afdef9]
[2010/01/20 15:20:32,  0] lib/fault.c:326(dump_core)
  dumping core in /var/log/samba/cores/smbd
[2010/01/20 15:20:32,  0] smbd/sec_ctx.c:196(push_sec_ctx)
  Security context stack overflow!
[2010/01/20 15:20:32,  0] lib/util.c:1480(smb_panic)
  PANIC (pid 29047): Security context stack overflow!
[2010/01/20 15:20:32,  0] lib/util.c:1584(log_stack_trace)
  BACKTRACE: 64 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x1e) [0x55555587cabe]
   #1 /usr/sbin/smbd(smb_panic+0x1f) [0x55555587cdef]
   #2 /usr/sbin/smbd(push_sec_ctx+0x18c) [0x55555567186c]
   #3 /usr/sbin/smbd(become_root+0x9) [0x5555556617b9]
   #4 /usr/sbin/smbd(pdb_get_account_policy+0x26) [0x555555819966]
   #5 /usr/sbin/smbd(pdb_get_pass_must_change_time+0x29) [0x55555580f5a9]
   #6 /usr/sbin/smbd(init_buffer_from_samu+0xb0) [0x555555812850]
   #7 /usr/sbin/smbd(pdb_copy_sam_account+0x21) [0x555555815fa1]
   #8 /usr/sbin/smbd(pdb_getsampwsid+0xa2) [0x55555581ace2]
   #9 /usr/sbin/smbd [0x55555581ae2a]
   #10 /usr/sbin/smbd [0x55555581b7a1]
   #11 /usr/sbin/smbd(pdb_lookup_rids+0x49) [0x5555558199e9]
   #12 /usr/sbin/smbd(lookup_sids+0x394) [0x55555581e844]
   #13 /usr/sbin/smbd(lookup_sid+0x82) [0x555555820022]
   #14 /usr/sbin/smbd(pdb_get_group_sid+0x16e) [0x55555581191e]
   #15 /usr/sbin/smbd(pdb_get_group_rid+0xf) [0x55555581d07f]
   #16 /usr/sbin/smbd(init_buffer_from_samu+0xed) [0x55555581288d]
   #17 /usr/sbin/smbd(pdb_copy_sam_account+0x21) [0x555555815fa1]
   #18 /usr/sbin/smbd(pdb_getsampwsid+0xa2) [0x55555581ace2]
   #19 /usr/sbin/smbd [0x55555581ae2a]
   #20 /usr/sbin/smbd [0x55555581b7a1]
   #21 /usr/sbin/smbd(pdb_lookup_rids+0x49) [0x5555558199e9]
   #22 /usr/sbin/smbd(lookup_sids+0x394) [0x55555581e844]
   #23 /usr/sbin/smbd(lookup_sid+0x82) [0x555555820022]
   #24 /usr/sbin/smbd(pdb_get_group_sid+0x16e) [0x55555581191e]
   #25 /usr/sbin/smbd(pdb_get_group_rid+0xf) [0x55555581d07f]
   #26 /usr/sbin/smbd(init_buffer_from_samu+0xed) [0x55555581288d]
   #27 /usr/sbin/smbd(pdb_copy_sam_account+0x21) [0x555555815fa1]
   #28 /usr/sbin/smbd(pdb_getsampwsid+0xa2) [0x55555581ace2]
   #29 /usr/sbin/smbd [0x55555581ae2a]
   #30 /usr/sbin/smbd [0x55555581b7a1]
   #31 /usr/sbin/smbd(pdb_lookup_rids+0x49) [0x5555558199e9]
   #32 /usr/sbin/smbd(lookup_sids+0x394) [0x55555581e844]
   #33 /usr/sbin/smbd(lookup_sid+0x82) [0x555555820022]
   #34 /usr/sbin/smbd(pdb_get_group_sid+0x16e) [0x55555581191e]
   #35 /usr/sbin/smbd(pdb_get_group_rid+0xf) [0x55555581d07f]
   #36 /usr/sbin/smbd(init_buffer_from_samu+0xed) [0x55555581288d]
   #37 /usr/sbin/smbd(pdb_copy_sam_account+0x21) [0x555555815fa1]
   #38 /usr/sbin/smbd(pdb_getsampwsid+0xa2) [0x55555581ace2]
   #39 /usr/sbin/smbd [0x55555581ae2a]
   #40 /usr/sbin/smbd [0x55555581b7a1]
   #41 /usr/sbin/smbd(pdb_lookup_rids+0x49) [0x5555558199e9]
   #42 /usr/sbin/smbd(lookup_sids+0x394) [0x55555581e844]
   #43 /usr/sbin/smbd(lookup_sid+0x82) [0x555555820022]
   #44 /usr/sbin/smbd(pdb_get_group_sid+0x16e) [0x55555581191e]
   #45 /usr/sbin/smbd(pdb_get_group_rid+0xf) [0x55555581d07f]
   #46 /usr/sbin/smbd(init_buffer_from_samu+0xed) [0x55555581288d]
   #47 /usr/sbin/smbd(pdb_copy_sam_account+0x21) [0x555555815fa1]
   #48 /usr/sbin/smbd(copy_serverinfo+0xc3) [0x5555558cc903]
   #49 /usr/sbin/smbd [0x5555557f8819]
   #50 /usr/sbin/smbd(np_open+0xa3) [0x5555557fbeb3]
   #51 /usr/sbin/smbd(open_np_file+0xd7) [0x5555556397a7]
   #52 /usr/sbin/smbd [0x555555632c1c]
   #53 /usr/sbin/smbd(reply_ntcreate_and_X+0x621) [0x555555633901]
   #54 /usr/sbin/smbd [0x5555556822e8]
   #55 /usr/sbin/smbd [0x55555568495a]
   #56 /usr/sbin/smbd [0x555555684c35]
   #57 /usr/sbin/smbd(run_events+0x136) [0x55555588dcd6]
   #58 /usr/sbin/smbd(smbd_process+0x795) [0x555555684555]
   #59 /usr/sbin/smbd [0x555555afd42d]
   #60 /usr/sbin/smbd(run_events+0x136) [0x55555588dcd6]
   #61 /usr/sbin/smbd [0x55555588e05d]
   #62 /usr/sbin/smbd(_tevent_loop_once+0x90) [0x55555588e450]
   #63 /usr/sbin/smbd(main+0xa19) [0x555555afdef9]
[2010/01/20 15:20:32,  0] lib/fault.c:326(dump_core)
  dumping core in /var/log/samba/cores/smbd

Attempted changing the machine and the same thing happens.
Comment 3 Maxxer 2010-02-22 03:09:09 UTC
getting something similar on 3.4.3 on debian lenny
Comment 4 Ulli Brennenstuhl 2011-07-26 14:27:23 UTC
Hi,

I encountered the same error on a box with samba 3.4.3-1.27.7 (SUSE Sles 11SP1 x86_64).

The Problem was faulty data in the Ldap Database. We had a user and group with the same RID, so the ldap search for SID-RID returns two results. The interesting thing is that we found this while migrating from one machine to another and on the old machine with samba Version 3.5.6 (3.5.6-13.1-2472-SUSE-CODE10-x86_64 SLES 10 SP3 x86_64) with exactly the same data in the ldap database this error does not occur. While I think this error is rather rare it would be good to catch this error and give a more meaningful error message in order to help people to speed up troubleshooting.

Regards,

Ulli Brennenstuhl