Subject: bin/11860: [heimdal/kdc] kdc segfaults
To: None <gnats-bugs@gnats.netbsd.org>
From: None <itojun@itojun.org>
List: netbsd-bugs
Date: 12/30/2000 21:51:15
>Number:         11860
>Category:       bin
>Synopsis:       [heimdal/kdc] kdc segfaults
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 30 21:51:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Jun-ichiro itojun Hagino
>Release:        <NetBSD-current source date>
>Organization:
	itojun.org
>Environment:
	
System: NetBSD starfruit.itojun.org 1.5Q NetBSD 1.5Q (STARFRUIT) #304: Sat Dec 30 13:09:57 JST 2000 itojun@starfruit.itojun.org:/usr/home/itojun/NetBSD/src/sys/arch/i386/compile/STARFRUIT i386
Architecture: i386
Machine: i386
>Description:
	i was trying to run kdc on my laptop as slave server, so that it could
	be used while my laptop is disconnected from outside network.
	since it is a laptop, i don't have fixed IP address for this machine.

 >kdc = localhost kerberos.itojun.org
 >kdc = localhost
	with both of the above configuration, kdc segfaults.
	
	- is it legal to have more than one name on "kdc" line?
	- is it legal to contact kdc by "localhost"?
	- what is the best way to run kerberos in disconnected environment?
	  i don't want kinit (or /bin/login) to wait forever.

	another thing: kdc.log seems strange.  what is "T" between date string
	and time string?
 >2000-12-31T14:47:06 AS-REQ itojun@ITOJUN.ORG from IPv6:::1 for krbtgt/ITOJUN.ORG@ITOJUN.ORG

>How-To-Repeat:
[libdefaults]
	default_realm = ITOJUN.ORG
[realms]
	ITOJUN.ORG = {
		kdc = localhost kerberos.itojun.org
	}

(gdb) bt
#0  0x4807a821 in hdb_unseal_keys_mkey ()
#1  0x4807a89f in hdb_unseal_keys ()
#2  0x4807785a in _hdb_fetch ()
#3  0x8053b0d in db_fetch (principal=0x805c2f0)
    at /home/itojun/NetBSD/src/usr.sbin/kdc/../../crypto/dist/heimdal/kdc/misc.c:56
#4  0x80507d8 in as_rep (req=0xbfbfd530, reply=0xbfbfd594, 
    from=0x805f520 "IPv6:::1", from_addr=0x805f498)
    at /home/itojun/NetBSD/src/usr.sbin/kdc/../../crypto/dist/heimdal/kdc/kerberos5.c:493
#5  0x804cf14 in process_request (
    buf=0x806a000 "j\202\001\0220\202\001\016(I!(B\003\002\001\005(I"(B\003\002\001\n(I$(B\202\001", len=278, reply=0xbfbfd594, sendlength=0xbfbfd5b0, 
    from=0x805f520 "IPv6:::1", addr=0x805f498)
    at /home/itojun/NetBSD/src/usr.sbin/kdc/../../crypto/dist/heimdal/kdc/connect.c:371
#6  0x804d0e1 in do_request (buf=0x806a000, len=278, sendlength=0, d=0x805f480)
    at /home/itojun/NetBSD/src/usr.sbin/kdc/../../crypto/dist/heimdal/kdc/connect.c:425
#7  0x804d325 in handle_udp (d=0x805f480)
    at /home/itojun/NetBSD/src/usr.sbin/kdc/../../crypto/dist/heimdal/kdc/connect.c:477
#8  0x804e1ab in loop ()
---Type <return> to continue, or q <return> to quit--- 
    at /home/itojun/NetBSD/src/usr.sbin/kdc/../../crypto/dist/heimdal/kdc/connect.c:787
#9  0x8053a16 in main (argc=2, argv=0xbfbfd6a4)
    at /home/itojun/NetBSD/src/usr.sbin/kdc/../../crypto/dist/heimdal/kdc/main.c:104
#10 0x804b44d in ___start ()
(gdb) 

me/itojun/NetBSD/src/usr.sbin/kdc/../../crypto/dist/heimdal/kdc/connect.c:477
#8  0x804e1ab in loop ()
---Type <return> to continue, or q <return> to quit--- 
    at /home/itojun/NetBSD/src/usr.sbin/kdc/../../crypto/dist/heimdal/kdc/connect.c:787
#9  0x8053a16 in main (argc=2, argv=0xbfbfd6a4)
    at /home/itojun/NetBSD/src/usr.sbin/kdc/../../crypto/dist/heimdal/kdc/main.c:104
#10 0x804b44d in ___start ()
>Fix:
	?
>Release-Note:
>Audit-Trail:
>Unformatted: