[krbdev.mit.edu #1770] [Maurice Massar] Bug#206851: krb5-kdc: krb5kdc segfaults on startup

Sam Hartman via RT rt-comment at krbdev.mit.edu
Sun Aug 24 14:35:12 EDT 2003


Return-Path: <debbugs at master.debian.org>
Received: from solipsist-nation ([unix socket])
	by solipsist-nation (Cyrus v2.1.5-Debian2.1.5-1) with LMTP; Sat, 23 Aug
 2003 10:03:22 -0400
X-Sieve: CMU Sieve 2.2
Return-Path: <debbugs at master.debian.org>
Received: from fort-point-station.mit.edu (FORT-POINT-STATION.MIT.EDU
 [18.7.7.76])
	by suchdamage.org (Postfix) with ESMTP id B61DC1324F
	for <hartmans at suchdamage.org>; Sat, 23 Aug 2003 10:03:20 -0400 (EDT)
Received: from master.debian.org (master.debian.org [146.82.138.7])
	by fort-point-station.mit.edu (8.12.4/8.9.2) with ESMTP id h7NE3K5a004251
	for <hartmans at mit.edu>; Sat, 23 Aug 2003 10:03:20 -0400 (EDT)
Received: from debbugs by master.debian.org with local (Exim 3.35 1
 (Debian))
	id 19qYyv-0006RJ-00; Sat, 23 Aug 2003 09:03:05 -0500
X-Loop: owner at bugs.debian.org
Subject: Bug#206851: krb5-kdc: krb5kdc segfaults on startup
Reply-To: Maurice Massar <massar at unix-ag.uni-kl.de>,
	206851 at bugs.debian.org
Resent-From: Maurice Massar <massar at unix-ag.uni-kl.de>
Original-Sender: TOMOE Hotaru <rm at hsg.kaiserslautern.de>
Resent-To: debian-bugs-dist at lists.debian.org
Resent-Cc: Sam Hartman <hartmans at debian.org>
Resent-Date: Sat, 23 Aug 2003 14:03:04 UTC
Resent-Message-ID: <handler.206851.B.106164683411371 at bugs.debian.org>
X-Debian-PR-Message: report 206851
X-Debian-PR-Package: krb5-kdc
X-Debian-PR-Keywords: patch sid
Received: via spool by submit at bugs.debian.org id=B.106164683411371
          (code B ref -1); Sat, 23 Aug 2003 14:03:04 UTC
Received: (at submit) by bugs.debian.org; 23 Aug 2003 13:53:54 +0000
Received: from pd9e38415.dip.t-dialin.net
 (linux1.hsg.schulen.kaiserslautern.de) [217.227.132.21] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 19qYpt-0002vy-00; Sat, 23 Aug 2003 08:53:45 -0500
Received: from rm by linux1.hsg.schulen.kaiserslautern.de with local (Exim
 3.36 #1 (Debian))
	id 19qYpn-0005iT-00; Sat, 23 Aug 2003 15:53:39 +0200
From: Maurice Massar <massar at unix-ag.uni-kl.de>
To: Debian Bug Tracking System <submit at bugs.debian.org>
X-Mailer: reportbug 2.24
Date: Sat, 23 Aug 2003 15:53:39 +0200
Message-Id: <E19qYpn-0005iT-00 at linux1.hsg.schulen.kaiserslautern.de>
Sender: TOMOE Hotaru <rm at hsg.kaiserslautern.de>
Delivered-To: submit at bugs.debian.org
X-Spam-Level: 
Resent-Sender: Debian BTS <debbugs at master.debian.org>
X-Spam-Status: No, hits=-9.5 required=5.0
 tests=SENT_BY_BTS,FORGED_RCVD_FOUND,UNIFIED_PATCH version=2.20
X-Spam-Level: 
MIME-Version: 1.0

Package: krb5-kdc
Version: 1.3-2
Severity: important
Tags: sid patch

hi,

on my System krb5kdc segfaults on startup.
syslog shows this:
Aug 23 14:30:21 linux1 krb5kdc[10198]: setting up network...
Aug 23 14:30:21 linux1 krb5kdc[10198]: setting up network...
Aug 23 14:30:21 linux1 krb5kdc[10198]: skipping unrecognized local address family 17
Aug 23 14:30:21 linux1 last message repeated 7 times
(it looks like all messages get logged twice, but I haven't checked yet if
this is not a local config problem on my system)

I debugged this with gdb and found that the problem is in
krb5-1.3/src/include/foreachaddr.c, where foreach_localaddr()
assumes that getifaddrs() never returns an entry with ifp->ifa_addr == NULL

writing a small test program I found that to be not the case on my system:
ifaddr @ 0x0x804a2bc
next: 0x0x804a340
name: `ppp0'
flags: 0x10D1
addr: (null)
netmask: (null)
broadaddr: (null)
dstaddr: (null)
data: 0x0x804a92c

this small patch should solve that

--- krb5-1.3.orig/src/include/foreachaddr.c
+++ krb5-1.3/src/include/foreachaddr.c
@@ -382,6 +382,8 @@
 #endif 
        if ((ifp->ifa_flags & IFF_UP) == 0)
            continue;
+       if (!ifp->ifa_addr)
+           continue;
        if (ifp->ifa_flags & IFF_LOOPBACK) {
            ifp->ifa_flags &= ~IFF_UP;
            continue;
@@ -393,6 +395,8 @@
                continue;
            if (ifp2->ifa_flags & IFF_LOOPBACK)
                continue;
+           if (!ifp2->ifa_addr)
+               continue;
            if (addr_eq (ifp->ifa_addr, ifp2->ifa_addr)) {
                match = 1;
                ifp->ifa_flags &= ~IFF_UP;


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux linux1 2.4.21-2-686 #1 Sat Jul 5 00:38:35 EST 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages krb5-kdc depends on:
ii  debconf       1.3.11                     Debian configuration management sy
ii  krb5-user     1.3-2                      Basic programs to authenticate usi
ii  libc6         2.3.2-3                    GNU C Library: Shared libraries an
ii  libcomerr2    1.34+1.35-WIP-2003.08.21-2 The Common Error Description libra
ii  libkadm55     1.3-2                      MIT Kerberos administration runtim
ii  libkrb53      1.3-2                      MIT Kerberos runtime libraries

-- debconf information:
  krb5-kdc/debconf: yes
  krb5-kdc/run-krb524: true
* krb5-kdc/krb4-mode: nopreauth





More information about the krb5-bugs mailing list