>Number:         169439
>Category:       bin
>Synopsis:       [patch] Stock ntpd segfaults when used with GPS pps source
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 26 09:50:03 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Eugene Grosbein
>Release:        FreeBSD 8.3-STABLE amd64
>Organization:
RDTC JSC
>Environment:
System: FreeBSD syslog.sd.rdtc.ru 8.3-STABLE FreeBSD 8.3-STABLE #4: Wed Jun 20 
01:33:15 NOVT 2012 
[email protected]:/usr/local/obj/usr/local/src/sys/SYSLOG amd64

>Description:
        
        From my /etc/ntp.conf:

#       The GPS receiver on cuau3 at 4800 baud
#
#       mode 1 = use $GPRMC statements
#       time1 = trimming offset
#       flag3 1 = enable Kernel PPS discipline
#
server 127.127.20.1 mode 1 iburst maxpoll 9 prefer
fudge 127.127.20.1 time1 0.000 flag3 1 refid PPS

        ntpd segfaults while parsing configuration due to missing check for 
NULL pointer.

>How-To-Repeat:
        See above
>Fix:

--- contrib/ntp/ntpd/refclock_nmea.c.orig       2012-06-26 16:10:46.000000000 
+0700
+++ contrib/ntp/ntpd/refclock_nmea.c    2012-06-26 16:11:12.000000000 +0700
@@ -257,7 +257,7 @@
        pp = peer->procptr;
        up = (struct nmeaunit *)pp->unitptr;
 #ifdef HAVE_PPSAPI
-       if (up->handle != 0)
+       if (up && up->handle != 0)
                time_pps_destroy(up->handle);
 #endif /* HAVE_PPSAPI */
        io_closeclock(&pp->io);


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to