[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Segfault lurking in ktutil's krb5_principal_get_realm()?




Heimdal 0.6 on Solaris x86 5.9 might segfault when the reverse lookup of
your own IP gives you a hostname without domain part:

myhost$ cat /etc/hosts 
#
# Internet host table
#
127.0.0.1       localhost       
17.17.17.17 myhost loghost

#/usr/heimdal/sbin/ktutil get -p haba/admin host/myhost.pdc.kth.se

<dumps core> 

# dbx /usr/heimdal/sbin/ktutil core 

(...)

dbx: warning: can't find file "/var/build/heimdal-0.6-cli/admin/ktutil.o"
dbx: warning: can't find file "/var/build/heimdal-0.6-cli/admin/get.o"
dbx: warning: can't find file "/var/build/heimdal-0.6-cli/lib/sl/sl.lo"
(dbx) where
=>[1] krb5_principal_get_realm(0x8068870, 0x1), at 0xceae1028
  [2] kt_get(0x2, 0x8047db4), at 0x804d59a
  [3] sl_command(0x8063778, 0x2, 0x8047db4), at 0xce9958a0
  [4] main(0x2, 0x8047db4, 0x8047dc0), at 0x804dddd

Workaround1: Specify realm like this:

#/usr/heimdal/sbin/ktutil get -p haba/admin -r NADA.KTH.SE host/myhost.pdc.kth.se

Workaround2: Fix your reverse lookup:

myhost# cat > /etc/hosts 
#
# Internet host table
#
127.0.0.1       localhost       
17.17.17.17 myhost.pdc.kth.se myhost loghost

Sorry, I can't be more specific, some nice person built the binaries for me, so
I don't have the corresponding source handy.

Harald.