Subject: bin/1666: syslogd seg faults if it cannot resolve a host in /etc/syslogd.conf
To: None <gnats-bugs@gnats.netbsd.org>
From: Neil J. McRae <neil@demon.net>
List: netbsd-bugs
Date: 10/21/1995 17:14:37
>Number:         1666
>Category:       bin
>Synopsis:       syslogd seg faults if it cannot resolve a host in /etc/syslogd.conf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 21 12:35:00 1995
>Last-Modified:
>Originator:     Neil J. McRae
>Organization:
Neil J. McRae.                                            Demon Internet
neil@demon.net
 NetBSD: Free the daemon in your <a href="http://www.NetBSD.ORG/">computer!</a>
>Release:        Mon Oct 16
>Environment:
	
System: NetBSD NetBSD.corp.demon.net 1.1_ALPHA NetBSD 1.1_ALPHA (NETBSD) #0: Mon Oct 16 21:22:03 BST 1995 neil@NetBSD.demon.net:/usr/src/sys/arch/sparc/compile/NETBSD sparc
Make world as of above date.

>Description:
I booted my netbsd/sparc however the ethernet cable was not plugged in and 
the syslogd seg faulted.
On starting syslogd having a host listed in syslogd.conf that cannot be
resolved appears to cause a segmentation fault. I cannot make this happen
everytime though, and the trace below reaches past :

        switch (*p)
        {
        case '@':

where hostnames are checked.
 
 Core was generated by `syslogd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from /usr/lib/libc.so.12.3...done.
#0  0x4069920 in strlen ()
(gdb) bt
#0  0x4069920 in strlen ()
#1  0x4067144 in vfprintf ()
#2  0x405746c in sprintf ()
#3  0x43f4 in fprintlog (f=0xf7ffe1a8, flags=0, msg=0x0) at syslogd.c:620
#4  0x4efc in die (sig=0) at syslogd.c:839
#5  0x4800 in wallmsg (f=0xe800, iov=0x0) at syslogd.c:719
#6  0x3150 in main (argc=0, argv=0x0) at syslogd.c:271

>How-To-Repeat:
 Create a syslog.conf with a host in it that is unresolvable.
>Fix:

>Audit-Trail:
>Unformatted: