After a recompile and trapping the problem with gdb:

(gdb) r
Starting program: /usr/sbin/ntpd -n

Program received signal SIGSEGV, Segmentation fault.
sendpkt (dest=0x47e10, inter=0x0, ttl=0, pkt=0xeffff648, len=48)
    at ../../ntpd/ntp_io.c:1413
1413            switch (inter->sin.ss_family) {
(gdb) bt
#0  sendpkt (dest=0x47e10, inter=0x0, ttl=0, pkt=0xeffff648, len=48)
    at ../../ntpd/ntp_io.c:1413
#1  0x0002ab0c in peer_xmit (peer=0x47e08) at
../../ntpd/ntp_proto.c:2418
#2  0x0002696c in transmit (peer=0x47e08) at ../../ntpd/ntp_proto.c:301
#3  0x00032684 in timer () at ../../ntpd/ntp_timer.c:289
#4  0x00019818 in ntpdmain (argc=535552, argv=0x8cff8)
    at ../../ntpd/ntpd.c:1079
#5  0x701f8db8 in __libc_start_main () from /lib/libc.so.6
#6  0x00012c00 in _start () at ../sysdeps/sparc/sparc32/elf/start.S:56
#7  0x00012c00 in _start () at ../sysdeps/sparc/sparc32/elf/start.S:56
Previous frame identical to this frame (corrupt stack?)
(gdb) 

Obviously dereferencing a null pointer is not a healthy choice.

I caused that by connecting from a remote host using 'ntpd succubus'
and using the 'peers' command.

Here is another crash

(gdb) r
Starting program: /usr/sbin/ntpd -n

Program received signal SIGSEGV, Segmentation fault.
socktoa (sock=0x8) at ../../libntp/socktoa.c:36
36              switch(sock->ss_family) {
(gdb) bt
#0  socktoa (sock=0x8) at ../../libntp/socktoa.c:36
#1  0x0001aa74 in ctl_putadr (tag=0xeffff67f "=123", addr32=0, addr=0x8)
    at ../../ntpd/ntp_control.c:1103
#2  0x0001b308 in ctl_putpeer (varid=6, peer=0x47e08)
    at ../../ntpd/ntp_control.c:1438
#3  0x0001c550 in read_variables (rbufp=0x8cff8, restrict_mask=128)
    at ../../ntpd/ntp_control.c:2147
#4  0x0001a0a8 in process_control (rbufp=0x8cff8, restrict_mask=128)
    at ../../ntpd/ntp_control.c:697
#5  0x00027920 in receive (rbufp=0x8cff8) at ../../ntpd/ntp_proto.c:381
#6  0x000197f8 in ntpdmain (argc=535552, argv=0x0) at
../../ntpd/ntpd.c:1092
#7  0x701f8db8 in __libc_start_main () from /lib/libc.so.6
#8  0x00012c00 in _start () at ../sysdeps/sparc/sparc32/elf/start.S:56
#9  0x00012c00 in _start () at ../sysdeps/sparc/sparc32/elf/start.S:56
Previous frame identical to this frame (corrupt stack?)

which is caused by ntpq -pn

Anand

-- 
linux.conf.au 2005   -  http://lca2005.linux.org.au/  -  Birthplace of Tux
April 18th to 23rd   -  http://lca2005.linux.org.au/  -       LINUX
Canberra, Australia  -  http://lca2005.linux.org.au/  -    Get bitten!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to