diff options
author | cy <cy@FreeBSD.org> | 2015-05-04 04:45:59 +0000 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2015-05-04 04:45:59 +0000 |
commit | 1818eba70c74c4ba7173ef82fd98d197914adc74 (patch) | |
tree | 62ff96a32b854c652d9d65280d1d6fd2089b2f1e /contrib/ntp/ntpd/refclock_palisade.c | |
parent | 46cb5cb412522de16502b815c1126a1bf652045b (diff) | |
parent | f63afe28012870b3eb07e80844160966b32ef52e (diff) | |
download | FreeBSD-src-1818eba70c74c4ba7173ef82fd98d197914adc74.zip FreeBSD-src-1818eba70c74c4ba7173ef82fd98d197914adc74.tar.gz |
MFV ntp 4.2.8p2 (r281348)
Reviewed by: delphij (suggested MFC)
Approved by: roberto
Security: CVE-2015-1798, CVE-2015-1799
Security: VuXML ebd84c96-dd7e-11e4-854e-3c970e169bc2
MFC after: 1 month
Diffstat (limited to 'contrib/ntp/ntpd/refclock_palisade.c')
-rw-r--r-- | contrib/ntp/ntpd/refclock_palisade.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/ntp/ntpd/refclock_palisade.c b/contrib/ntp/ntpd/refclock_palisade.c index 2b396d8..0520311 100644 --- a/contrib/ntp/ntpd/refclock_palisade.c +++ b/contrib/ntp/ntpd/refclock_palisade.c @@ -584,7 +584,10 @@ TSIP_decode ( break; } - if (up->leap_status & PALISADE_LEAP_PENDING) { + up->month = mb(15); + if ( (up->leap_status & PALISADE_LEAP_PENDING) && + /* Avoid early announce: https://bugs.ntp.org/2773 */ + (6 == up->month || 12 == up->month) ) { if (up->leap_status & PALISADE_UTC_TIME) pp->leap = LEAP_ADDSECOND; else @@ -615,6 +618,7 @@ TSIP_decode ( pp->hour = mb(11); pp->minute = mb(12); pp->second = mb(13); + up->month = mb(14); /* Save for LEAP check */ #ifdef DEBUG if (debug > 1) @@ -645,7 +649,9 @@ TSIP_decode ( printf("TSIP_decode: unit %d\n", up->unit); } #endif - if (getint((u_char *) &mb(10)) & 0x80) + if ( (getint((u_char *) &mb(10)) & 0x80) && + /* Avoid early announce: https://bugs.ntp.org/2773 */ + (6 == up->month || 12 == up->month) ) pp->leap = LEAP_ADDSECOND; /* we ASSUME addsecond */ else pp->leap = LEAP_NOWARNING; |