xref: /freebsd/contrib/ntp/NEWS (revision 052d159a8b83f03d7dc5eb31cd9a9b4a6fe3d9da)
1*052d159aSCy Schubert---
2*052d159aSCy SchubertNTP 4.2.8p13 (Harlan Stenn <stenn@ntp.org>, 2019 Mar 07)
3*052d159aSCy Schubert
4*052d159aSCy SchubertFocus: Security, Bug fixes, enhancements.
5*052d159aSCy Schubert
6*052d159aSCy SchubertSeverity: MEDIUM
7*052d159aSCy Schubert
8*052d159aSCy SchubertThis release fixes a bug that allows an attacker with access to an
9*052d159aSCy Schubertexplicitly trusted source to send a crafted malicious mode 6 (ntpq)
10*052d159aSCy Schubertpacket that can trigger a NULL pointer dereference, crashing ntpd.
11*052d159aSCy SchubertIt also provides 17 other bugfixes and 1 other improvement:
12*052d159aSCy Schubert
13*052d159aSCy Schubert* [Sec 3565] Crafted null dereference attack in authenticated
14*052d159aSCy Schubert	     mode 6 packet <perlinger@ntp.org>
15*052d159aSCy Schubert  - reported by Magnus Stubman
16*052d159aSCy Schubert* [Bug 3560] Fix build when HAVE_DROPROOT is not defined <perlinger@ntp.org>
17*052d159aSCy Schubert  - applied patch by Ian Lepore
18*052d159aSCy Schubert* [Bug 3558] Crash and integer size bug <perlinger@ntp.org>
19*052d159aSCy Schubert  - isolate and fix linux/windows specific code issue
20*052d159aSCy Schubert* [Bug 3556] ntp_loopfilter.c snprintf compilation warnings <perlinger@ntp.org>
21*052d159aSCy Schubert  - provide better function for incremental string formatting
22*052d159aSCy Schubert* [Bug 3555] Tidy up print alignment of debug output from ntpdate <perlinger@ntp.org>
23*052d159aSCy Schubert  - applied patch by Gerry Garvey
24*052d159aSCy Schubert* [Bug 3554] config revoke stores incorrect value <perlinger@ntp.org>
25*052d159aSCy Schubert  - original finding by Gerry Garvey, additional cleanup needed
26*052d159aSCy Schubert* [Bug 3549] Spurious initgroups() error message <perlinger@ntp.org>
27*052d159aSCy Schubert  - patch by Christous Zoulas
28*052d159aSCy Schubert* [Bug 3548] Signature not verified on windows system <perlinger@ntp.org>
29*052d159aSCy Schubert  - finding by Chen Jiabin, plus another one by me
30*052d159aSCy Schubert* [Bug 3541] patch to fix STA_NANO struct timex units <perlinger@ntp.org>
31*052d159aSCy Schubert  - applied patch by Maciej Szmigiero
32*052d159aSCy Schubert* [Bug 3540] Cannot set minsane to 0 anymore <perlinger@ntp.org>
33*052d159aSCy Schubert  - applied patch by Andre Charbonneau
34*052d159aSCy Schubert* [Bug 3539] work_fork build fails when droproot is not supported <perlinger@ntp.org>
35*052d159aSCy Schubert  - applied patch by Baruch Siach
36*052d159aSCy Schubert* [Bug 3538] Build fails for no-MMU targets <perlinger@ntp.org>
37*052d159aSCy Schubert  - applied patch by Baruch Siach
38*052d159aSCy Schubert* [Bug 3535] libparse won't handle GPS week rollover <perlinger@ntp.org>
39*052d159aSCy Schubert  - refactored handling of GPS era based on 'tos basedate' for
40*052d159aSCy Schubert    parse (TSIP) and JUPITER clocks
41*052d159aSCy Schubert* [Bug 3529] Build failures on Mac OS X 10.13 (High Sierra) <perlinger@ntp.org>
42*052d159aSCy Schubert  - patch by Daniel J. Luke; this does not fix a potential linker
43*052d159aSCy Schubert    regression issue on MacOS.
44*052d159aSCy Schubert* [Bug 3527 - Backward Incompatible] mode7 clockinfo fudgeval2 packet
45*052d159aSCy Schubert  anomaly <perlinger@ntp.org>, reported by GGarvey.
46*052d159aSCy Schubert  - --enable-bug3527-fix support by HStenn
47*052d159aSCy Schubert* [Bug 3526] Incorrect poll interval in packet <perlinger@ntp.org>
48*052d159aSCy Schubert  - applied patch by Gerry Garvey
49*052d159aSCy Schubert* [Bug 3471] Check for openssl/[ch]mac.h.  <perlinger@ntp.org>
50*052d159aSCy Schubert  - added missing check, reported by Reinhard Max <perlinger@ntp.org>
51*052d159aSCy Schubert* [Bug 1674] runtime crashes and sync problems affecting both x86 and x86_64
52*052d159aSCy Schubert  - this is a variant of [bug 3558] and should be fixed with it
53*052d159aSCy Schubert* Implement 'configure --disable-signalled-io'
54*052d159aSCy Schubert
55f0574f5cSXin LI--
564e1ef62aSXin LINTP 4.2.8p12 (Harlan Stenn <stenn@ntp.org>, 2018/14/09)
5709100258SXin LI
5809100258SXin LIFocus: Security, Bug fixes, enhancements.
5909100258SXin LI
6009100258SXin LISeverity: MEDIUM
6109100258SXin LI
624e1ef62aSXin LIThis release fixes a "hole" in the noepeer capability introduced to ntpd
634e1ef62aSXin LIin ntp-4.2.8p11, and a buffer overflow in the openhost() function used by
644e1ef62aSXin LIntpq and ntpdc.  It also provides 26 other bugfixes, and 4 other improvements:
654e1ef62aSXin LI
664e1ef62aSXin LI* [Sec 3505] Buffer overflow in the openhost() call of ntpq and ntpdc.
674e1ef62aSXin LI
684e1ef62aSXin LI* [Sec 3012] Fix a hole in the new "noepeer" processing.
694e1ef62aSXin LI
704e1ef62aSXin LI* Bug Fixes:
714e1ef62aSXin LI [Bug 3521] Fix a logic bug in the INVALIDNAK checks.  <stenn@ntp.org>
724e1ef62aSXin LI [Bug 3509] Add support for running as non-root on FreeBSD, Darwin,
734e1ef62aSXin LI            other TrustedBSD platforms
744e1ef62aSXin LI - applied patch by Ian Lepore <perlinger@ntp.org>
754e1ef62aSXin LI [Bug 3506] Service Control Manager interacts poorly with NTPD <perlinger@ntp.org>
764e1ef62aSXin LI - changed interaction with SCM to signal pending startup
774e1ef62aSXin LI [Bug 3486] Buffer overflow in ntpq/ntpq.c:tstflags() <perlinger@ntp.org>
784e1ef62aSXin LI - applied patch by Gerry Garvey
794e1ef62aSXin LI [Bug 3485] Undefined sockaddr used in error messages in ntp_config.c <perlinger@ntp.org>
804e1ef62aSXin LI - applied patch by Gerry Garvey
814e1ef62aSXin LI [Bug 3484] ntpq response from ntpd is incorrect when REFID is null <perlinger@ntp.org>
824e1ef62aSXin LI - rework of ntpq 'nextvar()' key/value parsing
834e1ef62aSXin LI [Bug 3482] Fixes for compilation warnings (ntp_io.c & ntpq-subs.c) <perlinger@ntp.org>
844e1ef62aSXin LI - applied patch by Gerry Garvey (with mods)
854e1ef62aSXin LI [Bug 3480] Refclock sample filter not cleared on clock STEP <perlinger@ntp.org>
864e1ef62aSXin LI - applied patch by Gerry Garvey
874e1ef62aSXin LI [Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq <perlinger@ntp.org>
884e1ef62aSXin LI - applied patch by Gerry Garvey (with mods)
894e1ef62aSXin LI [Bug 3476]ctl_putstr() sends empty unquoted string [...] <perlinger@ntp.org>
904e1ef62aSXin LI - applied patch by Gerry Garvey (with mods); not sure if that's bug or feature, though
914e1ef62aSXin LI [Bug 3475] modify prettydate() to suppress output of zero time <perlinger@ntp.org>
924e1ef62aSXin LI - applied patch by Gerry Garvey
934e1ef62aSXin LI [Bug 3474] Missing pmode in mode7 peer info response <perlinger@ntp.org>
944e1ef62aSXin LI - applied patch by Gerry Garvey
954e1ef62aSXin LI [Bug 3471] Check for openssl/[ch]mac.h.  HStenn.
964e1ef62aSXin LI - add #define ENABLE_CMAC support in configure.  HStenn.
974e1ef62aSXin LI [Bug 3470] ntpd4.2.8p11 fails to compile without OpenSSL <perlinger@ntp.org>
984e1ef62aSXin LI [Bug 3469] Incomplete string compare [...] in is_refclk_addr <perlinger@ntp.org>
994e1ef62aSXin LI - patch by Stephen Friedl
1004e1ef62aSXin LI [Bug 3467] Potential memory fault in ntpq [...] <perlinger@ntp.org>
1014e1ef62aSXin LI - fixed IO redirection and CTRL-C handling in ntq and ntpdc
1024e1ef62aSXin LI [Bug 3465] Default TTL values cannot be used <perlinger@ntp.org>
1034e1ef62aSXin LI [Bug 3461] refclock_shm.c: clear error status on clock recovery <perlinger@ntp.org>
1044e1ef62aSXin LI - initial patch by Hal Murray; also fixed refclock_report() trouble
1054e1ef62aSXin LI [Bug 3460] Fix typo in ntpq.texi, reported by Kenyon Ralph.  <stenn@ntp.org>
1064e1ef62aSXin LI [Bug 3456] Use uintptr_t rather than size_t to store an integer in a pointer
1074e1ef62aSXin LI - According to Brooks Davis, there was only one location <perlinger@ntp.org>
1084e1ef62aSXin LI [Bug 3449] ntpq - display "loop" instead of refid [...] <perlinger@ntp.org>
1094e1ef62aSXin LI - applied patch by Gerry Garvey
1104e1ef62aSXin LI [Bug 3445] Symmetric peer won't sync on startup <perlinger@ntp.org>
1114e1ef62aSXin LI - applied patch by Gerry Garvey
1124e1ef62aSXin LI [Bug 3442] Fixes for ntpdate as suggested by Gerry Garvey,
1134e1ef62aSXin LI with modifications
1144e1ef62aSXin LI New macro REFID_ISTEXT() which is also used in ntpd/ntp_control.c.
1154e1ef62aSXin LI [Bug 3434] ntpd clears STA_UNSYNC on start <perlinger@ntp.org>
1164e1ef62aSXin LI - applied patch by Miroslav Lichvar
1174e1ef62aSXin LI [Bug 3426] ntpdate.html -t default is 2 seconds.  Leonid Evdokimov.
1184e1ef62aSXin LI [Bug 3121] Drop root privileges for the forked DNS worker <perlinger@ntp.org>
1194e1ef62aSXin LI - integrated patch by  Reinhard Max
1204e1ef62aSXin LI [Bug 2821] minor build issues <perlinger@ntp.org>
1214e1ef62aSXin LI - applied patches by Christos Zoulas, including real bug fixes
1224e1ef62aSXin LI html/authopt.html: cleanup, from <stenn@ntp.org>
1234e1ef62aSXin LI ntpd/ntpd.c: DROPROOT cleanup.  <stenn@ntp.org>
1244e1ef62aSXin LI Symmetric key range is 1-65535.  Update docs.   <stenn@ntp.org>
1254e1ef62aSXin LI
1264e1ef62aSXin LI--
1274e1ef62aSXin LINTP 4.2.8p11 (Harlan Stenn <stenn@ntp.org>, 2018/02/27)
1284e1ef62aSXin LI
1294e1ef62aSXin LIFocus: Security, Bug fixes, enhancements.
1304e1ef62aSXin LI
1314e1ef62aSXin LISeverity: MEDIUM
1324e1ef62aSXin LI
13309100258SXin LIThis release fixes 2 low-/medium-, 1 informational/medum-, and 2 low-severity
13409100258SXin LIvulnerabilities in ntpd, one medium-severity vulernability in ntpq, and
13509100258SXin LIprovides 65 other non-security fixes and improvements:
13609100258SXin LI
13709100258SXin LI* NTP Bug 3454: Unauthenticated packet can reset authenticated interleaved
13809100258SXin LI	association (LOW/MED)
13909100258SXin LI   Date Resolved: Stable (4.2.8p11) 27 Feb 2018
14009100258SXin LI   References: Sec 3454 / CVE-2018-7185 / VU#961909
14109100258SXin LI   Affects: ntp-4.2.6, up to but not including ntp-4.2.8p11.
14209100258SXin LI   CVSS2: MED 4.3 (AV:N/AC:M/Au:N/C:N/I:N/A:P) This could score between
14309100258SXin LI	2.9 and 6.8.
14409100258SXin LI   CVSS3: LOW 3.1 CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L This could
14509100258SXin LI	score between 2.6 and 3.1
14609100258SXin LI   Summary:
14709100258SXin LI	The NTP Protocol allows for both non-authenticated and
14809100258SXin LI	authenticated associations, in client/server, symmetric (peer),
14909100258SXin LI	and several broadcast modes. In addition to the basic NTP
15009100258SXin LI	operational modes, symmetric mode and broadcast servers can
15109100258SXin LI	support an interleaved mode of operation. In ntp-4.2.8p4 a bug
15209100258SXin LI	was inadvertently introduced into the protocol engine that
15309100258SXin LI	allows a non-authenticated zero-origin (reset) packet to reset
15409100258SXin LI	an authenticated interleaved peer association. If an attacker
15509100258SXin LI	can send a packet with a zero-origin timestamp and the source
15609100258SXin LI	IP address of the "other side" of an interleaved association,
15709100258SXin LI	the 'victim' ntpd will reset its association. The attacker must
15809100258SXin LI	continue sending these packets in order to maintain the
15909100258SXin LI	disruption of the association. In ntp-4.0.0 thru ntp-4.2.8p6,
16009100258SXin LI	interleave mode could be entered dynamically. As of ntp-4.2.8p7,
16109100258SXin LI	interleaved mode must be explicitly configured/enabled.
16209100258SXin LI   Mitigation:
16309100258SXin LI	Implement BCP-38.
16409100258SXin LI	Upgrade to 4.2.8p11, or later, from the NTP Project Download Page
16509100258SXin LI	    or the NTP Public Services Project Download Page.
16609100258SXin LI	If you are unable to upgrade to 4.2.8p11 or later and have
16709100258SXin LI	    'peer HOST xleave' lines in your ntp.conf file, remove the
16809100258SXin LI	    'xleave' option.
16909100258SXin LI	Have enough sources of time.
17009100258SXin LI	Properly monitor your ntpd instances.
17109100258SXin LI	If ntpd stops running, auto-restart it without -g .
17209100258SXin LI   Credit:
17309100258SXin LI   	This weakness was discovered by Miroslav Lichvar of Red Hat.
17409100258SXin LI
17509100258SXin LI* NTP Bug 3453: Interleaved symmetric mode cannot recover from bad
17609100258SXin LI	state (LOW/MED)
17709100258SXin LI   Date Resolved: Stable (4.2.8p11) 27 Feb 2018
17809100258SXin LI   References: Sec 3453 / CVE-2018-7184 / VU#961909
17909100258SXin LI   Affects: ntpd in ntp-4.2.8p4, up to but not including ntp-4.2.8p11.
18009100258SXin LI   CVSS2: MED 4.3 (AV:N/AC:M/Au:N/C:P/I:N/A:N)
18109100258SXin LI	Could score between 2.9 and 6.8.
18209100258SXin LI   CVSS3: LOW 3.1 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L
18309100258SXin LI	Could score between 2.6 and 6.0.
18409100258SXin LI   Summary:
18509100258SXin LI   	The fix for NtpBug2952 was incomplete, and while it fixed one
18609100258SXin LI	problem it created another.  Specifically, it drops bad packets
18709100258SXin LI	before updating the "received" timestamp.  This means a
18809100258SXin LI	third-party can inject a packet with a zero-origin timestamp,
18909100258SXin LI	meaning the sender wants to reset the association, and the
19009100258SXin LI	transmit timestamp in this bogus packet will be saved as the
19109100258SXin LI	most recent "received" timestamp.  The real remote peer does
19209100258SXin LI	not know this value and this will disrupt the association until
19309100258SXin LI	the association resets.
19409100258SXin LI   Mitigation:
19509100258SXin LI	Implement BCP-38.
19609100258SXin LI	Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page
19709100258SXin LI	    or the NTP Public Services Project Download Page.
19809100258SXin LI	Use authentication with 'peer' mode.
19909100258SXin LI	Have enough sources of time.
20009100258SXin LI	Properly monitor your ntpd instances.
20109100258SXin LI	If ntpd stops running, auto-restart it without -g .
20209100258SXin LI   Credit:
20309100258SXin LI   	This weakness was discovered by Miroslav Lichvar of Red Hat.
20409100258SXin LI
20509100258SXin LI* NTP Bug 3415: Provide a way to prevent authenticated symmetric passive
20609100258SXin LI	peering (LOW)
20709100258SXin LI   Date Resolved: Stable (4.2.8p11) 27 Feb 2018
20809100258SXin LI   References: Sec 3415 / CVE-2018-7170 / VU#961909
20909100258SXin LI   	       Sec 3012 / CVE-2016-1549 / VU#718152
21009100258SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
21109100258SXin LI   	4.3.0 up to, but not including 4.3.92.  Resolved in 4.2.8p11.
21209100258SXin LI   CVSS2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N)
21309100258SXin LI   CVSS3: LOW 3.1 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
21409100258SXin LI   Summary:
21509100258SXin LI	ntpd can be vulnerable to Sybil attacks.  If a system is set up to
21609100258SXin LI	use a trustedkey and if one is not using the feature introduced in
21709100258SXin LI	ntp-4.2.8p6 allowing an optional 4th field in the ntp.keys file to
21809100258SXin LI	specify which IPs can serve time, a malicious authenticated peer
21909100258SXin LI	-- i.e. one where the attacker knows the private symmetric key --
22009100258SXin LI	can create arbitrarily-many ephemeral associations in order to win
22109100258SXin LI	the clock selection of ntpd and modify a victim's clock.  Three
22209100258SXin LI	additional protections are offered in ntp-4.2.8p11.  One is the
22309100258SXin LI	new 'noepeer' directive, which disables symmetric passive
22409100258SXin LI	ephemeral peering. Another is the new 'ippeerlimit' directive,
22509100258SXin LI	which limits the number of peers that can be created from an IP.
22609100258SXin LI	The third extends the functionality of the 4th field in the
22709100258SXin LI	ntp.keys file to include specifying a subnet range.
22809100258SXin LI   Mitigation:
22909100258SXin LI	Implement BCP-38.
23009100258SXin LI	Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page
23109100258SXin LI	    or the NTP Public Services Project Download Page.
23209100258SXin LI	Use the 'noepeer' directive to prohibit symmetric passive
23309100258SXin LI	    ephemeral associations.
23409100258SXin LI	Use the 'ippeerlimit' directive to limit the number of peers
23509100258SXin LI	    that can be created from an IP.
23609100258SXin LI	Use the 4th argument in the ntp.keys file to limit the IPs and
23709100258SXin LI	    subnets that can be time servers.
23809100258SXin LI	Have enough sources of time.
23909100258SXin LI	Properly monitor your ntpd instances.
24009100258SXin LI	If ntpd stops running, auto-restart it without -g .
24109100258SXin LI   Credit:
24209100258SXin LI	This weakness was reported as Bug 3012 by Matthew Van Gundy of
24309100258SXin LI	Cisco ASIG, and separately by Stefan Moser as Bug 3415.
24409100258SXin LI
24509100258SXin LI* ntpq Bug 3414: decodearr() can write beyond its 'buf' limits (Medium)
24609100258SXin LI   Date Resolved: 27 Feb 2018
24709100258SXin LI   References: Sec 3414 / CVE-2018-7183 / VU#961909
24809100258SXin LI   Affects: ntpq in ntp-4.2.8p6, up to but not including ntp-4.2.8p11.
24909100258SXin LI   CVSS2: MED 6.8 (AV:N/AC:M/Au:N/C:P/I:P/A:P)
25009100258SXin LI   CVSS3: MED 5.0 CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
25109100258SXin LI   Summary:
25209100258SXin LI   	ntpq is a monitoring and control program for ntpd.  decodearr()
25309100258SXin LI	is an internal function of ntpq that is used to -- wait for it --
25409100258SXin LI	decode an array in a response string when formatted data is being
25509100258SXin LI	displayed.  This is a problem in affected versions of ntpq if a
25609100258SXin LI	maliciously-altered ntpd returns an array result that will trip this
25709100258SXin LI	bug, or if a bad actor is able to read an ntpq request on its way to
25809100258SXin LI	a remote ntpd server and forge and send a response before the remote
25909100258SXin LI	ntpd sends its response.  It's potentially possible that the
26009100258SXin LI	malicious data could become injectable/executable code.
26109100258SXin LI   Mitigation:
26209100258SXin LI	Implement BCP-38.
26309100258SXin LI	Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page
26409100258SXin LI	    or the NTP Public Services Project Download Page.
26509100258SXin LI   Credit:
26609100258SXin LI	This weakness was discovered by Michael Macnair of Thales e-Security.
26709100258SXin LI
26809100258SXin LI* NTP Bug 3412: ctl_getitem(): buffer read overrun leads to undefined
26909100258SXin LI	behavior and information leak (Info/Medium)
27009100258SXin LI   Date Resolved: 27 Feb 2018
27109100258SXin LI   References: Sec 3412 / CVE-2018-7182 / VU#961909
27209100258SXin LI   Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p11.
27309100258SXin LI   CVSS2: INFO 0.0 - MED 5.0 (AV:N/AC:L/Au:N/C:P/I:N/A:N) 0.0 if C:N
27409100258SXin LI   CVSS3: NONE 0.0 - MED 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
27509100258SXin LI	0.0 if C:N
27609100258SXin LI   Summary:
27709100258SXin LI	ctl_getitem()  is used by ntpd to process incoming mode 6 packets.
27809100258SXin LI	A malicious mode 6 packet can be sent to an ntpd instance, and
27909100258SXin LI	if the ntpd instance is from 4.2.8p6 thru 4.2.8p10, that will
28009100258SXin LI	cause ctl_getitem() to read past the end of its buffer.
28109100258SXin LI   Mitigation:
28209100258SXin LI	Implement BCP-38.
28309100258SXin LI	Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page
28409100258SXin LI	    or the NTP Public Services Project Download Page.
28509100258SXin LI	Have enough sources of time.
28609100258SXin LI	Properly monitor your ntpd instances.
28709100258SXin LI	If ntpd stops running, auto-restart it without -g .
28809100258SXin LI   Credit:
28909100258SXin LI   	This weakness was discovered by Yihan Lian of Qihoo 360.
29009100258SXin LI
29109100258SXin LI* NTP Bug 3012: Sybil vulnerability: ephemeral association attack
29209100258SXin LI   Also see Bug 3415, above.
29309100258SXin LI   Date Mitigated: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
29409100258SXin LI   Date Resolved: Stable (4.2.8p11) 27 Feb 2018
29509100258SXin LI   References: Sec 3012 / CVE-2016-1549 / VU#718152
29609100258SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
29709100258SXin LI	4.3.0 up to, but not including 4.3.92.  Resolved in 4.2.8p11.
29809100258SXin LI   CVSS2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N)
29909100258SXin LI   CVSS3: MED 5.3 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
30009100258SXin LI   Summary:
30109100258SXin LI	ntpd can be vulnerable to Sybil attacks.  If a system is set up
30209100258SXin LI	to use a trustedkey and if one is not using the feature
30309100258SXin LI	introduced in ntp-4.2.8p6 allowing an optional 4th field in the
30409100258SXin LI	ntp.keys file to specify which IPs can serve time, a malicious
30509100258SXin LI	authenticated peer -- i.e. one where the attacker knows the
30609100258SXin LI	private symmetric key -- can create arbitrarily-many ephemeral
30709100258SXin LI	associations in order to win the clock selection of ntpd and
30809100258SXin LI	modify a victim's clock.  Two additional protections are
30909100258SXin LI	offered in ntp-4.2.8p11.  One is the 'noepeer' directive, which
31009100258SXin LI	disables symmetric passive ephemeral peering. The other extends
31109100258SXin LI	the functionality of the 4th field in the ntp.keys file to
31209100258SXin LI	include specifying a subnet range.
31309100258SXin LI   Mitigation:
31409100258SXin LI	Implement BCP-38.
31509100258SXin LI	Upgrade to 4.2.8p11, or later, from the NTP Project Download Page or
31609100258SXin LI	    the NTP Public Services Project Download Page.
31709100258SXin LI	Use the 'noepeer' directive to prohibit symmetric passive
31809100258SXin LI	    ephemeral associations.
31909100258SXin LI	Use the 'ippeerlimit' directive to limit the number of peer
32009100258SXin LI	    associations from an IP.
32109100258SXin LI	Use the 4th argument in the ntp.keys file to limit the IPs
32209100258SXin LI	    and subnets that can be time servers.
32309100258SXin LI	Properly monitor your ntpd instances.
32409100258SXin LI   Credit:
32509100258SXin LI   	This weakness was discovered by Matthew Van Gundy of Cisco ASIG.
32609100258SXin LI
32709100258SXin LI* Bug fixes:
32809100258SXin LI [Bug 3457] OpenSSL FIPS mode regression <perlinger@ntp.org>
32909100258SXin LI [Bug 3455] ntpd doesn't use scope id when binding multicast <perlinger@ntp.org>
33009100258SXin LI - applied patch by Sean Haugh
33109100258SXin LI [Bug 3452] PARSE driver prints uninitialized memory. <perlinger@ntp.org>
33209100258SXin LI [Bug 3450] Dubious error messages from plausibility checks in get_systime()
33309100258SXin LI - removed error log caused by rounding/slew, ensured postcondition <perlinger@ntp.org>
33409100258SXin LI [Bug 3447] AES-128-CMAC (fixes) <perlinger@ntp.org>
33509100258SXin LI - refactoring the MAC code, too
33609100258SXin LI [Bug 3441] Validate the assumption that AF_UNSPEC is 0.  stenn@ntp.org
33709100258SXin LI [Bug 3439] When running multiple commands / hosts in ntpq... <perlinger@ntp.org>
33809100258SXin LI - applied patch by ggarvey
33909100258SXin LI [Bug 3438] Negative values and values > 999 days in... <perlinger@ntp.org>
34009100258SXin LI - applied patch by ggarvey (with minor mods)
34109100258SXin LI [Bug 3437] ntpd tries to open socket with AF_UNSPEC domain
34209100258SXin LI - applied patch (with mods) by Miroslav Lichvar <perlinger@ntp.org>
34309100258SXin LI [Bug 3435] anchor NTP era alignment <perlinger@ntp.org>
34409100258SXin LI [Bug 3433] sntp crashes when run with -a.  <stenn@ntp.org>
34509100258SXin LI [Bug 3430] ntpq dumps core (SIGSEGV) for "keytype md2"
34609100258SXin LI - fixed several issues with hash algos in ntpd, sntp, ntpq,
34709100258SXin LI   ntpdc and the test suites <perlinger@ntp.org>
34809100258SXin LI [Bug 3424] Trimble Thunderbolt 1024 week millenium bug <perlinger@ntp.org>
34909100258SXin LI - initial patch by Daniel Pouzzner
35009100258SXin LI [Bug 3423] QNX adjtime() implementation error checking is
35109100258SXin LI wrong <perlinger@ntp.org>
35209100258SXin LI [Bug 3417] ntpq ifstats packet counters can be negative
35309100258SXin LI made IFSTATS counter quantities unsigned <perlinger@ntp.org>
35409100258SXin LI [Bug 3411] problem about SIGN(6) packet handling for ntp-4.2.8p10
35509100258SXin LI - raised receive buffer size to 1200 <perlinger@ntp.org>
35609100258SXin LI [Bug 3408] refclock_jjy.c: Avoid a wrong report of the coverity static
35709100258SXin LI analysis tool. <abe@ntp.org>
35809100258SXin LI [Bug 3405] update-leap.in: general cleanup, HTTPS support.  Paul McMath.
35909100258SXin LI [Bug 3404] Fix openSSL DLL usage under Windows <perlinger@ntp.org>
36009100258SXin LI - fix/drop assumptions on OpenSSL libs directory layout
36109100258SXin LI [Bug 3399] NTP: linker error in 4.2.8p10 during Linux cross-compilation
36209100258SXin LI - initial patch by timeflies@mail2tor.com  <perlinger@ntp.org>
36309100258SXin LI [Bug 3398] tests fail with core dump <perlinger@ntp.org>
36409100258SXin LI - patch contributed by Alexander Bluhm
36509100258SXin LI [Bug 3397] ctl_putstr() asserts that data fits in its buffer
36609100258SXin LI rework of formatting & data transfer stuff in 'ntp_control.c'
36709100258SXin LI avoids unecessary buffers and size limitations. <perlinger@ntp.org>
36809100258SXin LI [Bug 3394] Leap second deletion does not work on ntpd clients
36909100258SXin LI - fixed handling of dynamic deletion w/o leap file <perlinger@ntp.org>
37009100258SXin LI [Bug 3391] ntpd segfaults on startup due to small warmup thread stack size
37109100258SXin LI - increased mimimum stack size to 32kB <perlinger@ntp.org>
37209100258SXin LI [Bug 3367] Faulty LinuxPPS NMEA clock support in 4.2.8 <perlinger@ntp.org>
37309100258SXin LI - reverted handling of PPS kernel consumer to 4.2.6 behavior
37409100258SXin LI [Bug 3365] Updates driver40(-ja).html and miscopt.html <abe@ntp.org>
37509100258SXin LI [Bug 3358] Spurious KoD log messages in .INIT. phase.  HStenn.
37609100258SXin LI [Bug 3016] wrong error position reported for bad ":config pool"
37709100258SXin LI - fixed location counter & ntpq output <perlinger@ntp.org>
37809100258SXin LI [Bug 2900] libntp build order problem.  HStenn.
37909100258SXin LI [Bug 2878] Tests are cluttering up syslog <perlinger@ntp.org>
38009100258SXin LI [Bug 2737] Wrong phone number listed for USNO. ntp-bugs@bodosom.net,
38109100258SXin LI perlinger@ntp.org
38209100258SXin LI [Bug 2557] Fix Thunderbolt init. ntp-bugs@bodosom.net, perlinger@ntp.
38309100258SXin LI [Bug 948] Trustedkey config directive leaks memory. <perlinger@ntp.org>
38409100258SXin LI Use strlcpy() to copy strings, not memcpy().  HStenn.
38509100258SXin LI Typos.  HStenn.
38609100258SXin LI test_ntp_scanner_LDADD needs ntpd/ntp_io.o.  HStenn.
38709100258SXin LI refclock_jjy.c: Add missing "%s" to an msyslog() call.  HStenn.
38809100258SXin LI Build ntpq and libntpq.a with NTP_HARD_*FLAGS.  perlinger@ntp.org
38909100258SXin LI Fix trivial warnings from 'make check'. perlinger@ntp.org
39009100258SXin LI Fix bug in the override portion of the compiler hardening macro. HStenn.
39109100258SXin LI record_raw_stats(): Log entire packet.  Log writes.  HStenn.
39209100258SXin LI AES-128-CMAC support.  BInglis, HStenn, JPerlinger.
39309100258SXin LI sntp: tweak key file logging.  HStenn.
39409100258SXin LI sntp: pkt_output(): Improve debug output.  HStenn.
39509100258SXin LI update-leap: updates from Paul McMath.
39609100258SXin LI When using pkg-config, report --modversion.  HStenn.
39709100258SXin LI Clean up libevent configure checks.  HStenn.
39809100258SXin LI sntp: show the IP of who sent us a crypto-NAK.  HStenn.
39909100258SXin LI Allow .../N to specify subnet bits for IPs in ntp.keys.  HStenn, JPerlinger.
40009100258SXin LI authistrustedip() - use it in more places.  HStenn, JPerlinger.
40109100258SXin LI New sysstats: sys_lamport, sys_tsrounding.  HStenn.
40209100258SXin LI Update ntp.keys .../N documentation.  HStenn.
40309100258SXin LI Distribute testconf.yml.  HStenn.
40409100258SXin LI Add DPRINTF(2,...) lines to receive() for packet drops.  HStenn.
40509100258SXin LI Rename the configuration flag fifo variables.  HStenn.
40609100258SXin LI Improve saveconfig output.  HStenn.
40709100258SXin LI Decode restrict flags on receive() debug output.  HStenn.
40809100258SXin LI Decode interface flags on receive() debug output.  HStenn.
40909100258SXin LI Warn the user if deprecated "driftfile name WanderThreshold" is used.  HStenn.
41009100258SXin LI Update the documentation in ntp.conf.def .  HStenn.
41109100258SXin LI restrictions() must return restrict flags and ippeerlimit.  HStenn.
41209100258SXin LI Update ntpq peer documentation to describe the 'p' type.  HStenn.
41309100258SXin LI Rename restrict 'flags' to 'rflags.  Use an enum for the values.  HStenn.
41409100258SXin LI Provide dump_restricts() for debugging.  HStenn.
41509100258SXin LI Use consistent 4th arg type for [gs]etsockopt.  JPerlinger.
41609100258SXin LI
41709100258SXin LI* Other items:
41809100258SXin LI
41909100258SXin LI* update-leap needs the following perl modules:
42009100258SXin LI	Net::SSLeay
42109100258SXin LI	IO::Socket::SSL
42209100258SXin LI
42309100258SXin LI* New sysstats variables: sys_lamport, sys_tsrounding
42409100258SXin LISee them with: ntpq -c "rv 0 ss_lamport,ss_tsrounding"
42509100258SXin LIsys_lamport counts the number of observed Lamport violations, while
42609100258SXin LIsys_tsrounding counts observed timestamp rounding events.
42709100258SXin LI
42809100258SXin LI* New ntp.conf items:
42909100258SXin LI
43009100258SXin LI- restrict ... noepeer
43109100258SXin LI- restrict ... ippeerlimit N
43209100258SXin LI
43309100258SXin LIThe 'noepeer' directive will disallow all ephemeral/passive peer
43409100258SXin LIrequests.
43509100258SXin LI
43609100258SXin LIThe 'ippeerlimit' directive limits the number of time associations
43709100258SXin LIfor each IP in the designated set of addresses.  This limit does not
43809100258SXin LIapply to explicitly-configured associations.  A value of -1, the current
43909100258SXin LIdefault, means an unlimited number of associations may connect from a
44009100258SXin LIsingle IP.  0 means "none", etc.  Ordinarily the only way multiple
44109100258SXin LIassociations would come from the same IP would be if the remote side
44209100258SXin LIwas using a proxy.  But a trusted machine might become compromised,
44309100258SXin LIin which case an attacker might spin up multiple authenticated sessions
44409100258SXin LIfrom different ports.  This directive should be helpful in this case.
44509100258SXin LI
44609100258SXin LI* New ntp.keys feature: Each IP in the optional list of IPs in the 4th
44709100258SXin LIfield may contain a /subnetbits specification, which identifies  the
44809100258SXin LIscope of IPs that may use this key.  This IP/subnet restriction can be
44909100258SXin LIused to limit the IPs that may use the key in most all situations where
45009100258SXin LIa key is used.
45109100258SXin LI--
452f0574f5cSXin LINTP 4.2.8p10 (Harlan Stenn <stenn@ntp.org>, 2017/03/21)
453f0574f5cSXin LI
454f0574f5cSXin LIFocus: Security, Bug fixes, enhancements.
455f0574f5cSXin LI
456f0574f5cSXin LISeverity: MEDIUM
457f0574f5cSXin LI
458f0574f5cSXin LIThis release fixes 5 medium-, 6 low-, and 4 informational-severity
459f0574f5cSXin LIvulnerabilities, and provides 15 other non-security fixes and improvements:
460f0574f5cSXin LI
461f0574f5cSXin LI* NTP-01-016 NTP: Denial of Service via Malformed Config (Medium)
462f0574f5cSXin LI   Date Resolved: 21 Mar 2017
463f0574f5cSXin LI   References: Sec 3389 / CVE-2017-6464 / VU#325339
464f0574f5cSXin LI   Affects: All versions of NTP-4, up to but not including ntp-4.2.8p10, and
465f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
466f0574f5cSXin LI   CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C)
467f0574f5cSXin LI   CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
468f0574f5cSXin LI   Summary:
469f0574f5cSXin LI	A vulnerability found in the NTP server makes it possible for an
470f0574f5cSXin LI	authenticated remote user to crash ntpd via a malformed mode
471f0574f5cSXin LI	configuration directive.
472f0574f5cSXin LI   Mitigation:
473f0574f5cSXin LI	Implement BCP-38.
474f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page or
475f0574f5cSXin LI	    the NTP Public Services Project Download Page
476f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
477f0574f5cSXin LI	    ntpd (without -g) if it stops running.
478f0574f5cSXin LI   Credit:
479f0574f5cSXin LI	This weakness was discovered by Cure53.
480f0574f5cSXin LI
481f0574f5cSXin LI* NTP-01-014 NTP: Buffer Overflow in DPTS Clock (Low)
482f0574f5cSXin LI    Date Resolved: 21 Mar 2017
483f0574f5cSXin LI    References: Sec 3388 / CVE-2017-6462 / VU#325339
484f0574f5cSXin LI    Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and ntp-4.3.0 up to, but not including ntp-4.3.94.
485f0574f5cSXin LI    CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
486f0574f5cSXin LI    CVSS3: Low 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
487f0574f5cSXin LI    Summary:
488f0574f5cSXin LI	There is a potential for a buffer overflow in the legacy Datum
489f0574f5cSXin LI	Programmable Time Server refclock driver.  Here the packets are
490f0574f5cSXin LI	processed from the /dev/datum device and handled in
491f0574f5cSXin LI	datum_pts_receive().  Since an attacker would be required to
492f0574f5cSXin LI	somehow control a malicious /dev/datum device, this does not
493f0574f5cSXin LI	appear to be a practical attack and renders this issue "Low" in
494f0574f5cSXin LI	terms of severity.
495f0574f5cSXin LI   Mitigation:
496f0574f5cSXin LI	If you have a Datum reference clock installed and think somebody
497f0574f5cSXin LI	    may maliciously change the device, upgrade to 4.2.8p10, or
498f0574f5cSXin LI	    later, from the NTP Project Download Page or the NTP Public
499f0574f5cSXin LI	    Services Project Download Page
500f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
501f0574f5cSXin LI	    ntpd (without -g) if it stops running.
502f0574f5cSXin LI   Credit:
503f0574f5cSXin LI	This weakness was discovered by Cure53.
504f0574f5cSXin LI
505f0574f5cSXin LI* NTP-01-012 NTP: Authenticated DoS via Malicious Config Option (Medium)
506f0574f5cSXin LI   Date Resolved: 21 Mar 2017
507f0574f5cSXin LI   References: Sec 3387 / CVE-2017-6463 / VU#325339
508f0574f5cSXin LI   Affects: All versions of ntp, up to but not including ntp-4.2.8p10, and
509f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
510f0574f5cSXin LI   CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C)
511f0574f5cSXin LI   CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
512f0574f5cSXin LI   Summary:
513f0574f5cSXin LI	A vulnerability found in the NTP server allows an authenticated
514f0574f5cSXin LI	remote attacker to crash the daemon by sending an invalid setting
515f0574f5cSXin LI	via the :config directive.  The unpeer option expects a number or
516f0574f5cSXin LI	an address as an argument.  In case the value is "0", a
517f0574f5cSXin LI	segmentation fault occurs.
518f0574f5cSXin LI   Mitigation:
519f0574f5cSXin LI	Implement BCP-38.
520f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
521f0574f5cSXin LI	    or the NTP Public Services Project Download Page
522f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
523f0574f5cSXin LI	    ntpd (without -g) if it stops running.
524f0574f5cSXin LI   Credit:
525f0574f5cSXin LI	This weakness was discovered by Cure53.
526f0574f5cSXin LI
527f0574f5cSXin LI* NTP-01-011 NTP: ntpq_stripquotes() returns incorrect value (Informational)
528f0574f5cSXin LI   Date Resolved: 21 Mar 2017
529f0574f5cSXin LI   References: Sec 3386
530f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
531f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
532f0574f5cSXin LI   CVSS2: None 0.0 (AV:N/AC:H/Au:N/C:N/I:N/A:N)
533f0574f5cSXin LI   CVSS3: None 0.0 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:N
534f0574f5cSXin LI   Summary:
535f0574f5cSXin LI	The NTP Mode 6 monitoring and control client, ntpq, uses the
536f0574f5cSXin LI	function ntpq_stripquotes() to remove quotes and escape characters
537f0574f5cSXin LI	from a given string.  According to the documentation, the function
538f0574f5cSXin LI	is supposed to return the number of copied bytes but due to
539f0574f5cSXin LI	incorrect pointer usage this value is always zero.  Although the
540f0574f5cSXin LI	return value of this function is never used in the code, this
541f0574f5cSXin LI	flaw could lead to a vulnerability in the future.  Since relying
542f0574f5cSXin LI	on wrong return values when performing memory operations is a
543f0574f5cSXin LI	dangerous practice, it is recommended to return the correct value
544f0574f5cSXin LI	in accordance with the documentation pertinent to the code.
545f0574f5cSXin LI   Mitigation:
546f0574f5cSXin LI	Implement BCP-38.
547f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
548f0574f5cSXin LI	    or the NTP Public Services Project Download Page
549f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
550f0574f5cSXin LI	    ntpd (without -g) if it stops running.
551f0574f5cSXin LI   Credit:
552f0574f5cSXin LI	This weakness was discovered by Cure53.
553f0574f5cSXin LI
554f0574f5cSXin LI* NTP-01-010 NTP: ereallocarray()/eallocarray() underused (Info)
555f0574f5cSXin LI   Date Resolved: 21 Mar 2017
556f0574f5cSXin LI   References: Sec 3385
557f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
558f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
559f0574f5cSXin LI   Summary:
560f0574f5cSXin LI	NTP makes use of several wrappers around the standard heap memory
561f0574f5cSXin LI	allocation functions that are provided by libc.  This is mainly
562f0574f5cSXin LI	done to introduce additional safety checks concentrated on
563f0574f5cSXin LI	several goals.  First, they seek to ensure that memory is not
564f0574f5cSXin LI	accidentally freed, secondly they verify that a correct amount
565f0574f5cSXin LI	is always allocated and, thirdly, that allocation failures are
566f0574f5cSXin LI	correctly handled.  There is an additional implementation for
567f0574f5cSXin LI	scenarios where memory for a specific amount of items of the
568f0574f5cSXin LI	same size needs to be allocated.  The handling can be found in
569f0574f5cSXin LI	the oreallocarray() function for which a further number-of-elements
570f0574f5cSXin LI	parameter needs to be provided.  Although no considerable threat
571f0574f5cSXin LI	was identified as tied to a lack of use of this function, it is
572f0574f5cSXin LI	recommended to correctly apply oreallocarray() as a preferred
573f0574f5cSXin LI	option across all of the locations where it is possible.
574f0574f5cSXin LI   Mitigation:
575f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
576f0574f5cSXin LI	    or the NTP Public Services Project Download Page
577f0574f5cSXin LI   Credit:
578f0574f5cSXin LI	This weakness was discovered by Cure53.
579f0574f5cSXin LI
580f0574f5cSXin LI* NTP-01-009 NTP: Privileged execution of User Library code (WINDOWS
581f0574f5cSXin LI	PPSAPI ONLY) (Low)
582f0574f5cSXin LI   Date Resolved: 21 Mar 2017
583f0574f5cSXin LI   References: Sec 3384 / CVE-2017-6455 / VU#325339
584f0574f5cSXin LI   Affects: All Windows versions of ntp-4 that use the PPSAPI, up to but
585f0574f5cSXin LI	not including ntp-4.2.8p10, and ntp-4.3.0 up to, but not
586f0574f5cSXin LI	including ntp-4.3.94.
587f0574f5cSXin LI   CVSS2: MED 3.8 (AV:L/AC:H/Au:S/C:N/I:N/A:C)
588f0574f5cSXin LI   CVSS3: MED 4.0 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
589f0574f5cSXin LI   Summary:
590f0574f5cSXin LI	The Windows NT port has the added capability to preload DLLs
591f0574f5cSXin LI	defined in the inherited global local environment variable
592f0574f5cSXin LI	PPSAPI_DLLS.  The code contained within those libraries is then
593f0574f5cSXin LI	called from the NTPD service, usually running with elevated
594f0574f5cSXin LI	privileges. Depending on how securely the machine is setup and
595f0574f5cSXin LI	configured, if ntpd is configured to use the PPSAPI under Windows
596f0574f5cSXin LI	this can easily lead to a code injection.
597f0574f5cSXin LI   Mitigation:
598f0574f5cSXin LI	Implement BCP-38.
599f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
600f0574f5cSXin LI	    or the NTP Public Services Project Download Page
601f0574f5cSXin LI   Credit:
602f0574f5cSXin LI   This weakness was discovered by Cure53.
603f0574f5cSXin LI
604f0574f5cSXin LI* NTP-01-008 NTP: Stack Buffer Overflow from Command Line (WINDOWS
605f0574f5cSXin LI	installer ONLY) (Low)
606f0574f5cSXin LI   Date Resolved: 21 Mar 2017
607f0574f5cSXin LI   References: Sec 3383 / CVE-2017-6452 / VU#325339
608f0574f5cSXin LI   Affects: WINDOWS installer ONLY: All versions of the ntp-4 Windows
609f0574f5cSXin LI	installer, up to but not including ntp-4.2.8p10, and ntp-4.3.0 up
610f0574f5cSXin LI	to, but not including ntp-4.3.94.
611f0574f5cSXin LI   CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
612f0574f5cSXin LI   CVSS3: Low 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
613f0574f5cSXin LI   Summary:
614f0574f5cSXin LI	The Windows installer for NTP calls strcat(), blindly appending
615f0574f5cSXin LI	the string passed to the stack buffer in the addSourceToRegistry()
616f0574f5cSXin LI	function.  The stack buffer is 70 bytes smaller than the buffer
617f0574f5cSXin LI	in the calling main() function.  Together with the initially
618f0574f5cSXin LI	copied Registry path, the combination causes a stack buffer
619f0574f5cSXin LI	overflow and effectively overwrites the stack frame.  The
620f0574f5cSXin LI	passed application path is actually limited to 256 bytes by the
621f0574f5cSXin LI	operating system, but this is not sufficient to assure that the
622f0574f5cSXin LI	affected stack buffer is consistently protected against
623f0574f5cSXin LI	overflowing at all times.
624f0574f5cSXin LI   Mitigation:
625f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
626f0574f5cSXin LI	or the NTP Public Services Project Download Page
627f0574f5cSXin LI   Credit:
628f0574f5cSXin LI	This weakness was discovered by Cure53.
629f0574f5cSXin LI
630f0574f5cSXin LI* NTP-01-007 NTP: Data Structure terminated insufficiently (WINDOWS
631f0574f5cSXin LI	installer ONLY) (Low)
632f0574f5cSXin LI   Date Resolved: 21 Mar 2017
633f0574f5cSXin LI   References: Sec 3382 / CVE-2017-6459 / VU#325339
634f0574f5cSXin LI   Affects: WINDOWS installer ONLY: All ntp-4 versions of the Windows
635f0574f5cSXin LI	installer, up to but not including ntp-4.2.8p10, and ntp-4.3.0
636f0574f5cSXin LI	up to, but not including ntp-4.3.94.
637f0574f5cSXin LI   CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
638f0574f5cSXin LI   CVSS3: Low 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
639f0574f5cSXin LI   Summary:
640f0574f5cSXin LI	The Windows installer for NTP calls strcpy() with an argument
641f0574f5cSXin LI	that specifically contains multiple null bytes.  strcpy() only
642f0574f5cSXin LI	copies a single terminating null character into the target
643f0574f5cSXin LI	buffer instead of copying the required double null bytes in the
644f0574f5cSXin LI	addKeysToRegistry() function.  As a consequence, a garbage
645f0574f5cSXin LI	registry entry can be created.  The additional arsize parameter
646f0574f5cSXin LI	is erroneously set to contain two null bytes and the following
647f0574f5cSXin LI	call to RegSetValueEx() claims to be passing in a multi-string
648f0574f5cSXin LI	value, though this may not be true.
649f0574f5cSXin LI   Mitigation:
650f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
651f0574f5cSXin LI	    or the NTP Public Services Project Download Page
652f0574f5cSXin LI   Credit:
653f0574f5cSXin LI	This weakness was discovered by Cure53.
654f0574f5cSXin LI
655f0574f5cSXin LI* NTP-01-006 NTP: Copious amounts of Unused Code (Informational)
656f0574f5cSXin LI   References: Sec 3381
657f0574f5cSXin LI   Summary:
658f0574f5cSXin LI	The report says: Statically included external projects
659f0574f5cSXin LI	potentially introduce several problems and the issue of having
660f0574f5cSXin LI	extensive amounts of code that is "dead" in the resulting binary
661f0574f5cSXin LI	must clearly be pointed out.  The unnecessary unused code may or
662f0574f5cSXin LI	may not contain bugs and, quite possibly, might be leveraged for
663f0574f5cSXin LI	code-gadget-based branch-flow redirection exploits.  Analogically,
664f0574f5cSXin LI	having source trees statically included as well means a failure
665f0574f5cSXin LI	in taking advantage of the free feature for periodical updates.
666f0574f5cSXin LI	This solution is offered by the system's Package Manager. The
667f0574f5cSXin LI	three libraries identified are libisc, libevent, and libopts.
668f0574f5cSXin LI   Resolution:
669f0574f5cSXin LI	For libisc, we already only use a portion of the original library.
670f0574f5cSXin LI	We've found and fixed bugs in the original implementation (and
671f0574f5cSXin LI	offered the patches to ISC), and plan to see what has changed
672f0574f5cSXin LI	since we last upgraded the code.  libisc is generally not
673f0574f5cSXin LI	installed, and when it it we usually only see the static libisc.a
674f0574f5cSXin LI	file installed.  Until we know for sure that the bugs we've found
675f0574f5cSXin LI	and fixed are fixed upstream, we're better off with the copy we
676f0574f5cSXin LI	are using.
677f0574f5cSXin LI
678f0574f5cSXin LI        Version 1 of libevent was the only production version available
679f0574f5cSXin LI	until recently, and we've been requiring version 2 for a long time.
680f0574f5cSXin LI	But if the build system has at least version 2 of libevent
681f0574f5cSXin LI	installed, we'll use the version that is installed on the system.
682f0574f5cSXin LI	Otherwise, we provide a copy of libevent that we know works.
683f0574f5cSXin LI
684f0574f5cSXin LI        libopts is provided by GNU AutoGen, and that library and package
685f0574f5cSXin LI	undergoes frequent API version updates.  The version of autogen
686f0574f5cSXin LI	used to generate the tables for the code must match the API
687f0574f5cSXin LI	version in libopts.  AutoGen can be ... difficult to build and
688f0574f5cSXin LI	install, and very few developers really need it.  So we have it
689f0574f5cSXin LI	on our build and development machines, and we provide the
690f0574f5cSXin LI	specific version of the libopts code in the distribution to make
691f0574f5cSXin LI	sure that the proper API version of libopts is available.
692f0574f5cSXin LI
693f0574f5cSXin LI        As for the point about there being code in these libraries that
694f0574f5cSXin LI	NTP doesn't use, OK.  But other packages used these libraries as
695f0574f5cSXin LI	well, and it is reasonable to assume that other people are paying
696f0574f5cSXin LI	attention to security and code quality issues for the overall
697f0574f5cSXin LI	libraries.  It takes significant resources to analyze and
698f0574f5cSXin LI	customize these libraries to only include what we need, and to
699f0574f5cSXin LI	date we believe the cost of this effort does not justify the benefit.
700f0574f5cSXin LI   Credit:
701f0574f5cSXin LI	This issue was discovered by Cure53.
702f0574f5cSXin LI
703f0574f5cSXin LI* NTP-01-005 NTP: Off-by-one in Oncore GPS Receiver (Low)
704f0574f5cSXin LI   Date Resolved: 21 Mar 2017
705f0574f5cSXin LI   References: Sec 3380
706f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
707f0574f5cSXin LI   	ntp-4.3.0 up to, but not including ntp-4.3.94.
708f0574f5cSXin LI   CVSS2: None 0.0 (AV:L/AC:H/Au:N/C:N/I:N/A:N)
709f0574f5cSXin LI   CVSS3: None 0.0 CVSS:3.0/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:N
710f0574f5cSXin LI   Summary:
711f0574f5cSXin LI	There is a fencepost error in a "recovery branch" of the code for
712f0574f5cSXin LI	the Oncore GPS receiver if the communication link to the ONCORE
713f0574f5cSXin LI	is weak / distorted and the decoding doesn't work.
714f0574f5cSXin LI   Mitigation:
715f0574f5cSXin LI        Upgrade to 4.2.8p10, or later, from the NTP Project Download Page or
716f0574f5cSXin LI	    the NTP Public Services Project Download Page
717f0574f5cSXin LI        Properly monitor your ntpd instances, and auto-restart
718f0574f5cSXin LI	    ntpd (without -g) if it stops running.
719f0574f5cSXin LI   Credit:
720f0574f5cSXin LI	This weakness was discovered by Cure53.
721f0574f5cSXin LI
722f0574f5cSXin LI* NTP-01-004 NTP: Potential Overflows in ctl_put() functions (Medium)
723f0574f5cSXin LI   Date Resolved: 21 Mar 2017
724f0574f5cSXin LI   References: Sec 3379 / CVE-2017-6458 / VU#325339
725f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
726f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
727f0574f5cSXin LI   CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C)
728f0574f5cSXin LI   CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
729f0574f5cSXin LI   Summary:
730f0574f5cSXin LI	ntpd makes use of different wrappers around ctl_putdata() to
731f0574f5cSXin LI	create name/value ntpq (mode 6) response strings.  For example,
732f0574f5cSXin LI	ctl_putstr() is usually used to send string data (variable names
733f0574f5cSXin LI	or string data).  The formatting code was missing a length check
734f0574f5cSXin LI	for variable names.  If somebody explicitly created any unusually
735f0574f5cSXin LI	long variable names in ntpd (longer than 200-512 bytes, depending
736f0574f5cSXin LI	on the type of variable), then if any of these variables are
737f0574f5cSXin LI	added to the response list it would overflow a buffer.
738f0574f5cSXin LI   Mitigation:
739f0574f5cSXin LI	Implement BCP-38.
740f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
741f0574f5cSXin LI	    or the NTP Public Services Project Download Page
742f0574f5cSXin LI	If you don't want to upgrade, then don't setvar variable names
743f0574f5cSXin LI	    longer than 200-512 bytes in your ntp.conf file.
744f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
745f0574f5cSXin LI	    ntpd (without -g) if it stops running.
746f0574f5cSXin LI   Credit:
747f0574f5cSXin LI	This weakness was discovered by Cure53.
748f0574f5cSXin LI
749f0574f5cSXin LI* NTP-01-003 NTP: Improper use of snprintf() in mx4200_send() (Low)
750f0574f5cSXin LI   Date Resolved: 21 Mar 2017
751f0574f5cSXin LI   References: Sec 3378 / CVE-2017-6451 / VU#325339
752f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
753f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
754f0574f5cSXin LI   CVSS2: LOW 0.8 (AV:L/AC:H/Au:M/C:N/I:N/A:P)
755f0574f5cSXin LI   CVSS3: LOW 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N
756f0574f5cSXin LI   Summary:
757f0574f5cSXin LI	The legacy MX4200 refclock is only built if is specifically
758f0574f5cSXin LI	enabled, and furthermore additional code changes are required to
759f0574f5cSXin LI	compile and use it.  But it uses the libc functions snprintf()
760f0574f5cSXin LI	and vsnprintf() incorrectly, which can lead to an out-of-bounds
761f0574f5cSXin LI	memory write due to an improper handling of the return value of
762f0574f5cSXin LI	snprintf()/vsnprintf().  Since the return value is used as an
763f0574f5cSXin LI	iterator and it can be larger than the buffer's size, it is
764f0574f5cSXin LI	possible for the iterator to point somewhere outside of the
765f0574f5cSXin LI	allocated buffer space.  This results in an out-of-bound memory
766f0574f5cSXin LI	write.  This behavior can be leveraged to overwrite a saved
767f0574f5cSXin LI	instruction pointer on the stack and gain control over the
768f0574f5cSXin LI	execution flow.  During testing it was not possible to identify
769f0574f5cSXin LI	any malicious usage for this vulnerability.  Specifically, no
770f0574f5cSXin LI	way for an attacker to exploit this vulnerability was ultimately
771f0574f5cSXin LI	unveiled.  However, it has the potential to be exploited, so the
772f0574f5cSXin LI	code should be fixed.
773f0574f5cSXin LI   Mitigation, if you have a Magnavox MX4200 refclock:
774f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
775f0574f5cSXin LI	    or the NTP Public Services Project Download Page.
776f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
777f0574f5cSXin LI	    ntpd (without -g) if it stops running.
778f0574f5cSXin LI   Credit:
779f0574f5cSXin LI	This weakness was discovered by Cure53.
780f0574f5cSXin LI
781f0574f5cSXin LI* NTP-01-002 NTP: Buffer Overflow in ntpq when fetching reslist from a
782f0574f5cSXin LI	malicious ntpd (Medium)
783f0574f5cSXin LI   Date Resolved: 21 Mar 2017
784f0574f5cSXin LI   References: Sec 3377 / CVE-2017-6460 / VU#325339
785f0574f5cSXin LI   Affects: All versions of ntpq, up to but not including ntp-4.2.8p10, and
786f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
787f0574f5cSXin LI   CVSS2: MED 4.9 (AV:N/AC:H/Au:S/C:N/I:N/A:C)
788f0574f5cSXin LI   CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
789f0574f5cSXin LI   Summary:
790f0574f5cSXin LI	A stack buffer overflow in ntpq can be triggered by a malicious
791f0574f5cSXin LI	ntpd server when ntpq requests the restriction list from the server.
792f0574f5cSXin LI	This is due to a missing length check in the reslist() function.
793f0574f5cSXin LI	It occurs whenever the function parses the server's response and
794f0574f5cSXin LI	encounters a flagstr variable of an excessive length.  The string
795f0574f5cSXin LI	will be copied into a fixed-size buffer, leading to an overflow on
796f0574f5cSXin LI	the function's stack-frame.  Note well that this problem requires
797f0574f5cSXin LI	a malicious server, and affects ntpq, not ntpd.
798f0574f5cSXin LI   Mitigation:
799f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
800f0574f5cSXin LI	    or the NTP Public Services Project Download Page
801f0574f5cSXin LI	If you can't upgrade your version of ntpq then if you want to know
802f0574f5cSXin LI	    the reslist of an instance of ntpd that you do not control,
803f0574f5cSXin LI	    know that if the target ntpd is malicious that it can send back
804f0574f5cSXin LI	    a response that intends to crash your ntpq process.
805f0574f5cSXin LI   Credit:
806f0574f5cSXin LI	This weakness was discovered by Cure53.
807f0574f5cSXin LI
808f0574f5cSXin LI* NTP-01-001 NTP: Makefile does not enforce Security Flags (Informational)
809f0574f5cSXin LI   Date Resolved: 21 Mar 2017
810f0574f5cSXin LI   References: Sec 3376
811f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
812f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
813f0574f5cSXin LI   CVSS2: N/A
814f0574f5cSXin LI   CVSS3: N/A
815f0574f5cSXin LI   Summary:
816f0574f5cSXin LI	The build process for NTP has not, by default, provided compile
817f0574f5cSXin LI	or link flags to offer "hardened" security options.  Package
818f0574f5cSXin LI	maintainers have always been able to provide hardening security
819f0574f5cSXin LI	flags for their builds.  As of ntp-4.2.8p10, the NTP build
820f0574f5cSXin LI	system has a way to provide OS-specific hardening flags.  Please
821f0574f5cSXin LI	note that this is still not a really great solution because it
822f0574f5cSXin LI	is specific to NTP builds.  It's inefficient to have every
823f0574f5cSXin LI	package supply, track and maintain this information for every
824f0574f5cSXin LI	target build.  It would be much better if there was a common way
825f0574f5cSXin LI	for OSes to provide this information in a way that arbitrary
826f0574f5cSXin LI	packages could benefit from it.
827f0574f5cSXin LI   Mitigation:
828f0574f5cSXin LI	Implement BCP-38.
829f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
830f0574f5cSXin LI	    or the NTP Public Services Project Download Page
831f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
832f0574f5cSXin LI	    ntpd (without -g) if it stops running.
833f0574f5cSXin LI   Credit:
834f0574f5cSXin LI	This weakness was reported by Cure53.
835f0574f5cSXin LI
836f0574f5cSXin LI* 0rigin DoS (Medium)
837f0574f5cSXin LI   Date Resolved: 21 Mar 2017
838f0574f5cSXin LI   References: Sec 3361 / CVE-2016-9042 / VU#325339
839f0574f5cSXin LI   Affects: ntp-4.2.8p9 (21 Nov 2016), up to but not including ntp-4.2.8p10
840f0574f5cSXin LI   CVSS2: MED 4.9 (AV:N/AC:H/Au:N/C:N/I:N/A:C) (worst case)
841f0574f5cSXin LI   CVSS3: MED 4.4 CVSS:3.0/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H (worst case)
842f0574f5cSXin LI   Summary:
843f0574f5cSXin LI	An exploitable denial of service vulnerability exists in the
844f0574f5cSXin LI	origin timestamp check functionality of ntpd 4.2.8p9.  A specially
845f0574f5cSXin LI	crafted unauthenticated network packet can be used to reset the
846f0574f5cSXin LI	expected origin timestamp for target peers.  Legitimate replies
847f0574f5cSXin LI	from targeted peers will fail the origin timestamp check (TEST2)
848f0574f5cSXin LI	causing the reply to be dropped and creating a denial of service
849f0574f5cSXin LI	condition.  This vulnerability can only be exploited if the
850f0574f5cSXin LI	attacker can spoof all of the servers.
851f0574f5cSXin LI   Mitigation:
852f0574f5cSXin LI	Implement BCP-38.
853f0574f5cSXin LI	Configure enough servers/peers that an attacker cannot target
854f0574f5cSXin LI	    all of your time sources.
855f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
856f0574f5cSXin LI	    or the NTP Public Services Project Download Page
857f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
858f0574f5cSXin LI	    ntpd (without -g) if it stops running.
859f0574f5cSXin LI   Credit:
860f0574f5cSXin LI	This weakness was discovered by Matthew Van Gundy of Cisco.
861f0574f5cSXin LI
862f0574f5cSXin LIOther fixes:
863f0574f5cSXin LI
864f0574f5cSXin LI* [Bug 3393] clang scan-build findings <perlinger@ntp.org>
865f0574f5cSXin LI* [Bug 3363] Support for openssl-1.1.0 without compatibility modes
866f0574f5cSXin LI  - rework of patch set from <ntp.org@eroen.eu>. <perlinger@ntp.org>
867f0574f5cSXin LI* [Bug 3356] Bugfix 3072 breaks multicastclient <perlinger@ntp.org>
868f0574f5cSXin LI* [Bug 3216] libntp audio ioctl() args incorrectly cast to int
869f0574f5cSXin LI  on 4.4BSD-Lite derived platforms <perlinger@ntp.org>
870f0574f5cSXin LI  - original patch by Majdi S. Abbas
871f0574f5cSXin LI* [Bug 3215] 'make distcheck' fails with new BK repo format <perlinger@ntp.org>
872f0574f5cSXin LI* [Bug 3173] forking async worker: interrupted pipe I/O <perlinger@ntp.org>
873f0574f5cSXin LI  - initial patch by Christos Zoulas
874f0574f5cSXin LI* [Bug 3139] (...) time_pps_create: Exec format error <perlinger@ntp.org>
875f0574f5cSXin LI  - move loader API from 'inline' to proper source
876f0574f5cSXin LI  - augment pathless dlls with absolute path to NTPD
877f0574f5cSXin LI  - use 'msyslog()' instead of 'printf() 'for reporting trouble
878f0574f5cSXin LI* [Bug 3107] Incorrect Logic for Peer Event Limiting <perlinger@ntp.org>
879f0574f5cSXin LI  - applied patch by Matthew Van Gundy
880f0574f5cSXin LI* [Bug 3065] Quiet warnings on NetBSD <perlinger@ntp.org>
881f0574f5cSXin LI  - applied some of the patches provided by Havard. Not all of them
882f0574f5cSXin LI    still match the current code base, and I did not touch libopt.
883f0574f5cSXin LI* [Bug 3062] Change the process name of forked DNS worker <perlinger@ntp.org>
884f0574f5cSXin LI  - applied patch by Reinhard Max. See bugzilla for limitations.
885f0574f5cSXin LI* [Bug 2923] Trap Configuration Fail <perlinger@ntp.org>
886f0574f5cSXin LI  - fixed dependency inversion from [Bug 2837]
887f0574f5cSXin LI* [Bug 2896] Nothing happens if minsane < maxclock < minclock
888f0574f5cSXin LI  - produce ERROR log message about dysfunctional daemon. <perlinger@ntp.org>
889f0574f5cSXin LI* [Bug 2851] allow -4/-6 on restrict line with mask <perlinger@ntp.org>
890f0574f5cSXin LI  - applied patch by Miroslav Lichvar for ntp4.2.6 compat
891f0574f5cSXin LI* [Bug 2645] out-of-bound pointers in ctl_putsys and decode_bitflags
892f0574f5cSXin LI  - Fixed these and some more locations of this pattern.
893f0574f5cSXin LI    Probably din't get them all, though. <perlinger@ntp.org>
894f0574f5cSXin LI* Update copyright year.
895f0574f5cSXin LI
896f0574f5cSXin LI--
897f0574f5cSXin LI(4.2.8p9-win) 2017/02/01 Released by Harlan Stenn <stenn@ntp.org>
898f0574f5cSXin LI
899f0574f5cSXin LI* [Bug 3144] NTP does not build without openSSL. <perlinger@ntp.org>
900f0574f5cSXin LI  - added missed changeset for automatic openssl lib detection
901f0574f5cSXin LI  - fixed some minor warning issues
902f0574f5cSXin LI* [Bug 3095]  More compatibility with openssl 1.1. <perlinger@ntp.org>
903f0574f5cSXin LI* configure.ac cleanup.  stenn@ntp.org
904f0574f5cSXin LI* openssl configure cleanup.  stenn@ntp.org
905f0574f5cSXin LI
906f0574f5cSXin LI--
907f391d6bcSXin LINTP 4.2.8p9 (Harlan Stenn <stenn@ntp.org>, 2016/11/21)
908f391d6bcSXin LI
909f391d6bcSXin LIFocus: Security, Bug fixes, enhancements.
910f391d6bcSXin LI
911f391d6bcSXin LISeverity: HIGH
912f391d6bcSXin LI
913f391d6bcSXin LIIn addition to bug fixes and enhancements, this release fixes the
914f391d6bcSXin LIfollowing 1 high- (Windows only), 2 medium-, 2 medium-/low, and
915f391d6bcSXin LI5 low-severity vulnerabilities, and provides 28 other non-security
916f391d6bcSXin LIfixes and improvements:
917f391d6bcSXin LI
918f391d6bcSXin LI* Trap crash
919f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
920f391d6bcSXin LI   References: Sec 3119 / CVE-2016-9311 / VU#633847
921f391d6bcSXin LI   Affects: ntp-4.0.90 (21 July 1999), possibly earlier, up to but not
922f391d6bcSXin LI   	including 4.2.8p9, and ntp-4.3.0 up to but not including ntp-4.3.94.
923f391d6bcSXin LI   CVSS2: MED 4.9 (AV:N/AC:H/Au:N/C:N/I:N/A:C)
924f391d6bcSXin LI   CVSS3: MED 4.4 CVSS:3.0/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H
925f391d6bcSXin LI   Summary:
926f391d6bcSXin LI	ntpd does not enable trap service by default. If trap service
927f391d6bcSXin LI	has been explicitly enabled, an attacker can send a specially
928f391d6bcSXin LI	crafted packet to cause a null pointer dereference that will
929f391d6bcSXin LI	crash ntpd, resulting in a denial of service.
930f391d6bcSXin LI   Mitigation:
931f391d6bcSXin LI        Implement BCP-38.
932f391d6bcSXin LI	Use "restrict default noquery ..." in your ntp.conf file. Only
933f391d6bcSXin LI	    allow mode 6 queries from trusted networks and hosts.
934f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
935f391d6bcSXin LI	    or the NTP Public Services Project Download Page
936f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
937f391d6bcSXin LI	    (without -g) if it stops running.
938f391d6bcSXin LI   Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
939f391d6bcSXin LI
940f391d6bcSXin LI* Mode 6 information disclosure and DDoS vector
941f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
942f391d6bcSXin LI   References: Sec 3118 / CVE-2016-9310 / VU#633847
943f391d6bcSXin LI   Affects: ntp-4.0.90 (21 July 1999), possibly earlier, up to but not
944f391d6bcSXin LI	including 4.2.8p9, and ntp-4.3.0 up to but not including ntp-4.3.94.
945f391d6bcSXin LI   CVSS2: MED 6.4 (AV:A/AC:L/Au:N/C:N/I:N/A:P)
946f391d6bcSXin LI   CVSS3: MED 6.5 CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
947f391d6bcSXin LI   Summary:
948f391d6bcSXin LI	An exploitable configuration modification vulnerability exists
949f391d6bcSXin LI	in the control mode (mode 6) functionality of ntpd. If, against
950f391d6bcSXin LI	long-standing BCP recommendations, "restrict default noquery ..."
951f391d6bcSXin LI	is not specified, a specially crafted control mode packet can set
952f391d6bcSXin LI	ntpd traps, providing information disclosure and DDoS
953f391d6bcSXin LI	amplification, and unset ntpd traps, disabling legitimate
954f391d6bcSXin LI	monitoring. A remote, unauthenticated, network attacker can
955f391d6bcSXin LI	trigger this vulnerability.
956f391d6bcSXin LI   Mitigation:
957f391d6bcSXin LI        Implement BCP-38.
958f391d6bcSXin LI	Use "restrict default noquery ..." in your ntp.conf file.
959f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
960f391d6bcSXin LI	    or the NTP Public Services Project Download Page
961f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
962f391d6bcSXin LI	    (without -g) if it stops running.
963f391d6bcSXin LI   Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
964f391d6bcSXin LI
965f391d6bcSXin LI* Broadcast Mode Replay Prevention DoS
966f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
967f391d6bcSXin LI   References: Sec 3114 / CVE-2016-7427 / VU#633847
968f391d6bcSXin LI   Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p9, and
969f391d6bcSXin LI	ntp-4.3.90 up to, but not including ntp-4.3.94.
970f391d6bcSXin LI   CVSS2: LOW 3.3 (AV:A/AC:L/Au:N/C:N/I:N/A:P)
971f391d6bcSXin LI   CVSS3: MED 4.3 CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
972f391d6bcSXin LI   Summary:
973f391d6bcSXin LI	The broadcast mode of NTP is expected to only be used in a
974f391d6bcSXin LI	trusted network. If the broadcast network is accessible to an
975f391d6bcSXin LI	attacker, a potentially exploitable denial of service
976f391d6bcSXin LI	vulnerability in ntpd's broadcast mode replay prevention
977f391d6bcSXin LI	functionality can be abused. An attacker with access to the NTP
978f391d6bcSXin LI	broadcast domain can periodically inject specially crafted
979f391d6bcSXin LI	broadcast mode NTP packets into the broadcast domain which,
980f391d6bcSXin LI	while being logged by ntpd, can cause ntpd to reject broadcast
981f391d6bcSXin LI	mode packets from legitimate NTP broadcast servers.
982f391d6bcSXin LI   Mitigation:
983f391d6bcSXin LI        Implement BCP-38.
984f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
985f391d6bcSXin LI	    or the NTP Public Services Project Download Page
986f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
987f391d6bcSXin LI	    (without -g) if it stops running.
988f391d6bcSXin LI   Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
989f391d6bcSXin LI
990f391d6bcSXin LI* Broadcast Mode Poll Interval Enforcement DoS
991f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
992f391d6bcSXin LI   References: Sec 3113 / CVE-2016-7428 / VU#633847
993f391d6bcSXin LI   Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p9, and
994f391d6bcSXin LI	ntp-4.3.90 up to, but not including ntp-4.3.94
995f391d6bcSXin LI   CVSS2: LOW 3.3 (AV:A/AC:L/Au:N/C:N/I:N/A:P)
996f391d6bcSXin LI   CVSS3: MED 4.3 CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
997f391d6bcSXin LI   Summary:
998f391d6bcSXin LI	The broadcast mode of NTP is expected to only be used in a
999f391d6bcSXin LI	trusted network. If the broadcast network is accessible to an
1000f391d6bcSXin LI	attacker, a potentially exploitable denial of service
1001f391d6bcSXin LI	vulnerability in ntpd's broadcast mode poll interval enforcement
1002f391d6bcSXin LI	functionality can be abused. To limit abuse, ntpd restricts the
1003f391d6bcSXin LI	rate at which each broadcast association will process incoming
1004f391d6bcSXin LI	packets. ntpd will reject broadcast mode packets that arrive
1005f391d6bcSXin LI	before the poll interval specified in the preceding broadcast
1006f391d6bcSXin LI	packet expires. An attacker with access to the NTP broadcast
1007f391d6bcSXin LI	domain can send specially crafted broadcast mode NTP packets to
1008f391d6bcSXin LI	the broadcast domain which, while being logged by ntpd, will
1009f391d6bcSXin LI	cause ntpd to reject broadcast mode packets from legitimate NTP
1010f391d6bcSXin LI	broadcast servers.
1011f391d6bcSXin LI   Mitigation:
1012f391d6bcSXin LI        Implement BCP-38.
1013f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
1014f391d6bcSXin LI	    or the NTP Public Services Project Download Page
1015f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
1016f391d6bcSXin LI	    (without -g) if it stops running.
1017f391d6bcSXin LI   Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
1018f391d6bcSXin LI
1019f391d6bcSXin LI* Windows: ntpd DoS by oversized UDP packet
1020f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
1021f391d6bcSXin LI   References: Sec 3110 / CVE-2016-9312 / VU#633847
1022f391d6bcSXin LI   Affects Windows only: ntp-4.?.?, up to but not including ntp-4.2.8p9,
1023f391d6bcSXin LI	and ntp-4.3.0 up to, but not including ntp-4.3.94.
1024f391d6bcSXin LI   CVSS2: HIGH 7.8 (AV:N/AC:L/Au:N/C:N/I:N/A:C)
1025f391d6bcSXin LI   CVSS3: HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1026f391d6bcSXin LI   Summary:
1027f391d6bcSXin LI	If a vulnerable instance of ntpd on Windows receives a crafted
1028f391d6bcSXin LI	malicious packet that is "too big", ntpd will stop working.
1029f391d6bcSXin LI   Mitigation:
1030f391d6bcSXin LI        Implement BCP-38.
1031f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
1032f391d6bcSXin LI	    or the NTP Public Services Project Download Page
1033f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
1034f391d6bcSXin LI	    (without -g) if it stops running.
1035f391d6bcSXin LI   Credit: This weakness was discovered by Robert Pajak of ABB.
1036f391d6bcSXin LI
1037f391d6bcSXin LI* 0rigin (zero origin) issues
1038f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
1039f391d6bcSXin LI   References: Sec 3102 / CVE-2016-7431 / VU#633847
1040f391d6bcSXin LI   Affects: ntp-4.2.8p8, and ntp-4.3.93.
1041f391d6bcSXin LI   CVSS2: MED 5.0 (AV:N/AC:L/Au:N/C:N/I:P/A:N)
1042f391d6bcSXin LI   CVSS3: MED 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
1043f391d6bcSXin LI   Summary:
1044f391d6bcSXin LI	Zero Origin timestamp problems were fixed by Bug 2945 in
1045f391d6bcSXin LI	ntp-4.2.8p6. However, subsequent timestamp validation checks
1046f391d6bcSXin LI	introduced a regression in the handling of some Zero origin
1047f391d6bcSXin LI	timestamp checks.
1048f391d6bcSXin LI   Mitigation:
1049f391d6bcSXin LI        Implement BCP-38.
1050f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
1051f391d6bcSXin LI	    or the NTP Public Services Project Download Page
1052f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
1053f391d6bcSXin LI	    (without -g) if it stops running.
1054f391d6bcSXin LI   Credit: This weakness was discovered by Sharon Goldberg and Aanchal
1055f391d6bcSXin LI	Malhotra of Boston University.
1056f391d6bcSXin LI
1057f391d6bcSXin LI* read_mru_list() does inadequate incoming packet checks
1058f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
1059f391d6bcSXin LI   References: Sec 3082 / CVE-2016-7434 / VU#633847
1060f391d6bcSXin LI   Affects: ntp-4.2.7p22, up to but not including ntp-4.2.8p9, and
1061f391d6bcSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
1062f391d6bcSXin LI   CVSS2: LOW 3.8 (AV:L/AC:H/Au:S/C:N/I:N/A:C)
1063f391d6bcSXin LI   CVSS3: LOW 3.8 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
1064f391d6bcSXin LI   Summary:
1065f391d6bcSXin LI	If ntpd is configured to allow mrulist query requests from a
1066f391d6bcSXin LI	server that sends a crafted malicious packet, ntpd will crash
1067f391d6bcSXin LI	on receipt of that crafted malicious mrulist query packet.
1068f391d6bcSXin LI   Mitigation:
1069f391d6bcSXin LI	Only allow mrulist query packets from trusted hosts.
1070f391d6bcSXin LI        Implement BCP-38.
1071f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
1072f391d6bcSXin LI	    or the NTP Public Services Project Download Page
1073f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
1074f391d6bcSXin LI	    (without -g) if it stops running.
1075f391d6bcSXin LI   Credit: This weakness was discovered by Magnus Stubman.
1076f391d6bcSXin LI
1077f391d6bcSXin LI* Attack on interface selection
1078f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
1079f391d6bcSXin LI   References: Sec 3072 / CVE-2016-7429 / VU#633847
1080f391d6bcSXin LI   Affects: ntp-4.2.7p385, up to but not including ntp-4.2.8p9, and
1081f391d6bcSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94
1082f391d6bcSXin LI   CVSS2: LOW 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
1083f391d6bcSXin LI   CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
1084f391d6bcSXin LI   Summary:
1085f391d6bcSXin LI	When ntpd receives a server response on a socket that corresponds
1086f391d6bcSXin LI	to a different interface than was used for the request, the peer
1087f391d6bcSXin LI	structure is updated to use the interface for new requests. If
1088f391d6bcSXin LI	ntpd is running on a host with multiple interfaces in separate
1089f391d6bcSXin LI	networks and the operating system doesn't check source address in
1090f391d6bcSXin LI	received packets (e.g. rp_filter on Linux is set to 0), an
1091f391d6bcSXin LI	attacker that knows the address of the source can send a packet
1092f391d6bcSXin LI	with spoofed source address which will cause ntpd to select wrong
1093f391d6bcSXin LI	interface for the source and prevent it from sending new requests
1094f391d6bcSXin LI	until the list of interfaces is refreshed, which happens on
1095f391d6bcSXin LI	routing changes or every 5 minutes by default. If the attack is
1096f391d6bcSXin LI	repeated often enough (once per second), ntpd will not be able to
1097f391d6bcSXin LI	synchronize with the source.
1098f391d6bcSXin LI   Mitigation:
1099f391d6bcSXin LI        Implement BCP-38.
1100f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
1101f391d6bcSXin LI	    or the NTP Public Services Project Download Page
1102f391d6bcSXin LI	If you are going to configure your OS to disable source address
1103f391d6bcSXin LI	    checks, also configure your firewall configuration to control
1104f391d6bcSXin LI	    what interfaces can receive packets from what networks.
1105f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
1106f391d6bcSXin LI	    (without -g) if it stops running.
1107f391d6bcSXin LI   Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
1108f391d6bcSXin LI
1109f391d6bcSXin LI* Client rate limiting and server responses
1110f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
1111f391d6bcSXin LI   References: Sec 3071 / CVE-2016-7426 / VU#633847
1112f391d6bcSXin LI   Affects: ntp-4.2.5p203, up to but not including ntp-4.2.8p9, and
1113f391d6bcSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94
1114f391d6bcSXin LI   CVSS2: LOW 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
1115f391d6bcSXin LI   CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
1116f391d6bcSXin LI   Summary:
1117f391d6bcSXin LI	When ntpd is configured with rate limiting for all associations
1118f391d6bcSXin LI	(restrict default limited in ntp.conf), the limits are applied
1119f391d6bcSXin LI	also to responses received from its configured sources. An
1120f391d6bcSXin LI	attacker who knows the sources (e.g., from an IPv4 refid in
1121f391d6bcSXin LI	server response) and knows the system is (mis)configured in this
1122f391d6bcSXin LI	way can periodically send packets with spoofed source address to
1123f391d6bcSXin LI	keep the rate limiting activated and prevent ntpd from accepting
1124f391d6bcSXin LI	valid responses from its sources.
1125f391d6bcSXin LI
1126f391d6bcSXin LI	While this blanket rate limiting can be useful to prevent
1127f391d6bcSXin LI	brute-force attacks on the origin timestamp, it allows this DoS
1128f391d6bcSXin LI	attack. Similarly, it allows the attacker to prevent mobilization
1129f391d6bcSXin LI	of ephemeral associations.
1130f391d6bcSXin LI   Mitigation:
1131f391d6bcSXin LI        Implement BCP-38.
1132f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
1133f391d6bcSXin LI	    or the NTP Public Services Project Download Page
1134f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
1135f391d6bcSXin LI	    (without -g) if it stops running.
1136f391d6bcSXin LI   Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
1137f391d6bcSXin LI
1138f391d6bcSXin LI* Fix for bug 2085 broke initial sync calculations
1139f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
1140f391d6bcSXin LI   References: Sec 3067 / CVE-2016-7433 / VU#633847
1141f391d6bcSXin LI   Affects: ntp-4.2.7p385, up to but not including ntp-4.2.8p9, and
1142f391d6bcSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94. But the
1143f391d6bcSXin LI	root-distance calculation in general is incorrect in all versions
1144f391d6bcSXin LI	of ntp-4 until this release.
1145f391d6bcSXin LI   CVSS2: LOW 1.2 (AV:L/AC:H/Au:N/C:N/I:N/A:P)
1146f391d6bcSXin LI   CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L
1147f391d6bcSXin LI   Summary:
1148f391d6bcSXin LI	Bug 2085 described a condition where the root delay was included
1149f391d6bcSXin LI	twice, causing the jitter value to be higher than expected. Due
1150f391d6bcSXin LI	to a misinterpretation of a small-print variable in The Book, the
1151f391d6bcSXin LI	fix for this problem was incorrect, resulting in a root distance
1152f391d6bcSXin LI	that did not include the peer dispersion. The calculations and
1153f391d6bcSXin LI	formulae have been reviewed and reconciled, and the code has been
1154f391d6bcSXin LI	updated accordingly.
1155f391d6bcSXin LI   Mitigation:
1156f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
1157f391d6bcSXin LI	    or the NTP Public Services Project Download Page
1158f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
1159f391d6bcSXin LI	    (without -g) if it stops running.
1160f391d6bcSXin LI   Credit: This weakness was discovered independently by Brian Utterback of
1161f391d6bcSXin LI	Oracle, and Sharon Goldberg and Aanchal Malhotra of Boston University.
1162f391d6bcSXin LI
1163f391d6bcSXin LIOther fixes:
1164f391d6bcSXin LI
1165f391d6bcSXin LI* [Bug 3142] bug in netmask prefix length detection <perlinger@ntp.org>
1166f391d6bcSXin LI* [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org
1167f391d6bcSXin LI* [Bug 3129] Unknown hosts can put resolver thread into a hard loop
1168f391d6bcSXin LI  - moved retry decision where it belongs. <perlinger@ntp.org>
1169f391d6bcSXin LI* [Bug 3125] NTPD doesn't fully start when ntp.conf entries are out of order
1170f391d6bcSXin LI  using the loopback-ppsapi-provider.dll <perlinger@ntp.org>
1171f391d6bcSXin LI* [Bug 3116] unit tests for NTP time stamp expansion. <perlinger@ntp.org>
1172f391d6bcSXin LI* [Bug 3100] ntpq can't retrieve daemon_version <perlinger@ntp.org>
1173f391d6bcSXin LI  - fixed extended sysvar lookup (bug introduced with bug 3008 fix)
1174f391d6bcSXin LI* [Bug 3095] Compatibility with openssl 1.1 <perlinger@ntp.org>
1175f391d6bcSXin LI  - applied patches by Kurt Roeckx <kurt@roeckx.be> to source
1176f391d6bcSXin LI  - added shim layer for SSL API calls with issues (both directions)
1177f391d6bcSXin LI* [Bug 3089] Serial Parser does not work anymore for hopfser like device
1178f391d6bcSXin LI  - simplified / refactored hex-decoding in driver. <perlinger@ntp.org>
1179f391d6bcSXin LI* [Bug 3084] update-leap mis-parses the leapfile name.  HStenn.
1180f391d6bcSXin LI* [Bug 3068] Linker warnings when building on Solaris. perlinger@ntp.org
1181f391d6bcSXin LI  - applied patch thanks to Andrew Stormont <andyjstormont@gmail.com>
1182f391d6bcSXin LI* [Bug 3067] Root distance calculation needs improvement.  HStenn
1183f391d6bcSXin LI* [Bug 3066] NMEA clock ignores pps. perlinger@ntp.org
1184f391d6bcSXin LI  - PPS-HACK works again.
1185f391d6bcSXin LI* [Bug 3059] Potential buffer overrun from oversized hash <perlinger@ntp.org>
1186f391d6bcSXin LI  - applied patch by Brian Utterback <brian.utterback@oracle.com>
1187f391d6bcSXin LI* [Bug 3053] ntp_loopfilter.c frequency calc precedence error.  Sarah White.
1188f391d6bcSXin LI* [Bug 3050] Fix for bug #2960 causes [...] spurious error message.
1189f391d6bcSXin LI  <perlinger@ntp.org>
1190f391d6bcSXin LI  - patches by Reinhard Max <max@suse.com> and Havard Eidnes <he@uninett.no>
1191f391d6bcSXin LI* [Bug 3047] Fix refclock_jjy C-DEX JST2000. abe@ntp.org
1192f391d6bcSXin LI  - Patch provided by Kuramatsu.
1193f391d6bcSXin LI* [Bug 3021] unity_fixture.c needs pragma weak <perlinger@ntp.org>
1194f391d6bcSXin LI  - removed unnecessary & harmful decls of 'setUp()' & 'tearDown()'
1195f391d6bcSXin LI* [Bug 3019] Windows: ERROR_HOST_UNREACHABLE block packet processing. DMayer
1196f391d6bcSXin LI* [Bug 2998] sntp/tests/packetProcessing.c broken without openssl. JPerlinger
1197f391d6bcSXin LI* [Bug 2961] sntp/tests/packetProcessing.c assumes AUTOKEY.  HStenn.
1198f391d6bcSXin LI* [Bug 2959] refclock_jupiter: gps week correction <perlinger@ntp.org>
1199f391d6bcSXin LI  - fixed GPS week expansion to work based on build date. Special thanks
1200f391d6bcSXin LI    to Craig Leres for initial patch and testing.
1201f391d6bcSXin LI* [Bug 2951] ntpd tests fail: multiple definition of `send_via_ntp_signd'
1202f391d6bcSXin LI  - fixed Makefile.am <perlinger@ntp.org>
1203f391d6bcSXin LI* [Bug 2689] ATOM driver processes last PPS pulse at startup,
1204f391d6bcSXin LI             even if it is very old <perlinger@ntp.org>
1205f391d6bcSXin LI  - make sure PPS source is alive before processing samples
1206f391d6bcSXin LI  - improve stability close to the 500ms phase jump (phase gate)
1207f391d6bcSXin LI* Fix typos in include/ntp.h.
1208f391d6bcSXin LI* Shim X509_get_signature_nid() if needed
1209f391d6bcSXin LI* git author attribution cleanup
1210f391d6bcSXin LI* bk ignore file cleanup
1211f391d6bcSXin LI* remove locks in Windows IO, use rpc-like thread synchronisation instead
1212f391d6bcSXin LI
1213f391d6bcSXin LI---
1214e27abb66SXin LINTP 4.2.8p8 (Harlan Stenn <stenn@ntp.org>, 2016/06/02)
1215e27abb66SXin LI
1216e27abb66SXin LIFocus: Security, Bug fixes, enhancements.
1217e27abb66SXin LI
1218e27abb66SXin LISeverity: HIGH
1219e27abb66SXin LI
1220e27abb66SXin LIIn addition to bug fixes and enhancements, this release fixes the
1221e27abb66SXin LIfollowing 1 high- and 4 low-severity vulnerabilities:
1222e27abb66SXin LI
1223e27abb66SXin LI* CRYPTO_NAK crash
1224e27abb66SXin LI   Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
1225e27abb66SXin LI   References: Sec 3046 / CVE-2016-4957 / VU#321640
1226e27abb66SXin LI   Affects: ntp-4.2.8p7, and ntp-4.3.92.
1227e27abb66SXin LI   CVSS2: HIGH 7.8 (AV:N/AC:L/Au:N/C:N/I:N/A:C)
1228e27abb66SXin LI   CVSS3: HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1229e27abb66SXin LI   Summary: The fix for Sec 3007 in ntp-4.2.8p7 contained a bug that
1230e27abb66SXin LI	could cause ntpd to crash.
1231e27abb66SXin LI   Mitigation:
1232e27abb66SXin LI        Implement BCP-38.
1233e27abb66SXin LI        Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
1234e27abb66SXin LI	    or the NTP Public Services Project Download Page
1235e27abb66SXin LI        If you cannot upgrade from 4.2.8p7, the only other alternatives
1236e27abb66SXin LI	    are to patch your code or filter CRYPTO_NAK packets.
1237e27abb66SXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
1238e27abb66SXin LI	    (without -g) if it stops running.
1239e27abb66SXin LI   Credit: This weakness was discovered by Nicolas Edet of Cisco.
1240e27abb66SXin LI
1241e27abb66SXin LI* Bad authentication demobilizes ephemeral associations
1242e27abb66SXin LI   Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
1243e27abb66SXin LI   References: Sec 3045 / CVE-2016-4953 / VU#321640
1244e27abb66SXin LI   Affects: ntp-4, up to but not including ntp-4.2.8p8, and
1245e27abb66SXin LI	ntp-4.3.0 up to, but not including ntp-4.3.93.
1246e27abb66SXin LI   CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
1247e27abb66SXin LI   CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1248e27abb66SXin LI   Summary: An attacker who knows the origin timestamp and can send a
1249e27abb66SXin LI	spoofed packet containing a CRYPTO-NAK to an ephemeral peer
1250e27abb66SXin LI	target before any other response is sent can demobilize that
1251e27abb66SXin LI	association.
1252e27abb66SXin LI   Mitigation:
1253e27abb66SXin LI	Implement BCP-38.
1254e27abb66SXin LI	Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
1255e27abb66SXin LI	    or the NTP Public Services Project Download Page
1256e27abb66SXin LI	Properly monitor your ntpd instances.
1257e27abb66SXin LI	Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
1258e27abb66SXin LI
1259e27abb66SXin LI* Processing spoofed server packets
1260e27abb66SXin LI   Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
1261e27abb66SXin LI   References: Sec 3044 / CVE-2016-4954 / VU#321640
1262e27abb66SXin LI   Affects: ntp-4, up to but not including ntp-4.2.8p8, and
1263e27abb66SXin LI	ntp-4.3.0 up to, but not including ntp-4.3.93.
1264e27abb66SXin LI   CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
1265e27abb66SXin LI   CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1266e27abb66SXin LI   Summary: An attacker who is able to spoof packets with correct origin
1267e27abb66SXin LI	timestamps from enough servers before the expected response
1268e27abb66SXin LI	packets arrive at the target machine can affect some peer
1269e27abb66SXin LI	variables and, for example, cause a false leap indication to be set.
1270e27abb66SXin LI   Mitigation:
1271e27abb66SXin LI	Implement BCP-38.
1272e27abb66SXin LI	Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
1273e27abb66SXin LI	    or the NTP Public Services Project Download Page
1274e27abb66SXin LI	Properly monitor your ntpd instances.
1275e27abb66SXin LI   Credit: This weakness was discovered by Jakub Prokes of Red Hat.
1276e27abb66SXin LI
1277e27abb66SXin LI* Autokey association reset
1278e27abb66SXin LI   Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
1279e27abb66SXin LI   References: Sec 3043 / CVE-2016-4955 / VU#321640
1280e27abb66SXin LI   Affects: ntp-4, up to but not including ntp-4.2.8p8, and
1281e27abb66SXin LI	ntp-4.3.0 up to, but not including ntp-4.3.93.
1282e27abb66SXin LI   CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
1283e27abb66SXin LI   CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1284e27abb66SXin LI   Summary: An attacker who is able to spoof a packet with a correct
1285e27abb66SXin LI	origin timestamp before the expected response packet arrives at
1286e27abb66SXin LI	the target machine can send a CRYPTO_NAK or a bad MAC and cause
1287e27abb66SXin LI	the association's peer variables to be cleared. If this can be
1288e27abb66SXin LI	done often enough, it will prevent that association from working.
1289e27abb66SXin LI   Mitigation:
1290e27abb66SXin LI	Implement BCP-38.
1291e27abb66SXin LI	Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
1292e27abb66SXin LI	    or the NTP Public Services Project Download Page
1293e27abb66SXin LI	Properly monitor your ntpd instances.
1294e27abb66SXin LI   Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
1295e27abb66SXin LI
1296e27abb66SXin LI* Broadcast interleave
1297e27abb66SXin LI   Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
1298e27abb66SXin LI   References: Sec 3042 / CVE-2016-4956 / VU#321640
1299e27abb66SXin LI   Affects: ntp-4, up to but not including ntp-4.2.8p8, and
1300e27abb66SXin LI   	ntp-4.3.0 up to, but not including ntp-4.3.93.
1301e27abb66SXin LI   CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
1302e27abb66SXin LI   CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1303e27abb66SXin LI   Summary: The fix for NtpBug2978 does not cover broadcast associations,
1304e27abb66SXin LI   	so broadcast clients can be triggered to flip into interleave mode.
1305e27abb66SXin LI   Mitigation:
1306e27abb66SXin LI	Implement BCP-38.
1307e27abb66SXin LI	Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
1308e27abb66SXin LI	    or the NTP Public Services Project Download Page
1309e27abb66SXin LI	Properly monitor your ntpd instances.
1310e27abb66SXin LI   Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
1311e27abb66SXin LI
1312e27abb66SXin LIOther fixes:
1313e27abb66SXin LI* [Bug 3038] NTP fails to build in VS2015. perlinger@ntp.org
1314e27abb66SXin LI  - provide build environment
1315e27abb66SXin LI  - 'wint_t' and 'struct timespec' defined by VS2015
1316e27abb66SXin LI  - fixed print()/scanf() format issues
1317e27abb66SXin LI* [Bug 3052] Add a .gitignore file.  Edmund Wong.
1318e27abb66SXin LI* [Bug 3054] miscopt.html documents the allan intercept in seconds. SWhite.
1319e27abb66SXin LI* [Bug 3058] fetch_timestamp() mishandles 64-bit alignment. Brian Utterback,
1320e27abb66SXin LI  JPerlinger, HStenn.
1321e27abb66SXin LI* Fix typo in ntp-wait and plot_summary.  HStenn.
1322e27abb66SXin LI* Make sure we have an "author" file for git imports.  HStenn.
1323e27abb66SXin LI* Update the sntp problem tests for MacOS.  HStenn.
1324e27abb66SXin LI
1325e27abb66SXin LI---
13264990d495SXin LINTP 4.2.8p7 (Harlan Stenn <stenn@ntp.org>, 2016/04/26)
13273311ff84SXin LI
13284990d495SXin LIFocus: Security, Bug fixes, enhancements.
13294990d495SXin LI
13304990d495SXin LISeverity: MEDIUM
13314990d495SXin LI
13324990d495SXin LIWhen building NTP from source, there is a new configure option
13334990d495SXin LIavailable, --enable-dynamic-interleave.  More information on this below.
13344990d495SXin LI
13354990d495SXin LIAlso note that ntp-4.2.8p7 logs more "unexpected events" than previous
13364990d495SXin LIversions of ntp.  These events have almost certainly happened in the
13374990d495SXin LIpast, it's just that they were silently counted and not logged.  With
13384990d495SXin LIthe increasing awareness around security, we feel it's better to clearly
13394990d495SXin LIlog these events to help detect abusive behavior.  This increased
13404990d495SXin LIlogging can also help detect other problems, too.
13414990d495SXin LI
13424990d495SXin LIIn addition to bug fixes and enhancements, this release fixes the
13434990d495SXin LIfollowing 9 low- and medium-severity vulnerabilities:
13444990d495SXin LI
13454990d495SXin LI* Improve NTP security against buffer comparison timing attacks,
13464990d495SXin LI  AKA: authdecrypt-timing
13474990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
13484990d495SXin LI   References: Sec 2879 / CVE-2016-1550
13494990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
13504990d495SXin LI	4.3.0 up to, but not including 4.3.92
13514990d495SXin LI   CVSSv2: LOW 2.6 - (AV:L/AC:H/Au:N/C:P/I:P/A:N)
13524990d495SXin LI   CVSSv3: MED 4.0 - CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
13534990d495SXin LI   Summary: Packet authentication tests have been performed using
13544990d495SXin LI	memcmp() or possibly bcmp(), and it is potentially possible
13554990d495SXin LI	for a local or perhaps LAN-based attacker to send a packet with
13564990d495SXin LI	an authentication payload and indirectly observe how much of
13574990d495SXin LI	the digest has matched.
13584990d495SXin LI   Mitigation:
13594990d495SXin LI	Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
13604990d495SXin LI	    or the NTP Public Services Project Download Page.
13614990d495SXin LI	Properly monitor your ntpd instances.
13624990d495SXin LI   Credit: This weakness was discovered independently by Loganaden
13634990d495SXin LI   	Velvindron, and Matthew Van Gundy and Stephen Gray of Cisco ASIG.
13644990d495SXin LI
13654990d495SXin LI* Zero origin timestamp bypass: Additional KoD checks.
13664990d495SXin LI   References: Sec 2945 / Sec 2901 / CVE-2015-8138
13674990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7,
13684990d495SXin LI   Summary: Improvements to the fixes incorporated in t 4.2.8p6 and 4.3.92.
13694990d495SXin LI
13704990d495SXin LI* peer associations were broken by the fix for NtpBug2899
13714990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
13724990d495SXin LI   References: Sec 2952 / CVE-2015-7704
13734990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
13744990d495SXin LI   	4.3.0 up to, but not including 4.3.92
13754990d495SXin LI   CVSSv2: MED 4.3 - (AV:N/AC:M/Au:N/C:N/I:N/A:P)
13764990d495SXin LI   Summary: The fix for NtpBug2952 in ntp-4.2.8p5 to address broken peer
13774990d495SXin LI   	associations did not address all of the issues.
13784990d495SXin LI   Mitigation:
13794990d495SXin LI        Implement BCP-38.
13804990d495SXin LI        Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
13814990d495SXin LI	    or the NTP Public Services Project Download Page
13824990d495SXin LI        If you can't upgrade, use "server" associations instead of
13834990d495SXin LI	    "peer" associations.
13844990d495SXin LI        Monitor your ntpd instances.
13854990d495SXin LI   Credit: This problem was discovered by Michael Tatarinov.
13864990d495SXin LI
13874990d495SXin LI* Validate crypto-NAKs, AKA: CRYPTO-NAK DoS
13884990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
13894990d495SXin LI   References: Sec 3007 / CVE-2016-1547 / VU#718152
13904990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
13914990d495SXin LI	4.3.0 up to, but not including 4.3.92
13924990d495SXin LI   CVSS2: MED 4.3 - (AV:N/AC:M/Au:N/C:N/I:N/A:P)
13934990d495SXin LI   CVSS3: MED 3.7 - CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
13944990d495SXin LI   Summary: For ntp-4 versions up to but not including ntp-4.2.8p7, an
13954990d495SXin LI	off-path attacker can cause a preemptable client association to
13964990d495SXin LI	be demobilized by sending a crypto NAK packet to a victim client
13974990d495SXin LI	with a spoofed source address of an existing associated peer.
13984990d495SXin LI	This is true even if authentication is enabled.
13994990d495SXin LI
14004990d495SXin LI	Furthermore, if the attacker keeps sending crypto NAK packets,
14014990d495SXin LI	for example one every second, the victim never has a chance to
14024990d495SXin LI	reestablish the association and synchronize time with that
14034990d495SXin LI	legitimate server.
14044990d495SXin LI
14054990d495SXin LI	For ntp-4.2.8 thru ntp-4.2.8p6 there is less risk because more
14064990d495SXin LI	stringent checks are performed on incoming packets, but there
14074990d495SXin LI	are still ways to exploit this vulnerability in versions before
14084990d495SXin LI	ntp-4.2.8p7.
14094990d495SXin LI   Mitigation:
14104990d495SXin LI	Implement BCP-38.
14114990d495SXin LI	Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
14124990d495SXin LI	    or the NTP Public Services Project Download Page
141309100258SXin LI	Properly monitor your ntpd instances
14144990d495SXin LI   Credit: This weakness was discovered by Stephen Gray and
14154990d495SXin LI   	Matthew Van Gundy of Cisco ASIG.
14164990d495SXin LI
14174990d495SXin LI* ctl_getitem() return value not always checked
14184990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
14194990d495SXin LI   References: Sec 3008 / CVE-2016-2519
14204990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
14214990d495SXin LI	4.3.0 up to, but not including 4.3.92
14224990d495SXin LI   CVSSv2: MED 4.9 - (AV:N/AC:H/Au:S/C:N/I:N/A:C)
14234990d495SXin LI   CVSSv3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
14244990d495SXin LI   Summary: ntpq and ntpdc can be used to store and retrieve information
14254990d495SXin LI   	in ntpd. It is possible to store a data value that is larger
14264990d495SXin LI	than the size of the buffer that the ctl_getitem() function of
14274990d495SXin LI	ntpd uses to report the return value. If the length of the
14284990d495SXin LI	requested data value returned by ctl_getitem() is too large,
14294990d495SXin LI	the value NULL is returned instead. There are 2 cases where the
14304990d495SXin LI	return value from ctl_getitem() was not directly checked to make
14314990d495SXin LI	sure it's not NULL, but there are subsequent INSIST() checks
14324990d495SXin LI	that make sure the return value is not NULL. There are no data
14334990d495SXin LI	values ordinarily stored in ntpd that would exceed this buffer
14344990d495SXin LI	length. But if one has permission to store values and one stores
14354990d495SXin LI	a value that is "too large", then ntpd will abort if an attempt
14364990d495SXin LI	is made to read that oversized value.
14374990d495SXin LI    Mitigation:
14384990d495SXin LI        Implement BCP-38.
14394990d495SXin LI        Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
14404990d495SXin LI	    or the NTP Public Services Project Download Page
14414990d495SXin LI        Properly monitor your ntpd instances.
14424990d495SXin LI    Credit: This weakness was discovered by Yihan Lian of the Cloud
14434990d495SXin LI    	Security Team, Qihoo 360.
14444990d495SXin LI
14454990d495SXin LI* Crafted addpeer with hmode > 7 causes array wraparound with MATCH_ASSOC
14464990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
14474990d495SXin LI   References: Sec 3009 / CVE-2016-2518 / VU#718152
14484990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
14494990d495SXin LI	4.3.0 up to, but not including 4.3.92
14504990d495SXin LI   CVSS2: LOW 2.1 - (AV:N/AC:H/Au:S/C:N/I:N/A:P)
14514990d495SXin LI   CVSS3: LOW 2.0 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
14524990d495SXin LI   Summary: Using a crafted packet to create a peer association with
14534990d495SXin LI   	hmode > 7 causes the MATCH_ASSOC() lookup to make an
14544990d495SXin LI	out-of-bounds reference.
14554990d495SXin LI   Mitigation:
14564990d495SXin LI	Implement BCP-38.
14574990d495SXin LI	Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
14584990d495SXin LI	    or the NTP Public Services Project Download Page
14594990d495SXin LI	Properly monitor your ntpd instances
14604990d495SXin LI   Credit: This weakness was discovered by Yihan Lian of the Cloud
14614990d495SXin LI   	Security Team, Qihoo 360.
14624990d495SXin LI
14634990d495SXin LI* remote configuration trustedkey/requestkey/controlkey values are not
14644990d495SXin LI	properly validated
14654990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
14664990d495SXin LI   References: Sec 3010 / CVE-2016-2517 / VU#718152
14674990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
14684990d495SXin LI	4.3.0 up to, but not including 4.3.92
14694990d495SXin LI   CVSS2: MED 4.9 - (AV:N/AC:H/Au:S/C:N/I:N/A:C)
14704990d495SXin LI   CVSS3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
14714990d495SXin LI   Summary: If ntpd was expressly configured to allow for remote
14724990d495SXin LI   	configuration, a malicious user who knows the controlkey for
14734990d495SXin LI	ntpq or the requestkey for ntpdc (if mode7 is expressly enabled)
14744990d495SXin LI	can create a session with ntpd and then send a crafted packet to
14754990d495SXin LI	ntpd that will change the value of the trustedkey, controlkey,
14764990d495SXin LI	or requestkey to a value that will prevent any subsequent
14774990d495SXin LI	authentication with ntpd until ntpd is restarted.
14784990d495SXin LI   Mitigation:
14794990d495SXin LI	Implement BCP-38.
14804990d495SXin LI	Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
14814990d495SXin LI	    or the NTP Public Services Project Download Page
148209100258SXin LI	Properly monitor your ntpd instances
14834990d495SXin LI   Credit: This weakness was discovered by Yihan Lian of the Cloud
14844990d495SXin LI   	Security Team, Qihoo 360.
14854990d495SXin LI
14864990d495SXin LI* Duplicate IPs on unconfig directives will cause an assertion botch in ntpd
14874990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
14884990d495SXin LI   References: Sec 3011 / CVE-2016-2516 / VU#718152
14894990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
14904990d495SXin LI   	4.3.0 up to, but not including 4.3.92
14914990d495SXin LI   CVSS2: MED 6.3 - (AV:N/AC:M/Au:S/C:N/I:N/A:C)
14924990d495SXin LI   CVSS3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
14934990d495SXin LI   Summary: If ntpd was expressly configured to allow for remote
14944990d495SXin LI   	configuration, a malicious user who knows the controlkey for
14954990d495SXin LI	ntpq or the requestkey for ntpdc (if mode7 is expressly enabled)
14964990d495SXin LI	can create a session with ntpd and if an existing association is
14974990d495SXin LI	unconfigured using the same IP twice on the unconfig directive
14984990d495SXin LI	line, ntpd will abort.
14994990d495SXin LI   Mitigation:
15004990d495SXin LI	Implement BCP-38.
15014990d495SXin LI	Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
15024990d495SXin LI	    or the NTP Public Services Project Download Page
15034990d495SXin LI	Properly monitor your ntpd instances
15044990d495SXin LI   Credit: This weakness was discovered by Yihan Lian of the Cloud
15054990d495SXin LI   	Security Team, Qihoo 360.
15064990d495SXin LI
15074990d495SXin LI* Refclock impersonation vulnerability
15084990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
15094990d495SXin LI   References: Sec 3020 / CVE-2016-1551
15104990d495SXin LI   Affects: On a very limited number of OSes, all NTP releases up to but
15114990d495SXin LI	not including 4.2.8p7, and 4.3.0 up to but not including 4.3.92.
15124990d495SXin LI	By "very limited number of OSes" we mean no general-purpose OSes
15134990d495SXin LI	have yet been identified that have this vulnerability.
15144990d495SXin LI   CVSSv2: LOW 2.6 - (AV:N/AC:H/Au:N/C:N/I:P/A:N)
15154990d495SXin LI   CVSSv3: LOW 3.7 - CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
15164990d495SXin LI   Summary: While most OSes implement martian packet filtering in their
15174990d495SXin LI   	network stack, at least regarding 127.0.0.0/8, some will allow
15184990d495SXin LI	packets claiming to be from 127.0.0.0/8 that arrive over a
15194990d495SXin LI	physical network. On these OSes, if ntpd is configured to use a
15204990d495SXin LI	reference clock an attacker can inject packets over the network
15214990d495SXin LI	that look like they are coming from that reference clock.
15224990d495SXin LI   Mitigation:
15234990d495SXin LI        Implement martian packet filtering and BCP-38.
15244990d495SXin LI        Configure ntpd to use an adequate number of time sources.
15254990d495SXin LI        Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
15264990d495SXin LI	    or the NTP Public Services Project Download Page
15274990d495SXin LI        If you are unable to upgrade and if you are running an OS that
15284990d495SXin LI	    has this vulnerability, implement martian packet filters and
15294990d495SXin LI	    lobby your OS vendor to fix this problem, or run your
15304990d495SXin LI	    refclocks on computers that use OSes that are not vulnerable
15314990d495SXin LI	    to these attacks and have your vulnerable machines get their
15324990d495SXin LI	    time from protected resources.
15334990d495SXin LI        Properly monitor your ntpd instances.
15344990d495SXin LI   Credit: This weakness was discovered by Matt Street and others of
15354990d495SXin LI   	Cisco ASIG.
15364990d495SXin LI
15374990d495SXin LIThe following issues were fixed in earlier releases and contain
15384990d495SXin LIimprovements in 4.2.8p7:
15394990d495SXin LI
15404990d495SXin LI* Clients that receive a KoD should validate the origin timestamp field.
15414990d495SXin LI   References: Sec 2901 / CVE-2015-7704, CVE-2015-7705
15424990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7,
15434990d495SXin LI   Summary: Improvements to the fixes incorporated into 4.2.8p4 and 4.3.77.
15444990d495SXin LI
15454990d495SXin LI* Skeleton key: passive server with trusted key can serve time.
15464990d495SXin LI   References: Sec 2936 / CVE-2015-7974
15474990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7,
15484990d495SXin LI   Summary: Improvements to the fixes incorporated in t 4.2.8p6 and 4.3.90.
15494990d495SXin LI
15504990d495SXin LITwo other vulnerabilities have been reported, and the mitigations
15514990d495SXin LIfor these are as follows:
15524990d495SXin LI
15534990d495SXin LI* Interleave-pivot
15544990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
15554990d495SXin LI   References: Sec 2978 / CVE-2016-1548
15564990d495SXin LI   Affects: All ntp-4 releases.
15574990d495SXin LI   CVSSv2: MED 6.4 - (AV:N/AC:L/Au:N/C:N/I:P/A:P)
15584990d495SXin LI   CVSSv3: MED 7.2 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L
15594990d495SXin LI   Summary: It is possible to change the time of an ntpd client or deny
15604990d495SXin LI   	service to an ntpd client by forcing it to change from basic
15614990d495SXin LI	client/server mode to interleaved symmetric mode. An attacker
15624990d495SXin LI	can spoof a packet from a legitimate ntpd server with an origin
15634990d495SXin LI	timestamp that matches the peer->dst timestamp recorded for that
15644990d495SXin LI	server. After making this switch, the client will reject all
15654990d495SXin LI	future legitimate server responses. It is possible to force the
15664990d495SXin LI	victim client to move time after the mode has been changed.
15674990d495SXin LI	ntpq gives no indication that the mode has been switched.
15684990d495SXin LI   Mitigation:
15694990d495SXin LI        Implement BCP-38.
15704990d495SXin LI        Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
15714990d495SXin LI	    or the NTP Public Services Project Download Page.  These
15724990d495SXin LI	    versions will not dynamically "flip" into interleave mode
15734990d495SXin LI	    unless configured to do so.
15744990d495SXin LI        Properly monitor your ntpd instances.
15754990d495SXin LI   Credit: This weakness was discovered by Miroslav Lichvar of RedHat
15764990d495SXin LI   	and separately by Jonathan Gardner of Cisco ASIG.
15774990d495SXin LI
15784990d495SXin LI* Sybil vulnerability: ephemeral association attack
15794990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
15804990d495SXin LI   References: Sec 3012 / CVE-2016-1549
15814990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
15824990d495SXin LI   	4.3.0 up to, but not including 4.3.92
15834990d495SXin LI   CVSSv2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N)
15844990d495SXin LI   CVSS3v: MED 5.3 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
15854990d495SXin LI   Summary: ntpd can be vulnerable to Sybil attacks. If one is not using
15864990d495SXin LI   	the feature introduced in ntp-4.2.8p6 allowing an optional 4th
15874990d495SXin LI	field in the ntp.keys file to specify which IPs can serve time,
15884990d495SXin LI	a malicious authenticated peer can create arbitrarily-many
15894990d495SXin LI	ephemeral associations in order to win the clock selection of
15904990d495SXin LI	ntpd and modify a victim's clock.
15914990d495SXin LI   Mitigation:
15924990d495SXin LI        Implement BCP-38.
15934990d495SXin LI        Use the 4th field in the ntp.keys file to specify which IPs
15944990d495SXin LI	    can be time servers.
15954990d495SXin LI        Properly monitor your ntpd instances.
15964990d495SXin LI   Credit: This weakness was discovered by Matthew Van Gundy of Cisco ASIG.
15974990d495SXin LI
15984990d495SXin LIOther fixes:
15994990d495SXin LI
16004990d495SXin LI* [Bug 2831]  Segmentation Fault in DNS lookup during startup. perlinger@ntp.org
16014990d495SXin LI  - fixed yet another race condition in the threaded resolver code.
16024990d495SXin LI* [Bug 2858] bool support.  Use stdbool.h when available.  HStenn.
16034990d495SXin LI* [Bug 2879] Improve NTP security against timing attacks. perlinger@ntp.org
16044990d495SXin LI  - integrated patches by Loganaden Velvidron <logan@ntp.org>
16054990d495SXin LI    with some modifications & unit tests
16064990d495SXin LI* [Bug 2960] async name resolution fixes for chroot() environments.
16074990d495SXin LI  Reinhard Max.
16084990d495SXin LI* [Bug 2994] Systems with HAVE_SIGNALED_IO fail to compile. perlinger@ntp.org
16094990d495SXin LI* [Bug 2995] Fixes to compile on Windows
16104990d495SXin LI* [Bug 2999] out-of-bounds access in 'is_safe_filename()'. perlinger@ntp.org
16114990d495SXin LI* [Bug 3013] Fix for ssl_init.c SHA1 test. perlinger@ntp.org
16124990d495SXin LI  - Patch provided by Ch. Weisgerber
16134990d495SXin LI* [Bug 3015] ntpq: config-from-file: "request contains an unprintable character"
16144990d495SXin LI  - A change related to [Bug 2853] forbids trailing white space in
16154990d495SXin LI    remote config commands. perlinger@ntp.org
16164990d495SXin LI* [Bug 3019] NTPD stops processing packets after ERROR_HOST_UNREACHABLE
16174990d495SXin LI  - report and patch from Aleksandr Kostikov.
16184990d495SXin LI  - Overhaul of Windows IO completion port handling. perlinger@ntp.org
16194990d495SXin LI* [Bug 3022] authkeys.c should be refactored. perlinger@ntp.org
16204990d495SXin LI  - fixed memory leak in access list (auth[read]keys.c)
16214990d495SXin LI  - refactored handling of key access lists (auth[read]keys.c)
16224990d495SXin LI  - reduced number of error branches (authreadkeys.c)
16234990d495SXin LI* [Bug 3023] ntpdate cannot correct dates in the future. perlinger@ntp.org
16244990d495SXin LI* [Bug 3030] ntpq needs a general way to specify refid output format.  HStenn.
16254990d495SXin LI* [Bug 3031] ntp broadcastclient unable to synchronize to an server
16264990d495SXin LI             when the time of server changed. perlinger@ntp.org
16274990d495SXin LI  - Check the initial delay calculation and reject/unpeer the broadcast
16284990d495SXin LI    server if the delay exceeds 50ms. Retry again after the next
16294990d495SXin LI    broadcast packet.
16304990d495SXin LI* [Bug 3036] autokey trips an INSIST in authistrustedip().  Harlan Stenn.
16314990d495SXin LI* Document ntp.key's optional IP list in authenetic.html.  Harlan Stenn.
16324990d495SXin LI* Update html/xleave.html documentation.  Harlan Stenn.
16334990d495SXin LI* Update ntp.conf documentation.  Harlan Stenn.
16344990d495SXin LI* Fix some Credit: attributions in the NEWS file.  Harlan Stenn.
16354990d495SXin LI* Fix typo in html/monopt.html.  Harlan Stenn.
16364990d495SXin LI* Add README.pullrequests.  Harlan Stenn.
16374990d495SXin LI* Cleanup to include/ntp.h.  Harlan Stenn.
16384990d495SXin LI
16394990d495SXin LINew option to 'configure':
16404990d495SXin LI
16414990d495SXin LIWhile looking in to the issues around Bug 2978, the "interleave pivot"
16424990d495SXin LIissue, it became clear that there are some intricate and unresolved
16434990d495SXin LIissues with interleave operations.  We also realized that the interleave
16444990d495SXin LIprotocol was never added to the NTPv4 Standard, and it should have been.
16454990d495SXin LI
16464990d495SXin LIInterleave mode was first released in July of 2008, and can be engaged
16474990d495SXin LIin two ways.  Any 'peer' and 'broadcast' lines in the ntp.conf file may
16484990d495SXin LIcontain the 'xleave' option, which will expressly enable interlave mode
16494990d495SXin LIfor that association.  Additionally, if a time packet arrives and is
16504990d495SXin LIfound inconsistent with normal protocol behavior but has certain
16514990d495SXin LIcharacteristics that are compatible with interleave mode, NTP will
16524990d495SXin LIdynamically switch to interleave mode.  With sufficient knowledge, an
16534990d495SXin LIattacker can send a crafted forged packet to an NTP instance that
16544990d495SXin LItriggers only one side to enter interleaved mode.
16554990d495SXin LI
16564990d495SXin LITo prevent this attack until we can thoroughly document, describe,
16574990d495SXin LIfix, and test the dynamic interleave mode, we've added a new
16584990d495SXin LI'configure' option to the build process:
16594990d495SXin LI
16604990d495SXin LI --enable-dynamic-interleave
16614990d495SXin LI
16624990d495SXin LIThis option controls whether or not NTP will, if conditions are right,
16634990d495SXin LIengage dynamic interleave mode.  Dynamic interleave mode is disabled by
16644990d495SXin LIdefault in ntp-4.2.8p7.
16654990d495SXin LI
16664990d495SXin LI---
16674990d495SXin LINTP 4.2.8p6 (Harlan Stenn <stenn@ntp.org>, 2016/01/20)
166868ba7e87SXin LI
166968ba7e87SXin LIFocus: Security, Bug fixes, enhancements.
167068ba7e87SXin LI
167168ba7e87SXin LISeverity: MEDIUM
167268ba7e87SXin LI
167368ba7e87SXin LIIn addition to bug fixes and enhancements, this release fixes the
16744990d495SXin LIfollowing 1 low- and 8 medium-severity vulnerabilities:
167568ba7e87SXin LI
167668ba7e87SXin LI* Potential Infinite Loop in 'ntpq'
167768ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
167868ba7e87SXin LI   References: Sec 2548 / CVE-2015-8158
167968ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
168068ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
168168ba7e87SXin LI   CVSS2: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM
168268ba7e87SXin LI   CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N Base Score: 5.3 - MEDIUM
168368ba7e87SXin LI   Summary: 'ntpq' processes incoming packets in a loop in 'getresponse()'.
168468ba7e87SXin LI	The loop's only stopping conditions are receiving a complete and
168568ba7e87SXin LI	correct response or hitting a small number of error conditions.
168668ba7e87SXin LI	If the packet contains incorrect values that don't trigger one of
168768ba7e87SXin LI	the error conditions, the loop continues to receive new packets.
168868ba7e87SXin LI	Note well, this is an attack against an instance of 'ntpq', not
168968ba7e87SXin LI	'ntpd', and this attack requires the attacker to do one of the
169068ba7e87SXin LI	following:
169168ba7e87SXin LI	* Own a malicious NTP server that the client trusts
169268ba7e87SXin LI	* Prevent a legitimate NTP server from sending packets to
169368ba7e87SXin LI	    the 'ntpq' client
169468ba7e87SXin LI	* MITM the 'ntpq' communications between the 'ntpq' client
169568ba7e87SXin LI	    and the NTP server
169668ba7e87SXin LI   Mitigation:
169768ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
169868ba7e87SXin LI	or the NTP Public Services Project Download Page
169968ba7e87SXin LI   Credit: This weakness was discovered by Jonathan Gardner of Cisco ASIG.
170068ba7e87SXin LI
170168ba7e87SXin LI* 0rigin: Zero Origin Timestamp Bypass
170268ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
170368ba7e87SXin LI   References: Sec 2945 / CVE-2015-8138
170468ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
170568ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
170668ba7e87SXin LI   CVSS2: (AV:N/AC:L/Au:N/C:N/I:P/A:N) Base Score: 5.0 - MEDIUM
170768ba7e87SXin LI   CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N Base Score: 5.3 - MEDIUM
170868ba7e87SXin LI	(3.7 - LOW if you score AC:L)
170968ba7e87SXin LI   Summary: To distinguish legitimate peer responses from forgeries, a
171068ba7e87SXin LI	client attempts to verify a response packet by ensuring that the
171168ba7e87SXin LI	origin timestamp in the packet matches the origin timestamp it
171268ba7e87SXin LI	transmitted in its last request.  A logic error exists that
171368ba7e87SXin LI	allows packets with an origin timestamp of zero to bypass this
171468ba7e87SXin LI	check whenever there is not an outstanding request to the server.
171568ba7e87SXin LI   Mitigation:
171668ba7e87SXin LI	Configure 'ntpd' to get time from multiple sources.
171768ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
171868ba7e87SXin LI	    or the NTP Public Services Project Download Page.
171909100258SXin LI	Monitor your 'ntpd' instances.
17204990d495SXin LI   Credit: This weakness was discovered by Matthey Van Gundy and
17214990d495SXin LI	Jonathan Gardner of Cisco ASIG.
172268ba7e87SXin LI
172368ba7e87SXin LI* Stack exhaustion in recursive traversal of restriction list
172468ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016
172568ba7e87SXin LI   References: Sec 2940 / CVE-2015-7978
172668ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
172768ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
172868ba7e87SXin LI   CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM
172968ba7e87SXin LI   Summary: An unauthenticated 'ntpdc reslist' command can cause a
173068ba7e87SXin LI   	segmentation fault in ntpd by exhausting the call stack.
173168ba7e87SXin LI   Mitigation:
173268ba7e87SXin LI	Implement BCP-38.
173368ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
173468ba7e87SXin LI	    or the NTP Public Services Project Download Page.
173568ba7e87SXin LI	If you are unable to upgrade:
173668ba7e87SXin LI            In ntp-4.2.8, mode 7 is disabled by default. Don't enable it.
173768ba7e87SXin LI	    If you must enable mode 7:
173868ba7e87SXin LI		configure the use of a 'requestkey' to control who can
173968ba7e87SXin LI		    issue mode 7 requests.
174068ba7e87SXin LI		configure 'restrict noquery' to further limit mode 7
174168ba7e87SXin LI		    requests to trusted sources.
174268ba7e87SXin LI		Monitor your ntpd instances.
174368ba7e87SXin LI   Credit: This weakness was discovered by Stephen Gray at Cisco ASIG.
174468ba7e87SXin LI
174568ba7e87SXin LI* Off-path Denial of Service (!DoS) attack on authenticated broadcast mode
174668ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
174768ba7e87SXin LI   References: Sec 2942 / CVE-2015-7979
174868ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
174968ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
175068ba7e87SXin LI   CVSS: (AV:N/AC:M/Au:N/C:N/I:P/A:P) Base Score: 5.8
175168ba7e87SXin LI   Summary: An off-path attacker can send broadcast packets with bad
175268ba7e87SXin LI	authentication (wrong key, mismatched key, incorrect MAC, etc)
175368ba7e87SXin LI	to broadcast clients. It is observed that the broadcast client
175468ba7e87SXin LI	tears down the association with the broadcast server upon
175568ba7e87SXin LI	receiving just one bad packet.
175668ba7e87SXin LI   Mitigation:
175768ba7e87SXin LI	Implement BCP-38.
175868ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
175968ba7e87SXin LI	or the NTP Public Services Project Download Page.
176068ba7e87SXin LI	Monitor your 'ntpd' instances.
176168ba7e87SXin LI	If this sort of attack is an active problem for you, you have
176268ba7e87SXin LI	    deeper problems to investigate.  In this case also consider
176368ba7e87SXin LI	    having smaller NTP broadcast domains.
176468ba7e87SXin LI   Credit: This weakness was discovered by Aanchal Malhotra of Boston
176568ba7e87SXin LI   	University.
176668ba7e87SXin LI
176768ba7e87SXin LI* reslist NULL pointer dereference
176868ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
176968ba7e87SXin LI   References: Sec 2939 / CVE-2015-7977
177068ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
177168ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
177268ba7e87SXin LI   CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM
177368ba7e87SXin LI   Summary: An unauthenticated 'ntpdc reslist' command can cause a
177468ba7e87SXin LI	segmentation fault in ntpd by causing a NULL pointer dereference.
177568ba7e87SXin LI   Mitigation:
177668ba7e87SXin LI	Implement BCP-38.
177768ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from NTP Project Download Page or
177868ba7e87SXin LI	the NTP Public Services Project Download Page.
177968ba7e87SXin LI	If you are unable to upgrade:
178068ba7e87SXin LI	    mode 7 is disabled by default.  Don't enable it.
178168ba7e87SXin LI	    If you must enable mode 7:
178268ba7e87SXin LI		configure the use of a 'requestkey' to control who can
178368ba7e87SXin LI		    issue mode 7 requests.
178468ba7e87SXin LI		configure 'restrict noquery' to further limit mode 7
178568ba7e87SXin LI		    requests to trusted sources.
178668ba7e87SXin LI	Monitor your ntpd instances.
178768ba7e87SXin LI   Credit: This weakness was discovered by Stephen Gray of Cisco ASIG.
178868ba7e87SXin LI
178968ba7e87SXin LI* 'ntpq saveconfig' command allows dangerous characters in filenames.
179068ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
179168ba7e87SXin LI   References: Sec 2938 / CVE-2015-7976
179268ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
179368ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
179468ba7e87SXin LI   CVSS: (AV:N/AC:L/Au:S/C:N/I:P/A:N) Base Score: 4.0 - MEDIUM
179568ba7e87SXin LI   Summary: The ntpq saveconfig command does not do adequate filtering
179668ba7e87SXin LI   	of special characters from the supplied filename.
179768ba7e87SXin LI	Note well: The ability to use the saveconfig command is controlled
179868ba7e87SXin LI	by the 'restrict nomodify' directive, and the recommended default
179968ba7e87SXin LI	configuration is to disable this capability.  If the ability to
180068ba7e87SXin LI	execute a 'saveconfig' is required, it can easily (and should) be
180168ba7e87SXin LI	limited and restricted to a known small number of IP addresses.
180268ba7e87SXin LI   Mitigation:
180368ba7e87SXin LI	Implement BCP-38.
180468ba7e87SXin LI	use 'restrict default nomodify' in your 'ntp.conf' file.
180568ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page.
180668ba7e87SXin LI	If you are unable to upgrade:
180768ba7e87SXin LI	    build NTP with 'configure --disable-saveconfig' if you will
180868ba7e87SXin LI	    	never need this capability, or
180968ba7e87SXin LI	    use 'restrict default nomodify' in your 'ntp.conf' file.  Be
181068ba7e87SXin LI		careful about what IPs have the ability to send 'modify'
181168ba7e87SXin LI		requests to 'ntpd'.
181268ba7e87SXin LI	Monitor your ntpd instances.
181368ba7e87SXin LI	'saveconfig' requests are logged to syslog - monitor your syslog files.
181468ba7e87SXin LI   Credit: This weakness was discovered by Jonathan Gardner of Cisco ASIG.
181568ba7e87SXin LI
181668ba7e87SXin LI* nextvar() missing length check in ntpq
181768ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
181868ba7e87SXin LI   References: Sec 2937 / CVE-2015-7975
181968ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
182068ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
182168ba7e87SXin LI   CVSS: (AV:L/AC:H/Au:N/C:N/I:N/A:P) Base Score: 1.2 - LOW
182268ba7e87SXin LI	If you score A:C, this becomes 4.0.
182368ba7e87SXin LI   CVSSv3: (CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L) Base Score 2.9, LOW
182468ba7e87SXin LI   Summary: ntpq may call nextvar() which executes a memcpy() into the
182568ba7e87SXin LI	name buffer without a proper length check against its maximum
182668ba7e87SXin LI	length of 256 bytes. Note well that we're taking about ntpq here.
182768ba7e87SXin LI	The usual worst-case effect of this vulnerability is that the
182868ba7e87SXin LI	specific instance of ntpq will crash and the person or process
182968ba7e87SXin LI	that did this will have stopped themselves.
183068ba7e87SXin LI   Mitigation:
183168ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
183268ba7e87SXin LI	    or the NTP Public Services Project Download Page.
183368ba7e87SXin LI	If you are unable to upgrade:
183468ba7e87SXin LI	    If you have scripts that feed input to ntpq make sure there are
183568ba7e87SXin LI		some sanity checks on the input received from the "outside".
183668ba7e87SXin LI	    This is potentially more dangerous if ntpq is run as root.
183768ba7e87SXin LI   Credit: This weakness was discovered by Jonathan Gardner at Cisco ASIG.
183868ba7e87SXin LI
183968ba7e87SXin LI* Skeleton Key: Any trusted key system can serve time
184068ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
184168ba7e87SXin LI   References: Sec 2936 / CVE-2015-7974
184268ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
184368ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
184468ba7e87SXin LI   CVSS: (AV:N/AC:H/Au:S/C:N/I:C/A:N) Base Score: 4.9
184568ba7e87SXin LI   Summary: Symmetric key encryption uses a shared trusted key. The
184668ba7e87SXin LI	reported title for this issue was "Missing key check allows
184768ba7e87SXin LI	impersonation between authenticated peers" and the report claimed
184868ba7e87SXin LI	"A key specified only for one server should only work to
184968ba7e87SXin LI	authenticate that server, other trusted keys should be refused."
185068ba7e87SXin LI	Except there has never been any correlation between this trusted
185168ba7e87SXin LI	key and server v. clients machines and there has never been any
185268ba7e87SXin LI	way to specify a key only for one server. We have treated this as
185368ba7e87SXin LI	an enhancement request, and ntp-4.2.8p6 includes other checks and
185468ba7e87SXin LI	tests to strengthen clients against attacks coming from broadcast
185568ba7e87SXin LI	servers.
185668ba7e87SXin LI   Mitigation:
185768ba7e87SXin LI	Implement BCP-38.
185868ba7e87SXin LI	If this scenario represents a real or a potential issue for you,
185968ba7e87SXin LI	    upgrade to 4.2.8p6, or later, from the NTP Project Download
186068ba7e87SXin LI	    Page or the NTP Public Services Project Download Page, and
186168ba7e87SXin LI	    use the new field in the ntp.keys file that specifies the list
186268ba7e87SXin LI	    of IPs that are allowed to serve time. Note that this alone
186368ba7e87SXin LI	    will not protect against time packets with forged source IP
186468ba7e87SXin LI	    addresses, however other changes in ntp-4.2.8p6 provide
186568ba7e87SXin LI	    significant mitigation against broadcast attacks. MITM attacks
186668ba7e87SXin LI	    are a different story.
186768ba7e87SXin LI	If you are unable to upgrade:
186868ba7e87SXin LI	    Don't use broadcast mode if you cannot monitor your client
186968ba7e87SXin LI	    	servers.
187068ba7e87SXin LI	    If you choose to use symmetric keys to authenticate time
187168ba7e87SXin LI	    	packets in a hostile environment where ephemeral time
187268ba7e87SXin LI		servers can be created, or if it is expected that malicious
187368ba7e87SXin LI		time servers will participate in an NTP broadcast domain,
187468ba7e87SXin LI		limit the number of participating systems that participate
187568ba7e87SXin LI		in the shared-key group.
187668ba7e87SXin LI	Monitor your ntpd instances.
187768ba7e87SXin LI   Credit: This weakness was discovered by Matt Street of Cisco ASIG.
187868ba7e87SXin LI
187968ba7e87SXin LI* Deja Vu: Replay attack on authenticated broadcast mode
188068ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
188168ba7e87SXin LI   References: Sec 2935 / CVE-2015-7973
188268ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
188368ba7e87SXin LI   	4.3.0 up to, but not including 4.3.90
188468ba7e87SXin LI   CVSS: (AV:A/AC:M/Au:N/C:N/I:P/A:P) Base Score: 4.3 - MEDIUM
188568ba7e87SXin LI   Summary: If an NTP network is configured for broadcast operations then
188668ba7e87SXin LI   	either a man-in-the-middle attacker or a malicious participant
188768ba7e87SXin LI	that has the same trusted keys as the victim can replay time packets.
188868ba7e87SXin LI   Mitigation:
188968ba7e87SXin LI	Implement BCP-38.
189068ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
189168ba7e87SXin LI	    or the NTP Public Services Project Download Page.
189268ba7e87SXin LI	If you are unable to upgrade:
189368ba7e87SXin LI	    Don't use broadcast mode if you cannot monitor your client servers.
189468ba7e87SXin LI	Monitor your ntpd instances.
189568ba7e87SXin LI   Credit: This weakness was discovered by Aanchal Malhotra of Boston
189668ba7e87SXin LI	University.
189768ba7e87SXin LI
189868ba7e87SXin LIOther fixes:
189968ba7e87SXin LI
190068ba7e87SXin LI* [Bug 2772] adj_systime overflows tv_usec. perlinger@ntp.org
190168ba7e87SXin LI* [Bug 2814] msyslog deadlock when signaled. perlinger@ntp.org
190268ba7e87SXin LI  - applied patch by shenpeng11@huawei.com with minor adjustments
190368ba7e87SXin LI* [Bug 2882] Look at ntp_request.c:list_peers_sum(). perlinger@ntp.org
190468ba7e87SXin LI* [Bug 2891] Deadlock in deferred DNS lookup framework. perlinger@ntp.org
190568ba7e87SXin LI* [Bug 2892] Several test cases assume IPv6 capabilities even when
190668ba7e87SXin LI             IPv6 is disabled in the build. perlinger@ntp.org
190768ba7e87SXin LI  - Found this already fixed, but validation led to cleanup actions.
190868ba7e87SXin LI* [Bug 2905] DNS lookups broken. perlinger@ntp.org
190968ba7e87SXin LI  - added limits to stack consumption, fixed some return code handling
191068ba7e87SXin LI* [Bug 2971] ntpq bails on ^C: select fails: Interrupted system call
191168ba7e87SXin LI  - changed stacked/nested handling of CTRL-C. perlinger@ntp.org
191268ba7e87SXin LI  - make CTRL-C work for retrieval and printing od MRU list. perlinger@ntp.org
191368ba7e87SXin LI* [Bug 2980] reduce number of warnings. perlinger@ntp.org
191468ba7e87SXin LI  - integrated several patches from Havard Eidnes (he@uninett.no)
191568ba7e87SXin LI* [Bug 2985] bogus calculation in authkeys.c perlinger@ntp.org
191668ba7e87SXin LI  - implement 'auth_log2()' using integer bithack instead of float calculation
191768ba7e87SXin LI* Make leapsec_query debug messages less verbose.  Harlan Stenn.
191868ba7e87SXin LI
191968ba7e87SXin LI---
19204990d495SXin LINTP 4.2.8p5 (Harlan Stenn <stenn@ntp.org>, 2016/01/07)
19213311ff84SXin LI
19223311ff84SXin LIFocus: Security, Bug fixes, enhancements.
19233311ff84SXin LI
19243311ff84SXin LISeverity: MEDIUM
19253311ff84SXin LI
19263311ff84SXin LIIn addition to bug fixes and enhancements, this release fixes the
19273311ff84SXin LIfollowing medium-severity vulnerability:
19283311ff84SXin LI
19293311ff84SXin LI* Small-step/big-step.  Close the panic gate earlier.
19303311ff84SXin LI    References: Sec 2956, CVE-2015-5300
19313311ff84SXin LI    Affects: All ntp-4 releases up to, but not including 4.2.8p5, and
19323311ff84SXin LI	4.3.0 up to, but not including 4.3.78
19333311ff84SXin LI    CVSS3: (AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:N/A:L) Base Score: 4.0, MEDIUM
19343311ff84SXin LI    Summary: If ntpd is always started with the -g option, which is
19353311ff84SXin LI	common and against long-standing recommendation, and if at the
19363311ff84SXin LI	moment ntpd is restarted an attacker can immediately respond to
19373311ff84SXin LI	enough requests from enough sources trusted by the target, which
19383311ff84SXin LI	is difficult and not common, there is a window of opportunity
19393311ff84SXin LI	where the attacker can cause ntpd to set the time to an
19403311ff84SXin LI	arbitrary value. Similarly, if an attacker is able to respond
19413311ff84SXin LI	to enough requests from enough sources trusted by the target,
19423311ff84SXin LI	the attacker can cause ntpd to abort and restart, at which
19433311ff84SXin LI	point it can tell the target to set the time to an arbitrary
19443311ff84SXin LI	value if and only if ntpd was re-started against long-standing
19453311ff84SXin LI	recommendation with the -g flag, or if ntpd was not given the
19463311ff84SXin LI	-g flag, the attacker can move the target system's time by at
19473311ff84SXin LI	most 900 seconds' time per attack.
19483311ff84SXin LI    Mitigation:
19493311ff84SXin LI	Configure ntpd to get time from multiple sources.
19503311ff84SXin LI	Upgrade to 4.2.8p5, or later, from the NTP Project Download
19513311ff84SXin LI	    Page or the NTP Public Services Project Download Page
19523311ff84SXin LI	As we've long documented, only use the -g option to ntpd in
19533311ff84SXin LI	    cold-start situations.
19543311ff84SXin LI	Monitor your ntpd instances.
19553311ff84SXin LI    Credit: This weakness was discovered by Aanchal Malhotra,
19563311ff84SXin LI	Isaac E. Cohen, and Sharon Goldberg at Boston University.
19573311ff84SXin LI
19583311ff84SXin LI    NOTE WELL: The -g flag disables the limit check on the panic_gate
19593311ff84SXin LI	in ntpd, which is 900 seconds by default. The bug identified by
19603311ff84SXin LI	the researchers at Boston University is that the panic_gate
19613311ff84SXin LI	check was only re-enabled after the first change to the system
19623311ff84SXin LI	clock that was greater than 128 milliseconds, by default. The
19633311ff84SXin LI	correct behavior is that the panic_gate check should be
19643311ff84SXin LI	re-enabled after any initial time correction.
19653311ff84SXin LI
19663311ff84SXin LI	If an attacker is able to inject consistent but erroneous time
19673311ff84SXin LI	responses to your systems via the network or "over the air",
19683311ff84SXin LI	perhaps by spoofing radio, cellphone, or navigation satellite
19693311ff84SXin LI	transmissions, they are in a great position to affect your
19703311ff84SXin LI	system's clock. There comes a point where your very best
19713311ff84SXin LI	defenses include:
19723311ff84SXin LI
19733311ff84SXin LI	    Configure ntpd to get time from multiple sources.
19743311ff84SXin LI	    Monitor your ntpd instances.
19753311ff84SXin LI
19763311ff84SXin LIOther fixes:
19773311ff84SXin LI
19783311ff84SXin LI* Coverity submission process updated from Coverity 5 to Coverity 7.
19793311ff84SXin LI  The NTP codebase has been undergoing regular Coverity scans on an
19803311ff84SXin LI  ongoing basis since 2006.  As part of our recent upgrade from
19813311ff84SXin LI  Coverity 5 to Coverity 7, Coverity identified 16 nits in some of
19823311ff84SXin LI  the newly-written Unity test programs.  These were fixed.
19833311ff84SXin LI* [Bug 2829] Clean up pipe_fds in ntpd.c  perlinger@ntp.org
19843311ff84SXin LI* [Bug 2887] stratum -1 config results as showing value 99
19853311ff84SXin LI  - fudge stratum should only accept values [0..16]. perlinger@ntp.org
19863311ff84SXin LI* [Bug 2932] Update leapsecond file info in miscopt.html.  CWoodbury, HStenn.
19873311ff84SXin LI* [Bug 2934] tests/ntpd/t-ntp_scanner.c has a magic constant wired in.  HMurray
19883311ff84SXin LI* [Bug 2944] errno is not preserved properly in ntpdate after sendto call.
19893311ff84SXin LI  - applied patch by Christos Zoulas.  perlinger@ntp.org
19903311ff84SXin LI* [Bug 2952] Peer associations broken by fix for Bug 2901/CVE-2015-7704.
19913311ff84SXin LI* [Bug 2954] Version 4.2.8p4 crashes on startup on some OSes.
19923311ff84SXin LI  - fixed data race conditions in threaded DNS worker. perlinger@ntp.org
19933311ff84SXin LI  - limit threading warm-up to linux; FreeBSD bombs on it. perlinger@ntp.org
19943311ff84SXin LI* [Bug 2957] 'unsigned int' vs 'size_t' format clash. perlinger@ntp.org
19953311ff84SXin LI  - accept key file only if there are no parsing errors
19963311ff84SXin LI  - fixed size_t/u_int format clash
19973311ff84SXin LI  - fixed wrong use of 'strlcpy'
19983311ff84SXin LI* [Bug 2958] ntpq: fatal error messages need a final newline. Craig Leres.
19993311ff84SXin LI* [Bug 2962] truncation of size_t/ptrdiff_t on 64bit targets. perlinger@ntp.org
20003311ff84SXin LI  - fixed several other warnings (cast-alignment, missing const, missing prototypes)
20013311ff84SXin LI  - promote use of 'size_t' for values that express a size
20023311ff84SXin LI  - use ptr-to-const for read-only arguments
20033311ff84SXin LI  - make sure SOCKET values are not truncated (win32-specific)
20043311ff84SXin LI  - format string fixes
20053311ff84SXin LI* [Bug 2965] Local clock didn't work since 4.2.8p4.  Martin Burnicki.
20063311ff84SXin LI* [Bug 2967] ntpdate command suffers an assertion failure
20073311ff84SXin LI  - fixed ntp_rfc2553.c to return proper address length. perlinger@ntp.org
20083311ff84SXin LI* [Bug 2969]  Seg fault from ntpq/mrulist when looking at server with
20093311ff84SXin LI              lots of clients. perlinger@ntp.org
20103311ff84SXin LI* [Bug 2971] ntpq bails on ^C: select fails: Interrupted system call
20113311ff84SXin LI  - changed stacked/nested handling of CTRL-C. perlinger@ntp.org
20123311ff84SXin LI* Unity cleanup for FreeBSD-6.4.  Harlan Stenn.
20133311ff84SXin LI* Unity test cleanup.  Harlan Stenn.
20143311ff84SXin LI* Libevent autoconf pthread fixes for FreeBSD-10.  Harlan Stenn.
20153311ff84SXin LI* Header cleanup in tests/sandbox/uglydate.c.  Harlan Stenn.
20163311ff84SXin LI* Header cleanup in tests/libntp/sfptostr.c.  Harlan Stenn.
20173311ff84SXin LI* Quiet a warning from clang.  Harlan Stenn.
20183311ff84SXin LI
20193311ff84SXin LI---
20204990d495SXin LINTP 4.2.8p4 (Harlan Stenn <stenn@ntp.org>, 2015/10/21)
20219034852cSGleb Smirnoff
20223311ff84SXin LIFocus: Security, Bug fixes, enhancements.
20239034852cSGleb Smirnoff
20249034852cSGleb SmirnoffSeverity: MEDIUM
20259034852cSGleb Smirnoff
20269034852cSGleb SmirnoffIn addition to bug fixes and enhancements, this release fixes the
20279034852cSGleb Smirnofffollowing 13 low- and medium-severity vulnerabilities:
20289034852cSGleb Smirnoff
20299034852cSGleb Smirnoff* Incomplete vallen (value length) checks in ntp_crypto.c, leading
20309034852cSGleb Smirnoff  to potential crashes or potential code injection/information leakage.
20319034852cSGleb Smirnoff
20329034852cSGleb Smirnoff    References: Sec 2899, Sec 2671, CVE-2015-7691, CVE-2015-7692, CVE-2015-7702
20339034852cSGleb Smirnoff    Affects: All ntp-4 releases up to, but not including 4.2.8p4,
20349034852cSGleb Smirnoff    	and 4.3.0 up to, but not including 4.3.77
20359034852cSGleb Smirnoff    CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6
20369034852cSGleb Smirnoff    Summary: The fix for CVE-2014-9750 was incomplete in that there were
20379034852cSGleb Smirnoff    	certain code paths where a packet with particular autokey operations
20389034852cSGleb Smirnoff	that contained malicious data was not always being completely
20399034852cSGleb Smirnoff	validated. Receipt of these packets can cause ntpd to crash.
20409034852cSGleb Smirnoff    Mitigation:
20419034852cSGleb Smirnoff        Don't use autokey.
20429034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
20439034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page
20449034852cSGleb Smirnoff	Monitor your ntpd instances.
20459034852cSGleb Smirnoff	Credit: This weakness was discovered by Tenable Network Security.
20469034852cSGleb Smirnoff
20479034852cSGleb Smirnoff* Clients that receive a KoD should validate the origin timestamp field.
20489034852cSGleb Smirnoff
20499034852cSGleb Smirnoff    References: Sec 2901 / CVE-2015-7704, CVE-2015-7705
20509034852cSGleb Smirnoff    Affects: All ntp-4 releases up to, but not including 4.2.8p4,
20519034852cSGleb Smirnoff	and 4.3.0 up to, but not including 4.3.77
20529034852cSGleb Smirnoff    CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3-5.0 at worst
20539034852cSGleb Smirnoff    Summary: An ntpd client that honors Kiss-of-Death responses will honor
20549034852cSGleb Smirnoff    	KoD messages that have been forged by an attacker, causing it to
20559034852cSGleb Smirnoff	delay or stop querying its servers for time updates. Also, an
20569034852cSGleb Smirnoff	attacker can forge packets that claim to be from the target and
20579034852cSGleb Smirnoff	send them to servers often enough that a server that implements
20589034852cSGleb Smirnoff	KoD rate limiting will send the target machine a KoD response to
20599034852cSGleb Smirnoff	attempt to reduce the rate of incoming packets, or it may also
20609034852cSGleb Smirnoff	trigger a firewall block at the server for packets from the target
20619034852cSGleb Smirnoff	machine. For either of these attacks to succeed, the attacker must
20629034852cSGleb Smirnoff	know what servers the target is communicating with. An attacker
20639034852cSGleb Smirnoff	can be anywhere on the Internet and can frequently learn the
20649034852cSGleb Smirnoff	identity of the target's time source by sending the target a
20659034852cSGleb Smirnoff	time query.
20669034852cSGleb Smirnoff    Mitigation:
20679034852cSGleb Smirnoff        Implement BCP-38.
20689034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download Page
20699034852cSGleb Smirnoff	    or the NTP Public Services Project Download Page
20709034852cSGleb Smirnoff	If you can't upgrade, restrict who can query ntpd to learn who
20719034852cSGleb Smirnoff	    its servers are, and what IPs are allowed to ask your system
20729034852cSGleb Smirnoff	    for the time. This mitigation is heavy-handed.
20739034852cSGleb Smirnoff	Monitor your ntpd instances.
20749034852cSGleb Smirnoff    Note:
20759034852cSGleb Smirnoff    	4.2.8p4 protects against the first attack. For the second attack,
20769034852cSGleb Smirnoff    	all we can do is warn when it is happening, which we do in 4.2.8p4.
20779034852cSGleb Smirnoff    Credit: This weakness was discovered by Aanchal Malhotra,
20789034852cSGleb Smirnoff    	Issac E. Cohen, and Sharon Goldberg of Boston University.
20799034852cSGleb Smirnoff
20809034852cSGleb Smirnoff* configuration directives to change "pidfile" and "driftfile" should
20819034852cSGleb Smirnoff  only be allowed locally.
20829034852cSGleb Smirnoff
20839034852cSGleb Smirnoff  References: Sec 2902 / CVE-2015-5196
20849034852cSGleb Smirnoff  Affects: All ntp-4 releases up to, but not including 4.2.8p4,
20859034852cSGleb Smirnoff	and 4.3.0 up to, but not including 4.3.77
20869034852cSGleb Smirnoff   CVSS: (AV:N/AC:H/Au:M/C:N/I:C/A:C) Base Score: 6.2 worst case
20879034852cSGleb Smirnoff   Summary: If ntpd is configured to allow for remote configuration,
20889034852cSGleb Smirnoff	and if the (possibly spoofed) source IP address is allowed to
20899034852cSGleb Smirnoff	send remote configuration requests, and if the attacker knows
20909034852cSGleb Smirnoff	the remote configuration password, it's possible for an attacker
20919034852cSGleb Smirnoff	to use the "pidfile" or "driftfile" directives to potentially
20929034852cSGleb Smirnoff	overwrite other files.
20939034852cSGleb Smirnoff   Mitigation:
20949034852cSGleb Smirnoff	Implement BCP-38.
20959034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
20969034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page
20979034852cSGleb Smirnoff	If you cannot upgrade, don't enable remote configuration.
20989034852cSGleb Smirnoff	If you must enable remote configuration and cannot upgrade,
20999034852cSGleb Smirnoff	    remote configuration of NTF's ntpd requires:
21009034852cSGleb Smirnoff	    - an explicitly configured trustedkey, and you should also
21019034852cSGleb Smirnoff	    	configure a controlkey.
21029034852cSGleb Smirnoff	    - access from a permitted IP. You choose the IPs.
21039034852cSGleb Smirnoff	    - authentication. Don't disable it. Practice secure key safety.
21049034852cSGleb Smirnoff	Monitor your ntpd instances.
21059034852cSGleb Smirnoff   Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
21069034852cSGleb Smirnoff
21079034852cSGleb Smirnoff* Slow memory leak in CRYPTO_ASSOC
21089034852cSGleb Smirnoff
21099034852cSGleb Smirnoff  References: Sec 2909 / CVE-2015-7701
21109034852cSGleb Smirnoff  Affects: All ntp-4 releases that use autokey up to, but not
21119034852cSGleb Smirnoff    including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
21129034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 0.0 best/usual case,
21139034852cSGleb Smirnoff  	4.6 otherwise
21149034852cSGleb Smirnoff  Summary: If ntpd is configured to use autokey, then an attacker can
21159034852cSGleb Smirnoff	send packets to ntpd that will, after several days of ongoing
21169034852cSGleb Smirnoff	attack, cause it to run out of memory.
21179034852cSGleb Smirnoff  Mitigation:
21189034852cSGleb Smirnoff	Don't use autokey.
21199034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
21209034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page
21219034852cSGleb Smirnoff	Monitor your ntpd instances.
21229034852cSGleb Smirnoff  Credit: This weakness was discovered by Tenable Network Security.
21239034852cSGleb Smirnoff
21249034852cSGleb Smirnoff* mode 7 loop counter underrun
21259034852cSGleb Smirnoff
21269034852cSGleb Smirnoff  References:  Sec 2913 / CVE-2015-7848 / TALOS-CAN-0052
21279034852cSGleb Smirnoff  Affects: All ntp-4 releases up to, but not including 4.2.8p4,
21289034852cSGleb Smirnoff  	and 4.3.0 up to, but not including 4.3.77
21299034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6
21309034852cSGleb Smirnoff  Summary: If ntpd is configured to enable mode 7 packets, and if the
21319034852cSGleb Smirnoff	use of mode 7 packets is not properly protected thru the use of
21329034852cSGleb Smirnoff	the available mode 7 authentication and restriction mechanisms,
21339034852cSGleb Smirnoff	and if the (possibly spoofed) source IP address is allowed to
21349034852cSGleb Smirnoff	send mode 7 queries, then an attacker can send a crafted packet
21359034852cSGleb Smirnoff	to ntpd that will cause it to crash.
21369034852cSGleb Smirnoff  Mitigation:
21379034852cSGleb Smirnoff	Implement BCP-38.
21389034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
21399034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
21409034852cSGleb Smirnoff	      If you are unable to upgrade:
21419034852cSGleb Smirnoff	In ntp-4.2.8, mode 7 is disabled by default. Don't enable it.
21429034852cSGleb Smirnoff	If you must enable mode 7:
21439034852cSGleb Smirnoff	    configure the use of a requestkey to control who can issue
21449034852cSGleb Smirnoff		mode 7 requests.
21459034852cSGleb Smirnoff	    configure restrict noquery to further limit mode 7 requests
21469034852cSGleb Smirnoff		to trusted sources.
21479034852cSGleb Smirnoff	Monitor your ntpd instances.
21489034852cSGleb SmirnoffCredit: This weakness was discovered by Aleksandar Nikolic of Cisco Talos.
21499034852cSGleb Smirnoff
21509034852cSGleb Smirnoff* memory corruption in password store
21519034852cSGleb Smirnoff
21529034852cSGleb Smirnoff  References: Sec 2916 / CVE-2015-7849 / TALOS-CAN-0054
21539034852cSGleb Smirnoff  Affects: All ntp-4 releases up to, but not including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
21549034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:N/I:C/A:C) Base Score: 6.8, worst case
21559034852cSGleb Smirnoff  Summary: If ntpd is configured to allow remote configuration, and if
21569034852cSGleb Smirnoff	the (possibly spoofed) source IP address is allowed to send
21579034852cSGleb Smirnoff	remote configuration requests, and if the attacker knows the
21589034852cSGleb Smirnoff	remote configuration password or if ntpd was configured to
21599034852cSGleb Smirnoff	disable authentication, then an attacker can send a set of
21609034852cSGleb Smirnoff	packets to ntpd that may cause a crash or theoretically
21619034852cSGleb Smirnoff	perform a code injection attack.
21629034852cSGleb Smirnoff  Mitigation:
21639034852cSGleb Smirnoff	Implement BCP-38.
21649034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
21659034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
21669034852cSGleb Smirnoff	If you are unable to upgrade, remote configuration of NTF's
21679034852cSGleb Smirnoff	    ntpd requires:
21689034852cSGleb Smirnoff		an explicitly configured "trusted" key. Only configure
21699034852cSGleb Smirnoff			this if you need it.
21709034852cSGleb Smirnoff		access from a permitted IP address. You choose the IPs.
21719034852cSGleb Smirnoff		authentication. Don't disable it. Practice secure key safety.
21729034852cSGleb Smirnoff	Monitor your ntpd instances.
21739034852cSGleb Smirnoff  Credit: This weakness was discovered by Yves Younan of Cisco Talos.
21749034852cSGleb Smirnoff
21759034852cSGleb Smirnoff* Infinite loop if extended logging enabled and the logfile and
21769034852cSGleb Smirnoff  keyfile are the same.
21779034852cSGleb Smirnoff
21789034852cSGleb Smirnoff    References: Sec 2917 / CVE-2015-7850 / TALOS-CAN-0055
21799034852cSGleb Smirnoff    Affects: All ntp-4 releases up to, but not including 4.2.8p4,
21809034852cSGleb Smirnoff	and 4.3.0 up to, but not including 4.3.77
21819034852cSGleb Smirnoff    CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6, worst case
21829034852cSGleb Smirnoff    Summary: If ntpd is configured to allow remote configuration, and if
21839034852cSGleb Smirnoff	the (possibly spoofed) source IP address is allowed to send
21849034852cSGleb Smirnoff	remote configuration requests, and if the attacker knows the
21859034852cSGleb Smirnoff	remote configuration password or if ntpd was configured to
21869034852cSGleb Smirnoff	disable authentication, then an attacker can send a set of
21879034852cSGleb Smirnoff	packets to ntpd that will cause it to crash and/or create a
21889034852cSGleb Smirnoff	potentially huge log file. Specifically, the attacker could
21899034852cSGleb Smirnoff	enable extended logging, point the key file at the log file,
21909034852cSGleb Smirnoff	and cause what amounts to an infinite loop.
21919034852cSGleb Smirnoff    Mitigation:
21929034852cSGleb Smirnoff	Implement BCP-38.
21939034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
21949034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
21959034852cSGleb Smirnoff	If you are unable to upgrade, remote configuration of NTF's ntpd
21969034852cSGleb Smirnoff	  requires:
21979034852cSGleb Smirnoff            an explicitly configured "trusted" key. Only configure this
21989034852cSGleb Smirnoff	    	if you need it.
21999034852cSGleb Smirnoff            access from a permitted IP address. You choose the IPs.
22009034852cSGleb Smirnoff            authentication. Don't disable it. Practice secure key safety.
22019034852cSGleb Smirnoff        Monitor your ntpd instances.
22029034852cSGleb Smirnoff    Credit: This weakness was discovered by Yves Younan of Cisco Talos.
22039034852cSGleb Smirnoff
22049034852cSGleb Smirnoff* Potential path traversal vulnerability in the config file saving of
22059034852cSGleb Smirnoff  ntpd on VMS.
22069034852cSGleb Smirnoff
22079034852cSGleb Smirnoff  References: Sec 2918 / CVE-2015-7851 / TALOS-CAN-0062
22089034852cSGleb Smirnoff  Affects: All ntp-4 releases running under VMS up to, but not
22099034852cSGleb Smirnoff	including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
22109034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:N/I:P/A:C) Base Score: 5.2, worst case
22119034852cSGleb Smirnoff  Summary: If ntpd is configured to allow remote configuration, and if
22129034852cSGleb Smirnoff	the (possibly spoofed) IP address is allowed to send remote
22139034852cSGleb Smirnoff	configuration requests, and if the attacker knows the remote
22149034852cSGleb Smirnoff	configuration password or if ntpd was configured to disable
22159034852cSGleb Smirnoff	authentication, then an attacker can send a set of packets to
22169034852cSGleb Smirnoff	ntpd that may cause ntpd to overwrite files.
22179034852cSGleb Smirnoff  Mitigation:
22189034852cSGleb Smirnoff	Implement BCP-38.
22199034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
22209034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
22219034852cSGleb Smirnoff	If you are unable to upgrade, remote configuration of NTF's ntpd
22229034852cSGleb Smirnoff	    requires:
22239034852cSGleb Smirnoff		an explicitly configured "trusted" key. Only configure
22249034852cSGleb Smirnoff			this if you need it.
22259034852cSGleb Smirnoff		access from permitted IP addresses. You choose the IPs.
22269034852cSGleb Smirnoff		authentication. Don't disable it. Practice key security safety.
22279034852cSGleb Smirnoff        Monitor your ntpd instances.
22289034852cSGleb Smirnoff    Credit: This weakness was discovered by Yves Younan of Cisco Talos.
22299034852cSGleb Smirnoff
22309034852cSGleb Smirnoff* ntpq atoascii() potential memory corruption
22319034852cSGleb Smirnoff
22329034852cSGleb Smirnoff  References: Sec 2919 / CVE-2015-7852 / TALOS-CAN-0063
22339034852cSGleb Smirnoff  Affects: All ntp-4 releases running up to, but not including 4.2.8p4,
22349034852cSGleb Smirnoff	and 4.3.0 up to, but not including 4.3.77
22359034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:N/C:N/I:P/A:P) Base Score: 4.0, worst case
22369034852cSGleb Smirnoff  Summary: If an attacker can figure out the precise moment that ntpq
22379034852cSGleb Smirnoff	is listening for data and the port number it is listening on or
22389034852cSGleb Smirnoff	if the attacker can provide a malicious instance ntpd that
22399034852cSGleb Smirnoff	victims will connect to then an attacker can send a set of
22409034852cSGleb Smirnoff	crafted mode 6 response packets that, if received by ntpq,
22419034852cSGleb Smirnoff	can cause ntpq to crash.
22429034852cSGleb Smirnoff  Mitigation:
22439034852cSGleb Smirnoff	Implement BCP-38.
22449034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
22459034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
22469034852cSGleb Smirnoff	If you are unable to upgrade and you run ntpq against a server
22479034852cSGleb Smirnoff	    and ntpq crashes, try again using raw mode. Build or get a
22489034852cSGleb Smirnoff	    patched ntpq and see if that fixes the problem. Report new
22499034852cSGleb Smirnoff	    bugs in ntpq or abusive servers appropriately.
22509034852cSGleb Smirnoff	If you use ntpq in scripts, make sure ntpq does what you expect
22519034852cSGleb Smirnoff	    in your scripts.
22529034852cSGleb Smirnoff  Credit: This weakness was discovered by Yves Younan and
22539034852cSGleb Smirnoff  	Aleksander Nikolich of Cisco Talos.
22549034852cSGleb Smirnoff
22559034852cSGleb Smirnoff* Invalid length data provided by a custom refclock driver could cause
22569034852cSGleb Smirnoff  a buffer overflow.
22579034852cSGleb Smirnoff
22589034852cSGleb Smirnoff  References: Sec 2920 / CVE-2015-7853 / TALOS-CAN-0064
22599034852cSGleb Smirnoff  Affects: Potentially all ntp-4 releases running up to, but not
22609034852cSGleb Smirnoff	including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
22619034852cSGleb Smirnoff	that have custom refclocks
22629034852cSGleb Smirnoff  CVSS: (AV:L/AC:H/Au:M/C:C/I:C/A:C) Base Score: 0.0 usual case,
22639034852cSGleb Smirnoff	5.9 unusual worst case
22649034852cSGleb Smirnoff  Summary: A negative value for the datalen parameter will overflow a
22659034852cSGleb Smirnoff	data buffer. NTF's ntpd driver implementations always set this
22669034852cSGleb Smirnoff	value to 0 and are therefore not vulnerable to this weakness.
22679034852cSGleb Smirnoff	If you are running a custom refclock driver in ntpd and that
22689034852cSGleb Smirnoff	driver supplies a negative value for datalen (no custom driver
22699034852cSGleb Smirnoff	of even minimal competence would do this) then ntpd would
22709034852cSGleb Smirnoff	overflow a data buffer. It is even hypothetically possible
22719034852cSGleb Smirnoff	in this case that instead of simply crashing ntpd the attacker
22729034852cSGleb Smirnoff	could effect a code injection attack.
22739034852cSGleb Smirnoff  Mitigation:
22749034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
22759034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
22769034852cSGleb Smirnoff	If you are unable to upgrade:
22779034852cSGleb Smirnoff		If you are running custom refclock drivers, make sure
22789034852cSGleb Smirnoff			the signed datalen value is either zero or positive.
22799034852cSGleb Smirnoff	Monitor your ntpd instances.
22809034852cSGleb Smirnoff  Credit: This weakness was discovered by Yves Younan of Cisco Talos.
22819034852cSGleb Smirnoff
22829034852cSGleb Smirnoff* Password Length Memory Corruption Vulnerability
22839034852cSGleb Smirnoff
22849034852cSGleb Smirnoff  References: Sec 2921 / CVE-2015-7854 / TALOS-CAN-0065
22859034852cSGleb Smirnoff  Affects: All ntp-4 releases up to, but not including 4.2.8p4, and
22869034852cSGleb Smirnoff  	4.3.0 up to, but not including 4.3.77
22879034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:C/I:C/A:C) Base Score: 0.0 best case,
22889034852cSGleb Smirnoff  	1.7 usual case, 6.8, worst case
22899034852cSGleb Smirnoff  Summary: If ntpd is configured to allow remote configuration, and if
22909034852cSGleb Smirnoff	the (possibly spoofed) source IP address is allowed to send
22919034852cSGleb Smirnoff	remote configuration requests, and if the attacker knows the
22929034852cSGleb Smirnoff	remote configuration password or if ntpd was (foolishly)
22939034852cSGleb Smirnoff	configured to disable authentication, then an attacker can
22949034852cSGleb Smirnoff	send a set of packets to ntpd that may cause it to crash,
22959034852cSGleb Smirnoff	with the hypothetical possibility of a small code injection.
22969034852cSGleb Smirnoff  Mitigation:
22979034852cSGleb Smirnoff	Implement BCP-38.
22989034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
22999034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
23009034852cSGleb Smirnoff	If you are unable to upgrade, remote configuration of NTF's
23019034852cSGleb Smirnoff	    ntpd requires:
23029034852cSGleb Smirnoff		an explicitly configured "trusted" key. Only configure
23039034852cSGleb Smirnoff			this if you need it.
23049034852cSGleb Smirnoff		access from a permitted IP address. You choose the IPs.
23059034852cSGleb Smirnoff		authentication. Don't disable it. Practice secure key safety.
23069034852cSGleb Smirnoff	Monitor your ntpd instances.
23079034852cSGleb Smirnoff  Credit: This weakness was discovered by Yves Younan and
23089034852cSGleb Smirnoff  	Aleksander Nikolich of Cisco Talos.
23099034852cSGleb Smirnoff
23109034852cSGleb Smirnoff* decodenetnum() will ASSERT botch instead of returning FAIL on some
23119034852cSGleb Smirnoff  bogus values.
23129034852cSGleb Smirnoff
23139034852cSGleb Smirnoff  References: Sec 2922 / CVE-2015-7855
23149034852cSGleb Smirnoff  Affects: All ntp-4 releases up to, but not including 4.2.8p4, and
23159034852cSGleb Smirnoff	4.3.0 up to, but not including 4.3.77
23169034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6, worst case
23179034852cSGleb Smirnoff  Summary: If ntpd is fed a crafted mode 6 or mode 7 packet containing
23189034852cSGleb Smirnoff	an unusually long data value where a network address is expected,
23199034852cSGleb Smirnoff	the decodenetnum() function will abort with an assertion failure
23209034852cSGleb Smirnoff	instead of simply returning a failure condition.
23219034852cSGleb Smirnoff  Mitigation:
23229034852cSGleb Smirnoff	Implement BCP-38.
23239034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
23249034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
23259034852cSGleb Smirnoff	If you are unable to upgrade:
23269034852cSGleb Smirnoff		mode 7 is disabled by default. Don't enable it.
23279034852cSGleb Smirnoff		Use restrict noquery to limit who can send mode 6
23289034852cSGleb Smirnoff			and mode 7 requests.
23299034852cSGleb Smirnoff		Configure and use the controlkey and requestkey
23309034852cSGleb Smirnoff			authentication directives to limit who can
23319034852cSGleb Smirnoff			send mode 6 and mode 7 requests.
23329034852cSGleb Smirnoff	Monitor your ntpd instances.
23339034852cSGleb Smirnoff  Credit: This weakness was discovered by John D "Doug" Birdwell of IDA.org.
23349034852cSGleb Smirnoff
23359034852cSGleb Smirnoff* NAK to the Future: Symmetric association authentication bypass via
23369034852cSGleb Smirnoff  crypto-NAK.
23379034852cSGleb Smirnoff
23389034852cSGleb Smirnoff  References: Sec 2941 / CVE-2015-7871
23399034852cSGleb Smirnoff  Affects: All ntp-4 releases between 4.2.5p186 up to but not including
23409034852cSGleb Smirnoff  	4.2.8p4, and 4.3.0 up to but not including 4.3.77
23419034852cSGleb Smirnoff  CVSS: (AV:N/AC:L/Au:N/C:N/I:P/A:P) Base Score: 6.4
23429034852cSGleb Smirnoff  Summary: Crypto-NAK packets can be used to cause ntpd to accept time
23439034852cSGleb Smirnoff	from unauthenticated ephemeral symmetric peers by bypassing the
23449034852cSGleb Smirnoff	authentication required to mobilize peer associations. This
23459034852cSGleb Smirnoff	vulnerability appears to have been introduced in ntp-4.2.5p186
23469034852cSGleb Smirnoff	when the code handling mobilization of new passive symmetric
23479034852cSGleb Smirnoff	associations (lines 1103-1165) was refactored.
23489034852cSGleb Smirnoff  Mitigation:
23499034852cSGleb Smirnoff	Implement BCP-38.
23509034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
23519034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
23529034852cSGleb Smirnoff	If you are unable to upgrade:
23539034852cSGleb Smirnoff		Apply the patch to the bottom of the "authentic" check
23549034852cSGleb Smirnoff			block around line 1136 of ntp_proto.c.
23559034852cSGleb Smirnoff	Monitor your ntpd instances.
23564990d495SXin LI  Credit: This weakness was discovered by Matthew Van Gundy of Cisco ASIG.
23579034852cSGleb Smirnoff
23589034852cSGleb SmirnoffBackward-Incompatible changes:
23599034852cSGleb Smirnoff* [Bug 2817] Default on Linux is now "rlimit memlock -1".
23609034852cSGleb Smirnoff  While the general default of 32M is still the case, under Linux
23619034852cSGleb Smirnoff  the default value has been changed to -1 (do not lock ntpd into
23629034852cSGleb Smirnoff  memory).  A value of 0 means "lock ntpd into memory with whatever
23639034852cSGleb Smirnoff  memory it needs." If your ntp.conf file has an explicit "rlimit memlock"
23649034852cSGleb Smirnoff  value in it, that value will continue to be used.
23659034852cSGleb Smirnoff
23669034852cSGleb Smirnoff* [Bug 2886] Misspelling: "outlyer" should be "outlier".
23679034852cSGleb Smirnoff  If you've written a script that looks for this case in, say, the
23689034852cSGleb Smirnoff  output of ntpq, you probably want to change your regex matches
23699034852cSGleb Smirnoff  from 'outlyer' to 'outl[iy]er'.
23709034852cSGleb Smirnoff
23719034852cSGleb SmirnoffNew features in this release:
23729034852cSGleb Smirnoff* 'rlimit memlock' now has finer-grained control.  A value of -1 means
23739034852cSGleb Smirnoff  "don't lock ntpd into memore".  This is the default for Linux boxes.
23749034852cSGleb Smirnoff  A value of 0 means "lock ntpd into memory" with no limits.  Otherwise
23759034852cSGleb Smirnoff  the value is the number of megabytes of memory to lock.  The default
23769034852cSGleb Smirnoff  is 32 megabytes.
23779034852cSGleb Smirnoff
23789034852cSGleb Smirnoff* The old Google Test framework has been replaced with a new framework,
23799034852cSGleb Smirnoff  based on http://www.throwtheswitch.org/unity/ .
23809034852cSGleb Smirnoff
23819034852cSGleb SmirnoffBug Fixes and Improvements:
23829034852cSGleb Smirnoff* [Bug 2332] (reopened) Exercise thread cancellation once before dropping
23839034852cSGleb Smirnoff  privileges and limiting resources in NTPD removes the need to link
23849034852cSGleb Smirnoff  forcefully against 'libgcc_s' which does not always work. J.Perlinger
23859034852cSGleb Smirnoff* [Bug 2595] ntpdate man page quirks.  Hal Murray, Harlan Stenn.
23869034852cSGleb Smirnoff* [Bug 2625] Deprecate flag1 in local refclock.  Hal Murray, Harlan Stenn.
23879034852cSGleb Smirnoff* [Bug 2817] Stop locking ntpd into memory by default under Linux.  H.Stenn.
23889034852cSGleb Smirnoff* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c.  perlinger@ntp.org
23899034852cSGleb Smirnoff* [Bug 2823] ntpsweep with recursive peers option doesn't work.  H.Stenn.
23909034852cSGleb Smirnoff* [Bug 2849] Systems with more than one default route may never
23919034852cSGleb Smirnoff  synchronize.  Brian Utterback.  Note that this patch might need to
23929034852cSGleb Smirnoff  be reverted once Bug 2043 has been fixed.
23939034852cSGleb Smirnoff* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger
23949034852cSGleb Smirnoff* [Bug 2866] segmentation fault at initgroups().  Harlan Stenn.
23959034852cSGleb Smirnoff* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger
23969034852cSGleb Smirnoff* [Bug 2873] libevent should not include .deps/ in the tarball.  H.Stenn
23979034852cSGleb Smirnoff* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn
23989034852cSGleb Smirnoff* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS.  libevent must
23999034852cSGleb Smirnoff  be configured for the distribution targets.  Harlan Stenn.
24009034852cSGleb Smirnoff* [Bug 2883] ntpd crashes on exit with empty driftfile.  Miroslav Lichvar.
24019034852cSGleb Smirnoff* [Bug 2886] Mis-spelling: "outlyer" should be "outlier".  dave@horsfall.org
24029034852cSGleb Smirnoff* [Bug 2888] streamline calendar functions.  perlinger@ntp.org
24039034852cSGleb Smirnoff* [Bug 2889] ntp-dev-4.3.67 does not build on Windows.  perlinger@ntp.org
24049034852cSGleb Smirnoff* [Bug 2890] Ignore ENOBUFS on routing netlink socket.  Konstantin Khlebnikov.
24059034852cSGleb Smirnoff* [Bug 2906] make check needs better support for pthreads.  Harlan Stenn.
24069034852cSGleb Smirnoff* [Bug 2907] dist* build targets require our libevent/ to be enabled.  HStenn.
24079034852cSGleb Smirnoff* [Bug 2912] no munlockall() under Windows.  David Taylor, Harlan Stenn.
24089034852cSGleb Smirnoff* libntp/emalloc.c: Remove explicit include of stdint.h.  Harlan Stenn.
24099034852cSGleb Smirnoff* Put Unity CPPFLAGS items in unity_config.h.  Harlan Stenn.
24109034852cSGleb Smirnoff* tests/ntpd/g_leapsec.cpp typo fix.  Harlan Stenn.
24119034852cSGleb Smirnoff* Phase 1 deprecation of google test in sntp/tests/.  Harlan Stenn.
24129034852cSGleb Smirnoff* On some versions of HP-UX, inttypes.h does not include stdint.h.  H.Stenn.
24139034852cSGleb Smirnoff* top_srcdir can change based on ntp v. sntp.  Harlan Stenn.
24149034852cSGleb Smirnoff* sntp/tests/ function parameter list cleanup.  Damir Tomić.
24159034852cSGleb Smirnoff* tests/libntp/ function parameter list cleanup.  Damir Tomić.
24169034852cSGleb Smirnoff* tests/ntpd/ function parameter list cleanup.  Damir Tomić.
24179034852cSGleb Smirnoff* sntp/unity/unity_config.h: handle stdint.h.  Harlan Stenn.
24189034852cSGleb Smirnoff* sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris.  H.Stenn.
24199034852cSGleb Smirnoff* tests/libntp/timevalops.c and timespecops.c fixed error printing.  D.Tomić.
24209034852cSGleb Smirnoff* tests/libntp/ improvements in code and fixed error printing.  Damir Tomić.
24219034852cSGleb Smirnoff* tests/libntp: a_md5encrypt.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c,
24229034852cSGleb Smirnoff  caltontp.c, clocktime.c, humandate.c, hextolfp.c, decodenetnum.c - fixed
24239034852cSGleb Smirnoff  formatting; first declaration, then code (C90); deleted unnecessary comments;
24249034852cSGleb Smirnoff  changed from sprintf to snprintf; fixed order of includes. Tomasz Flendrich
24259034852cSGleb Smirnoff* tests/libntp/lfpfunc.c remove unnecessary include, remove old comments,
24269034852cSGleb Smirnoff  fix formatting, cleanup. Tomasz Flendrich
24279034852cSGleb Smirnoff* tests/libntp/lfptostr.c remove unnecessary include, add consts, fix formatting.
24289034852cSGleb Smirnoff  Tomasz Flendrich
24299034852cSGleb Smirnoff* tests/libntp/statestr.c remove empty functions, remove unnecessary include,
24309034852cSGleb Smirnoff  fix formatting. Tomasz Flendrich
24319034852cSGleb Smirnoff* tests/libntp/modetoa.c fixed formatting. Tomasz Flendrich
24329034852cSGleb Smirnoff* tests/libntp/msyslog.c fixed formatting. Tomasz Flendrich
24339034852cSGleb Smirnoff* tests/libntp/numtoa.c deleted unnecessary empty functions, fixed formatting.
24349034852cSGleb Smirnoff  Tomasz Flendrich
24359034852cSGleb Smirnoff* tests/libntp/numtohost.c added const, fixed formatting. Tomasz Flendrich
24369034852cSGleb Smirnoff* tests/libntp/refnumtoa.c fixed formatting. Tomasz Flendrich
24379034852cSGleb Smirnoff* tests/libntp/ssl_init.c fixed formatting. Tomasz Flendrich
24389034852cSGleb Smirnoff* tests/libntp/tvtots.c fixed a bug, fixed formatting. Tomasz Flendrich
24399034852cSGleb Smirnoff* tests/libntp/uglydate.c removed an unnecessary include. Tomasz Flendrich
24409034852cSGleb Smirnoff* tests/libntp/vi64ops.c removed an unnecessary comment, fixed formatting.
24419034852cSGleb Smirnoff* tests/libntp/ymd3yd.c removed an empty function and an unnecessary include,
24429034852cSGleb Smirnofffixed formatting. Tomasz Flendrich
24439034852cSGleb Smirnoff* tests/libntp/timespecops.c fixed formatting, fixed the order of includes,
24449034852cSGleb Smirnoff  removed unnecessary comments, cleanup. Tomasz Flendrich
24459034852cSGleb Smirnoff* tests/libntp/timevalops.c fixed the order of includes, deleted unnecessary
24469034852cSGleb Smirnoff  comments, cleanup. Tomasz Flendrich
24479034852cSGleb Smirnoff* tests/libntp/sockaddrtest.h making it agree to NTP's conventions of formatting.
24489034852cSGleb Smirnoff  Tomasz Flendrich
24499034852cSGleb Smirnoff* tests/libntp/lfptest.h cleanup. Tomasz Flendrich
24509034852cSGleb Smirnoff* tests/libntp/test-libntp.c fix formatting. Tomasz Flendrich
24519034852cSGleb Smirnoff* sntp/tests/crypto.c is now using proper Unity's assertions, fixed formatting.
24529034852cSGleb Smirnoff  Tomasz Flendrich
24539034852cSGleb Smirnoff* sntp/tests/kodDatabase.c added consts, deleted empty function,
24549034852cSGleb Smirnoff  fixed formatting. Tomasz Flendrich
24559034852cSGleb Smirnoff* sntp/tests/kodFile.c cleanup, fixed formatting. Tomasz Flendrich
24569034852cSGleb Smirnoff* sntp/tests/packetHandling.c is now using proper Unity's assertions,
24579034852cSGleb Smirnoff  fixed formatting, deleted unused variable. Tomasz Flendrich
24589034852cSGleb Smirnoff* sntp/tests/keyFile.c is now using proper Unity's assertions, fixed formatting.
24599034852cSGleb Smirnoff  Tomasz Flendrich
24609034852cSGleb Smirnoff* sntp/tests/packetProcessing.c changed from sprintf to snprintf,
24619034852cSGleb Smirnoff  fixed formatting. Tomasz Flendrich
24629034852cSGleb Smirnoff* sntp/tests/utilities.c is now using proper Unity's assertions, changed
24639034852cSGleb Smirnoff  the order of includes, fixed formatting, removed unnecessary comments.
24649034852cSGleb Smirnoff  Tomasz Flendrich
24659034852cSGleb Smirnoff* sntp/tests/sntptest.h fixed formatting. Tomasz Flendrich
24669034852cSGleb Smirnoff* sntp/tests/fileHandlingTest.h.in fixed a possible buffer overflow problem,
24679034852cSGleb Smirnoff  made one function do its job, deleted unnecessary prints, fixed formatting.
24689034852cSGleb Smirnoff  Tomasz Flendrich
24699034852cSGleb Smirnoff* sntp/unity/Makefile.am added a missing header. Tomasz Flendrich
24709034852cSGleb Smirnoff* sntp/unity/unity_config.h: Distribute it.  Harlan Stenn.
24719034852cSGleb Smirnoff* sntp/libevent/evconfig-private.h: remove generated filefrom SCM.  H.Stenn.
24729034852cSGleb Smirnoff* sntp/unity/Makefile.am: fix some broken paths.  Harlan Stenn.
24739034852cSGleb Smirnoff* sntp/unity/unity.c: Clean up a printf().  Harlan Stenn.
24749034852cSGleb Smirnoff* Phase 1 deprecation of google test in tests/libntp/.  Harlan Stenn.
24759034852cSGleb Smirnoff* Don't build sntp/libevent/sample/.  Harlan Stenn.
24769034852cSGleb Smirnoff* tests/libntp/test_caltontp needs -lpthread.  Harlan Stenn.
24779034852cSGleb Smirnoff* br-flock: --enable-local-libevent.  Harlan Stenn.
24789034852cSGleb Smirnoff* Wrote tests for ntpd/ntp_prio_q.c. Tomasz Flendrich
24799034852cSGleb Smirnoff* scripts/lib/NTP/Util.pm: stratum output is version-dependent.  Harlan Stenn.
24809034852cSGleb Smirnoff* Get rid of the NTP_ prefix on our assertion macros.  Harlan Stenn.
24819034852cSGleb Smirnoff* Code cleanup.  Harlan Stenn.
24829034852cSGleb Smirnoff* libntp/icom.c: Typo fix.  Harlan Stenn.
24839034852cSGleb Smirnoff* util/ntptime.c: initialization nit.  Harlan Stenn.
24849034852cSGleb Smirnoff* ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr).  Harlan Stenn.
24859034852cSGleb Smirnoff* Add std_unity_tests to various Makefile.am files.  Harlan Stenn.
24869034852cSGleb Smirnoff* ntpd/ntp_restrict.c: added a few assertions, created tests for this file.
24879034852cSGleb Smirnoff  Tomasz Flendrich
24889034852cSGleb Smirnoff* Changed progname to be const in many files - now it's consistent. Tomasz
24899034852cSGleb Smirnoff  Flendrich
24909034852cSGleb Smirnoff* Typo fix for GCC warning suppression.  Harlan Stenn.
24919034852cSGleb Smirnoff* Added tests/ntpd/ntp_scanner.c test. Damir Tomić.
24929034852cSGleb Smirnoff* Added declarations to all Unity tests, and did minor fixes to them.
24939034852cSGleb Smirnoff  Reduced the number of warnings by half. Damir Tomić.
24949034852cSGleb Smirnoff* Updated generate_test_runner.rb and updated the sntp/unity/auto directory
24959034852cSGleb Smirnoff  with the latest Unity updates from Mark. Damir Tomić.
24969034852cSGleb Smirnoff* Retire google test - phase I.  Harlan Stenn.
24979034852cSGleb Smirnoff* Unity test cleanup: move declaration of 'initializing'.  Harlan Stenn.
24989034852cSGleb Smirnoff* Update the NEWS file.  Harlan Stenn.
24999034852cSGleb Smirnoff* Autoconf cleanup.  Harlan Stenn.
25009034852cSGleb Smirnoff* Unit test dist cleanup. Harlan Stenn.
25019034852cSGleb Smirnoff* Cleanup various test Makefile.am files.  Harlan Stenn.
25029034852cSGleb Smirnoff* Pthread autoconf macro cleanup.  Harlan Stenn.
25039034852cSGleb Smirnoff* Fix progname definition in unity runner scripts.  Harlan Stenn.
25049034852cSGleb Smirnoff* Clean trailing whitespace in tests/ntpd/Makefile.am.  Harlan Stenn.
25059034852cSGleb Smirnoff* Update the patch for bug 2817.  Harlan Stenn.
25069034852cSGleb Smirnoff* More updates for bug 2817.  Harlan Stenn.
25079034852cSGleb Smirnoff* Fix bugs in tests/ntpd/ntp_prio_q.c.  Harlan Stenn.
25089034852cSGleb Smirnoff* gcc on older HPUX may need +allowdups.  Harlan Stenn.
25099034852cSGleb Smirnoff* Adding missing MCAST protection.  Harlan Stenn.
25109034852cSGleb Smirnoff* Disable certain test programs on certain platforms.  Harlan Stenn.
25119034852cSGleb Smirnoff* Implement --enable-problem-tests (on by default).  Harlan Stenn.
25129034852cSGleb Smirnoff* build system tweaks.  Harlan Stenn.
25139034852cSGleb Smirnoff
25149034852cSGleb Smirnoff---
2515276da39aSCy SchubertNTP 4.2.8p3 (Harlan Stenn <stenn@ntp.org>, 2015/06/29)
2516276da39aSCy Schubert
2517276da39aSCy SchubertFocus: 1 Security fix.  Bug fixes and enhancements.  Leap-second improvements.
2518276da39aSCy Schubert
2519276da39aSCy SchubertSeverity: MEDIUM
2520276da39aSCy Schubert
2521276da39aSCy SchubertSecurity Fix:
2522276da39aSCy Schubert
2523276da39aSCy Schubert* [Sec 2853] Crafted remote config packet can crash some versions of
2524276da39aSCy Schubert  ntpd.  Aleksis Kauppinen, Juergen Perlinger, Harlan Stenn.
2525276da39aSCy Schubert
2526276da39aSCy SchubertUnder specific circumstances an attacker can send a crafted packet to
2527276da39aSCy Schubertcause a vulnerable ntpd instance to crash. This requires each of the
2528276da39aSCy Schubertfollowing to be true:
2529276da39aSCy Schubert
2530276da39aSCy Schubert1) ntpd set up to allow remote configuration (not allowed by default), and
2531276da39aSCy Schubert2) knowledge of the configuration password, and
2532276da39aSCy Schubert3) access to a computer entrusted to perform remote configuration.
2533276da39aSCy Schubert
2534276da39aSCy SchubertThis vulnerability is considered low-risk.
2535276da39aSCy Schubert
2536276da39aSCy SchubertNew features in this release:
2537276da39aSCy Schubert
2538276da39aSCy SchubertOptional (disabled by default) support to have ntpd provide smeared
2539276da39aSCy Schubertleap second time.  A specially built and configured ntpd will only
2540276da39aSCy Schubertoffer smeared time in response to client packets.  These response
2541276da39aSCy Schubertpackets will also contain a "refid" of 254.a.b.c, where the 24 bits
2542276da39aSCy Schubertof a, b, and c encode the amount of smear in a 2:22 integer:fraction
2543276da39aSCy Schubertformat.  See README.leapsmear and http://bugs.ntp.org/2855 for more
2544276da39aSCy Schubertinformation.
2545276da39aSCy Schubert
2546276da39aSCy Schubert   *IF YOU CHOOSE TO CONFIGURE NTPD TO PROVIDE LEAP SMEAR TIME*
2547276da39aSCy Schubert   *BE SURE YOU DO NOT OFFER THAT TIME ON PUBLIC TIMESERVERS.*
2548276da39aSCy Schubert
2549276da39aSCy SchubertWe've imported the Unity test framework, and have begun converting
2550276da39aSCy Schubertthe existing google-test items to this new framework.  If you want
2551276da39aSCy Schubertto write new tests or change old ones, you'll need to have ruby
2552276da39aSCy Schubertinstalled.  You don't need ruby to run the test suite.
2553276da39aSCy Schubert
2554276da39aSCy SchubertBug Fixes and Improvements:
2555276da39aSCy Schubert
2556276da39aSCy Schubert* CID 739725: Fix a rare resource leak in libevent/listener.c.
2557276da39aSCy Schubert* CID 1295478: Quiet a pedantic potential error from the fix for Bug 2776.
2558276da39aSCy Schubert* CID 1296235: Fix refclock_jjy.c and correcting type of the driver40-ja.html
2559276da39aSCy Schubert* CID 1269537: Clean up a line of dead code in getShmTime().
2560276da39aSCy Schubert* [Bug 1060] Buffer overruns in libparse/clk_rawdcf.c.  Helge Oldach.
2561276da39aSCy Schubert* [Bug 2590] autogen-5.18.5.
2562276da39aSCy Schubert* [Bug 2612] restrict: Warn when 'monitor' can't be disabled because
2563276da39aSCy Schubert  of 'limited'.
2564276da39aSCy Schubert* [Bug 2650] fix includefile processing.
2565276da39aSCy Schubert* [Bug 2745] ntpd -x steps clock on leap second
2566276da39aSCy Schubert   Fixed an initial-value problem that caused misbehaviour in absence of
2567276da39aSCy Schubert   any leapsecond information.
2568276da39aSCy Schubert   Do leap second stepping only of the step adjustment is beyond the
2569276da39aSCy Schubert   proper jump distance limit and step correction is allowed at all.
2570276da39aSCy Schubert* [Bug 2750] build for Win64
2571276da39aSCy Schubert  Building for 32bit of loopback ppsapi needs def file
2572276da39aSCy Schubert* [Bug 2776] Improve ntpq's 'help keytype'.
2573276da39aSCy Schubert* [Bug 2778] Implement "apeers"  ntpq command to include associd.
2574276da39aSCy Schubert* [Bug 2782] Refactor refclock_shm.c, add memory barrier protection.
2575276da39aSCy Schubert* [Bug 2792] If the IFF_RUNNING interface flag is supported then an
2576276da39aSCy Schubert  interface is ignored as long as this flag is not set since the
2577276da39aSCy Schubert  interface is not usable (e.g., no link).
2578276da39aSCy Schubert* [Bug 2794] Clean up kernel clock status reports.
2579276da39aSCy Schubert* [Bug 2800] refclock_true.c true_debug() can't open debug log because
2580276da39aSCy Schubert  of incompatible open/fdopen parameters.
2581276da39aSCy Schubert* [Bug 2804] install-local-data assumes GNU 'find' semantics.
2582276da39aSCy Schubert* [Bug 2805] ntpd fails to join multicast group.
2583276da39aSCy Schubert* [Bug 2806] refclock_jjy.c supports the Telephone JJY.
2584276da39aSCy Schubert* [Bug 2808] GPSD_JSON driver enhancements, step 1.
2585276da39aSCy Schubert  Fix crash during cleanup if GPS device not present and char device.
2586276da39aSCy Schubert  Increase internal token buffer to parse all JSON data, even SKY.
2587276da39aSCy Schubert  Defer logging of errors during driver init until the first unit is
2588276da39aSCy Schubert  started, so the syslog is not cluttered when the driver is not used.
2589276da39aSCy Schubert  Various improvements, see http://bugs.ntp.org/2808 for details.
2590276da39aSCy Schubert  Changed libjsmn to a more recent version.
2591276da39aSCy Schubert* [Bug 2810] refclock_shm.c memory barrier code needs tweaks for QNX.
2592276da39aSCy Schubert* [Bug 2813] HP-UX needs -D__STDC_VERSION__=199901L and limits.h.
2593276da39aSCy Schubert* [Bug 2815] net-snmp before v5.4 has circular library dependencies.
2594276da39aSCy Schubert* [Bug 2821] Add a missing NTP_PRINTF and a missing const.
2595276da39aSCy Schubert* [Bug 2822] New leap column in sntp broke NTP::Util.pm.
2596276da39aSCy Schubert* [Bug 2824] Convert update-leap to perl. (also see 2769)
2597276da39aSCy Schubert* [Bug 2825] Quiet file installation in html/ .
2598276da39aSCy Schubert* [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey
2599276da39aSCy Schubert   NTPD transfers the current TAI (instead of an announcement) now.
2600276da39aSCy Schubert   This might still needed improvement.
2601276da39aSCy Schubert   Update autokey data ASAP when 'sys_tai' changes.
2602276da39aSCy Schubert   Fix unit test that was broken by changes for autokey update.
2603276da39aSCy Schubert   Avoid potential signature length issue and use DPRINTF where possible
2604276da39aSCy Schubert     in ntp_crypto.c.
2605276da39aSCy Schubert* [Bug 2832] refclock_jjy.c supports the TDC-300.
2606276da39aSCy Schubert* [Bug 2834] Correct a broken html tag in html/refclock.html
2607276da39aSCy Schubert* [Bug 2836] DFC77 patches from Frank Kardel to make decoding more
2608276da39aSCy Schubert  robust, and require 2 consecutive timestamps to be consistent.
2609276da39aSCy Schubert* [Bug 2837] Allow a configurable DSCP value.
2610276da39aSCy Schubert* [Bug 2837] add test for DSCP to ntpd/complete.conf.in
2611276da39aSCy Schubert* [Bug 2842] Glitch in ntp.conf.def documentation stanza.
2612276da39aSCy Schubert* [Bug 2842] Bug in mdoc2man.
2613276da39aSCy Schubert* [Bug 2843] make check fails on 4.3.36
2614276da39aSCy Schubert   Fixed compiler warnings about numeric range overflow
2615276da39aSCy Schubert   (The original topic was fixed in a byplay to bug#2830)
2616276da39aSCy Schubert* [Bug 2845] Harden memory allocation in ntpd.
2617276da39aSCy Schubert* [Bug 2852] 'make check' can't find unity.h.  Hal Murray.
2618276da39aSCy Schubert* [Bug 2854] Missing brace in libntp/strdup.c.  Masanari Iida.
2619276da39aSCy Schubert* [Bug 2855] Parser fix for conditional leap smear code.  Harlan Stenn.
2620276da39aSCy Schubert* [Bug 2855] Report leap smear in the REFID.  Harlan Stenn.
2621276da39aSCy Schubert* [Bug 2855] Implement conditional leap smear code.  Martin Burnicki.
2622276da39aSCy Schubert* [Bug 2856] ntpd should wait() on terminated child processes.  Paul Green.
2623276da39aSCy Schubert* [Bug 2857] Stratus VOS does not support SIGIO.  Paul Green.
2624276da39aSCy Schubert* [Bug 2859] Improve raw DCF77 robustness deconding.  Frank Kardel.
2625276da39aSCy Schubert* [Bug 2860] ntpq ifstats sanity check is too stringent.  Frank Kardel.
2626276da39aSCy Schubert* html/drivers/driver22.html: typo fix.  Harlan Stenn.
2627276da39aSCy Schubert* refidsmear test cleanup.  Tomasz Flendrich.
2628276da39aSCy Schubert* refidsmear function support and tests.  Harlan Stenn.
2629276da39aSCy Schubert* sntp/tests/Makefile.am: remove g_nameresolution.cpp as it tested
2630276da39aSCy Schubert  something that was only in the 4.2.6 sntp.  Harlan Stenn.
2631276da39aSCy Schubert* Modified tests/bug-2803/Makefile.am so it builds Unity framework tests.
2632276da39aSCy Schubert  Damir Tomić
2633276da39aSCy Schubert* Modified tests/libtnp/Makefile.am so it builds Unity framework tests.
2634276da39aSCy Schubert  Damir Tomić
2635276da39aSCy Schubert* Modified sntp/tests/Makefile.am so it builds Unity framework tests.
2636276da39aSCy Schubert  Damir Tomić
2637276da39aSCy Schubert* tests/sandbox/smeartest.c: Harlan Stenn, Damir Tomic, Juergen Perlinger.
2638276da39aSCy Schubert* Converted from gtest to Unity: tests/bug-2803/. Damir Tomić
2639276da39aSCy Schubert* Converted from gtest to Unity: tests/libntp/ a_md5encrypt, atoint.c,
2640276da39aSCy Schubert  atouint.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c,
2641276da39aSCy Schubert  calyearstart.c, clocktime.c, hextoint.c, lfpfunc.c, modetoa.c,
2642276da39aSCy Schubert  numtoa.c, numtohost.c, refnumtoa.c, ssl_init.c, statestr.c,
2643276da39aSCy Schubert  timespecops.c, timevalops.c, uglydate.c, vi64ops.c, ymd2yd.c.
2644276da39aSCy Schubert  Damir Tomić
2645276da39aSCy Schubert* Converted from gtest to Unity: sntp/tests/ kodDatabase.c, kodFile.c,
2646276da39aSCy Schubert  networking.c, keyFile.c, utilities.cpp, sntptest.h,
2647276da39aSCy Schubert  fileHandlingTest.h. Damir Tomić
2648276da39aSCy Schubert* Initial support for experimental leap smear code.  Harlan Stenn.
2649276da39aSCy Schubert* Fixes to sntp/tests/fileHandlingTest.h.in.  Harlan Stenn.
2650276da39aSCy Schubert* Report select() debug messages at debug level 3 now.
2651276da39aSCy Schubert* sntp/scripts/genLocInfo: treat raspbian as debian.
2652276da39aSCy Schubert* Unity test framework fixes.
2653276da39aSCy Schubert  ** Requires ruby for changes to tests.
2654276da39aSCy Schubert* Initial support for PACKAGE_VERSION tests.
2655276da39aSCy Schubert* sntp/libpkgver belongs in EXTRA_DIST, not DIST_SUBDIRS.
2656276da39aSCy Schubert* tests/bug-2803/Makefile.am must distribute bug-2803.h.
2657276da39aSCy Schubert* Add an assert to the ntpq ifstats code.
2658276da39aSCy Schubert* Clean up the RLIMIT_STACK code.
2659276da39aSCy Schubert* Improve the ntpq documentation around the controlkey keyid.
2660276da39aSCy Schubert* ntpq.c cleanup.
2661276da39aSCy Schubert* Windows port build cleanup.
2662276da39aSCy Schubert
2663276da39aSCy Schubert---
2664276da39aSCy SchubertNTP 4.2.8p2 (Harlan Stenn <stenn@ntp.org>, 2015/04/07)
2665a25439b6SCy Schubert
2666a25439b6SCy SchubertFocus: Security and Bug fixes, enhancements.
2667a25439b6SCy Schubert
2668a25439b6SCy SchubertSeverity: MEDIUM
2669a25439b6SCy Schubert
2670a25439b6SCy SchubertIn addition to bug fixes and enhancements, this release fixes the
2671a25439b6SCy Schubertfollowing medium-severity vulnerabilities involving private key
2672a25439b6SCy Schubertauthentication:
2673a25439b6SCy Schubert
2674a25439b6SCy Schubert* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
2675a25439b6SCy Schubert
2676a25439b6SCy Schubert    References: Sec 2779 / CVE-2015-1798 / VU#374268
2677a25439b6SCy Schubert    Affects: All NTP4 releases starting with ntp-4.2.5p99 up to but not
2678a25439b6SCy Schubert	including ntp-4.2.8p2 where the installation uses symmetric keys
2679a25439b6SCy Schubert	to authenticate remote associations.
2680a25439b6SCy Schubert    CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
2681a25439b6SCy Schubert    Date Resolved: Stable (4.2.8p2) 07 Apr 2015
2682a25439b6SCy Schubert    Summary: When ntpd is configured to use a symmetric key to authenticate
2683a25439b6SCy Schubert	a remote NTP server/peer, it checks if the NTP message
2684a25439b6SCy Schubert	authentication code (MAC) in received packets is valid, but not if
2685a25439b6SCy Schubert	there actually is any MAC included. Packets without a MAC are
2686a25439b6SCy Schubert	accepted as if they had a valid MAC. This allows a MITM attacker to
2687a25439b6SCy Schubert	send false packets that are accepted by the client/peer without
2688a25439b6SCy Schubert	having to know the symmetric key. The attacker needs to know the
2689a25439b6SCy Schubert	transmit timestamp of the client to match it in the forged reply
2690a25439b6SCy Schubert	and the false reply needs to reach the client before the genuine
2691a25439b6SCy Schubert	reply from the server. The attacker doesn't necessarily need to be
2692a25439b6SCy Schubert	relaying the packets between the client and the server.
2693a25439b6SCy Schubert
2694a25439b6SCy Schubert	Authentication using autokey doesn't have this problem as there is
2695a25439b6SCy Schubert	a check that requires the key ID to be larger than NTP_MAXKEY,
2696a25439b6SCy Schubert	which fails for packets without a MAC.
2697a25439b6SCy Schubert    Mitigation:
2698a25439b6SCy Schubert        Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
2699a25439b6SCy Schubert	or the NTP Public Services Project Download Page
2700a25439b6SCy Schubert        Configure ntpd with enough time sources and monitor it properly.
2701a25439b6SCy Schubert    Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
2702a25439b6SCy Schubert
2703a25439b6SCy Schubert* [Sec 2781] Authentication doesn't protect symmetric associations against
2704a25439b6SCy Schubert  DoS attacks.
2705a25439b6SCy Schubert
2706a25439b6SCy Schubert    References: Sec 2781 / CVE-2015-1799 / VU#374268
2707a25439b6SCy Schubert    Affects: All NTP releases starting with at least xntp3.3wy up to but
2708a25439b6SCy Schubert	not including ntp-4.2.8p2 where the installation uses symmetric
2709a25439b6SCy Schubert	key authentication.
2710a25439b6SCy Schubert    CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
2711a25439b6SCy Schubert    Note: the CVSS base Score for this issue could be 4.3 or lower, and
2712a25439b6SCy Schubert	it could be higher than 5.4.
2713a25439b6SCy Schubert    Date Resolved: Stable (4.2.8p2) 07 Apr 2015
2714a25439b6SCy Schubert    Summary: An attacker knowing that NTP hosts A and B are peering with
2715a25439b6SCy Schubert	each other (symmetric association) can send a packet to host A
2716a25439b6SCy Schubert	with source address of B which will set the NTP state variables
2717a25439b6SCy Schubert	on A to the values sent by the attacker. Host A will then send
2718a25439b6SCy Schubert	on its next poll to B a packet with originate timestamp that
2719a25439b6SCy Schubert	doesn't match the transmit timestamp of B and the packet will
2720a25439b6SCy Schubert	be dropped. If the attacker does this periodically for both
2721a25439b6SCy Schubert	hosts, they won't be able to synchronize to each other. This is
2722a25439b6SCy Schubert	a known denial-of-service attack, described at
2723a25439b6SCy Schubert	https://www.eecis.udel.edu/~mills/onwire.html .
2724a25439b6SCy Schubert
2725a25439b6SCy Schubert	According to the document the NTP authentication is supposed to
2726a25439b6SCy Schubert	protect symmetric associations against this attack, but that
2727a25439b6SCy Schubert	doesn't seem to be the case. The state variables are updated even
2728a25439b6SCy Schubert	when authentication fails and the peers are sending packets with
2729a25439b6SCy Schubert	originate timestamps that don't match the transmit timestamps on
2730a25439b6SCy Schubert	the receiving side.
2731a25439b6SCy Schubert
2732a25439b6SCy Schubert	This seems to be a very old problem, dating back to at least
2733a25439b6SCy Schubert	xntp3.3wy. It's also in the NTPv3 (RFC 1305) and NTPv4 (RFC 5905)
2734a25439b6SCy Schubert	specifications, so other NTP implementations with support for
2735a25439b6SCy Schubert	symmetric associations and authentication may be vulnerable too.
2736a25439b6SCy Schubert	An update to the NTP RFC to correct this error is in-process.
2737a25439b6SCy Schubert    Mitigation:
2738a25439b6SCy Schubert        Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
2739a25439b6SCy Schubert	or the NTP Public Services Project Download Page
2740a25439b6SCy Schubert        Note that for users of autokey, this specific style of MITM attack
2741a25439b6SCy Schubert	is simply a long-known potential problem.
2742a25439b6SCy Schubert        Configure ntpd with appropriate time sources and monitor ntpd.
2743a25439b6SCy Schubert	Alert your staff if problems are detected.
2744a25439b6SCy Schubert    Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
2745a25439b6SCy Schubert
2746a25439b6SCy Schubert* New script: update-leap
2747a25439b6SCy SchubertThe update-leap script will verify and if necessary, update the
2748a25439b6SCy Schubertleap-second definition file.
2749a25439b6SCy SchubertIt requires the following commands in order to work:
2750a25439b6SCy Schubert
2751a25439b6SCy Schubert	wget logger tr sed shasum
2752a25439b6SCy Schubert
2753a25439b6SCy SchubertSome may choose to run this from cron.  It needs more portability testing.
2754a25439b6SCy Schubert
2755a25439b6SCy SchubertBug Fixes and Improvements:
2756a25439b6SCy Schubert
2757a25439b6SCy Schubert* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
2758a25439b6SCy Schubert* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument.
2759a25439b6SCy Schubert* [Bug 2346] "graceful termination" signals do not do peer cleanup.
2760a25439b6SCy Schubert* [Bug 2728] See if C99-style structure initialization works.
2761a25439b6SCy Schubert* [Bug 2747] Upgrade libevent to 2.1.5-beta.
2762a25439b6SCy Schubert* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. .
2763a25439b6SCy Schubert* [Bug 2751] jitter.h has stale copies of l_fp macros.
2764a25439b6SCy Schubert* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM.
2765a25439b6SCy Schubert* [Bug 2757] Quiet compiler warnings.
2766a25439b6SCy Schubert* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq.
2767a25439b6SCy Schubert* [Bug 2763] Allow different thresholds for forward and backward steps.
2768a25439b6SCy Schubert* [Bug 2766] ntp-keygen output files should not be world-readable.
2769a25439b6SCy Schubert* [Bug 2767] ntp-keygen -M should symlink to ntp.keys.
2770a25439b6SCy Schubert* [Bug 2771] nonvolatile value is documented in wrong units.
2771a25439b6SCy Schubert* [Bug 2773] Early leap announcement from Palisade/Thunderbolt
2772a25439b6SCy Schubert* [Bug 2774] Unreasonably verbose printout - leap pending/warning
2773a25439b6SCy Schubert* [Bug 2775] ntp-keygen.c fails to compile under Windows.
2774a25439b6SCy Schubert* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info.
2775a25439b6SCy Schubert  Removed non-ASCII characters from some copyright comments.
2776a25439b6SCy Schubert  Removed trailing whitespace.
2777a25439b6SCy Schubert  Updated definitions for Meinberg clocks from current Meinberg header files.
2778a25439b6SCy Schubert  Now use C99 fixed-width types and avoid non-ASCII characters in comments.
2779a25439b6SCy Schubert  Account for updated definitions pulled from Meinberg header files.
2780a25439b6SCy Schubert  Updated comments on Meinberg GPS receivers which are not only called GPS16x.
2781a25439b6SCy Schubert  Replaced some constant numbers by defines from ntp_calendar.h
2782a25439b6SCy Schubert  Modified creation of parse-specific variables for Meinberg devices
2783a25439b6SCy Schubert  in gps16x_message().
2784a25439b6SCy Schubert  Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
2785a25439b6SCy Schubert  Modified mbg_tm_str() which now expexts an additional parameter controlling
2786a25439b6SCy Schubert  if the time status shall be printed.
2787a25439b6SCy Schubert* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
2788a25439b6SCy Schubert* [Sec 2781] Authentication doesn't protect symmetric associations against
2789a25439b6SCy Schubert  DoS attacks.
2790a25439b6SCy Schubert* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE.
2791a25439b6SCy Schubert* [Bug 2789] Quiet compiler warnings from libevent.
2792a25439b6SCy Schubert* [Bug 2790] If ntpd sets the Windows MM timer highest resolution
2793a25439b6SCy Schubert  pause briefly before measuring system clock precision to yield
2794a25439b6SCy Schubert  correct results.
2795a25439b6SCy Schubert* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer.
2796a25439b6SCy Schubert* Use predefined function types for parse driver functions
2797a25439b6SCy Schubert  used to set up function pointers.
2798a25439b6SCy Schubert  Account for changed prototype of parse_inp_fnc_t functions.
2799a25439b6SCy Schubert  Cast parse conversion results to appropriate types to avoid
2800a25439b6SCy Schubert  compiler warnings.
2801a25439b6SCy Schubert  Let ioctl() for Windows accept a (void *) to avoid compiler warnings
2802a25439b6SCy Schubert  when called with pointers to different types.
2803a25439b6SCy Schubert
2804a25439b6SCy Schubert---
28052b15cb3dSCy SchubertNTP 4.2.8p1 (Harlan Stenn <stenn@ntp.org>, 2015/02/04)
28062b15cb3dSCy Schubert
28072b15cb3dSCy SchubertFocus: Security and Bug fixes, enhancements.
28082b15cb3dSCy Schubert
28092b15cb3dSCy SchubertSeverity: HIGH
28102b15cb3dSCy Schubert
28112b15cb3dSCy SchubertIn addition to bug fixes and enhancements, this release fixes the
28122b15cb3dSCy Schubertfollowing high-severity vulnerabilities:
28132b15cb3dSCy Schubert
28142b15cb3dSCy Schubert* vallen is not validated in several places in ntp_crypto.c, leading
28152b15cb3dSCy Schubert  to a potential information leak or possibly a crash
28162b15cb3dSCy Schubert
28172b15cb3dSCy Schubert    References: Sec 2671 / CVE-2014-9297 / VU#852879
28182b15cb3dSCy Schubert    Affects: All NTP4 releases before 4.2.8p1 that are running autokey.
28192b15cb3dSCy Schubert    CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
28202b15cb3dSCy Schubert    Date Resolved: Stable (4.2.8p1) 04 Feb 2015
28212b15cb3dSCy Schubert    Summary: The vallen packet value is not validated in several code
28222b15cb3dSCy Schubert             paths in ntp_crypto.c which can lead to information leakage
28232b15cb3dSCy Schubert	     or perhaps a crash of the ntpd process.
28242b15cb3dSCy Schubert    Mitigation - any of:
28252b15cb3dSCy Schubert	Upgrade to 4.2.8p1, or later, from the NTP Project Download Page
28262b15cb3dSCy Schubert		or the NTP Public Services Project Download Page.
28272b15cb3dSCy Schubert	Disable Autokey Authentication by removing, or commenting out,
28282b15cb3dSCy Schubert		all configuration directives beginning with the "crypto"
28292b15cb3dSCy Schubert		keyword in your ntp.conf file.
28302b15cb3dSCy Schubert    Credit: This vulnerability was discovered by Stephen Roettger of the
28312b15cb3dSCy Schubert    	Google Security Team, with additional cases found by Sebastian
28322b15cb3dSCy Schubert	Krahmer of the SUSE Security Team and Harlan Stenn of Network
28332b15cb3dSCy Schubert	Time Foundation.
28342b15cb3dSCy Schubert
28352b15cb3dSCy Schubert* ::1 can be spoofed on some OSes, so ACLs based on IPv6 ::1 addresses
28362b15cb3dSCy Schubert  can be bypassed.
28372b15cb3dSCy Schubert
28382b15cb3dSCy Schubert    References: Sec 2672 / CVE-2014-9298 / VU#852879
28392b15cb3dSCy Schubert    Affects: All NTP4 releases before 4.2.8p1, under at least some
28402b15cb3dSCy Schubert	versions of MacOS and Linux. *BSD has not been seen to be vulnerable.
28412b15cb3dSCy Schubert    CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:C) Base Score: 9
28422b15cb3dSCy Schubert    Date Resolved: Stable (4.2.8p1) 04 Feb 2014
28432b15cb3dSCy Schubert    Summary: While available kernels will prevent 127.0.0.1 addresses
28442b15cb3dSCy Schubert	from "appearing" on non-localhost IPv4 interfaces, some kernels
28452b15cb3dSCy Schubert	do not offer the same protection for ::1 source addresses on
28462b15cb3dSCy Schubert	IPv6 interfaces. Since NTP's access control is based on source
28472b15cb3dSCy Schubert	address and localhost addresses generally have no restrictions,
28482b15cb3dSCy Schubert	an attacker can send malicious control and configuration packets
28492b15cb3dSCy Schubert	by spoofing ::1 addresses from the outside. Note Well: This is
28502b15cb3dSCy Schubert	not really a bug in NTP, it's a problem with some OSes. If you
28512b15cb3dSCy Schubert	have one of these OSes where ::1 can be spoofed, ALL ::1 -based
28522b15cb3dSCy Schubert	ACL restrictions on any application can be bypassed!
28532b15cb3dSCy Schubert    Mitigation:
28542b15cb3dSCy Schubert        Upgrade to 4.2.8p1, or later, from the NTP Project Download Page
28552b15cb3dSCy Schubert	or the NTP Public Services Project Download Page
28562b15cb3dSCy Schubert        Install firewall rules to block packets claiming to come from
28572b15cb3dSCy Schubert	::1 from inappropriate network interfaces.
28582b15cb3dSCy Schubert    Credit: This vulnerability was discovered by Stephen Roettger of
28592b15cb3dSCy Schubert	the Google Security Team.
28602b15cb3dSCy Schubert
28612b15cb3dSCy SchubertAdditionally, over 30 bugfixes and improvements were made to the codebase.
28622b15cb3dSCy SchubertSee the ChangeLog for more information.
28632b15cb3dSCy Schubert
28642b15cb3dSCy Schubert---
28652b15cb3dSCy SchubertNTP 4.2.8 (Harlan Stenn <stenn@ntp.org>, 2014/12/18)
28662b15cb3dSCy Schubert
28672b15cb3dSCy SchubertFocus: Security and Bug fixes, enhancements.
28682b15cb3dSCy Schubert
28692b15cb3dSCy SchubertSeverity: HIGH
28702b15cb3dSCy Schubert
28712b15cb3dSCy SchubertIn addition to bug fixes and enhancements, this release fixes the
28722b15cb3dSCy Schubertfollowing high-severity vulnerabilities:
28732b15cb3dSCy Schubert
28742b15cb3dSCy Schubert************************** vv NOTE WELL vv *****************************
28752b15cb3dSCy Schubert
28762b15cb3dSCy SchubertThe vulnerabilities listed below can be significantly mitigated by
28772b15cb3dSCy Schubertfollowing the BCP of putting
28782b15cb3dSCy Schubert
28792b15cb3dSCy Schubert restrict default ... noquery
28802b15cb3dSCy Schubert
28812b15cb3dSCy Schubertin the ntp.conf file.  With the exception of:
28822b15cb3dSCy Schubert
28832b15cb3dSCy Schubert   receive(): missing return on error
28842b15cb3dSCy Schubert   References: Sec 2670 / CVE-2014-9296 / VU#852879
28852b15cb3dSCy Schubert
28862b15cb3dSCy Schubertbelow (which is a limited-risk vulnerability), none of the recent
28872b15cb3dSCy Schubertvulnerabilities listed below can be exploited if the source IP is
28882b15cb3dSCy Schubertrestricted from sending a 'query'-class packet by your ntp.conf file.
28892b15cb3dSCy Schubert
28902b15cb3dSCy Schubert************************** ^^ NOTE WELL ^^ *****************************
28912b15cb3dSCy Schubert
28922b15cb3dSCy Schubert* Weak default key in config_auth().
28932b15cb3dSCy Schubert
28942b15cb3dSCy Schubert  References: [Sec 2665] / CVE-2014-9293 / VU#852879
28952b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
28962b15cb3dSCy Schubert  Vulnerable Versions: all releases prior to 4.2.7p11
28972b15cb3dSCy Schubert  Date Resolved: 28 Jan 2010
28982b15cb3dSCy Schubert
28992b15cb3dSCy Schubert  Summary: If no 'auth' key is set in the configuration file, ntpd
29002b15cb3dSCy Schubert	would generate a random key on the fly.  There were two
29012b15cb3dSCy Schubert	problems with this: 1) the generated key was 31 bits in size,
29022b15cb3dSCy Schubert	and 2) it used the (now weak) ntp_random() function, which was
29032b15cb3dSCy Schubert	seeded with a 32-bit value and could only provide 32 bits of
29042b15cb3dSCy Schubert	entropy.  This was sufficient back in the late 1990s when the
29052b15cb3dSCy Schubert	code was written.  Not today.
29062b15cb3dSCy Schubert
29072b15cb3dSCy Schubert  Mitigation - any of:
29082b15cb3dSCy Schubert	- Upgrade to 4.2.7p11 or later.
29092b15cb3dSCy Schubert	- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
29102b15cb3dSCy Schubert
29112b15cb3dSCy Schubert  Credit: This vulnerability was noticed in ntp-4.2.6 by Neel Mehta
29122b15cb3dSCy Schubert  	of the Google Security Team.
29132b15cb3dSCy Schubert
29142b15cb3dSCy Schubert* Non-cryptographic random number generator with weak seed used by
29152b15cb3dSCy Schubert  ntp-keygen to generate symmetric keys.
29162b15cb3dSCy Schubert
29172b15cb3dSCy Schubert  References: [Sec 2666] / CVE-2014-9294 / VU#852879
29182b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
29192b15cb3dSCy Schubert  Vulnerable Versions: All NTP4 releases before 4.2.7p230
29202b15cb3dSCy Schubert  Date Resolved: Dev (4.2.7p230) 01 Nov 2011
29212b15cb3dSCy Schubert
29222b15cb3dSCy Schubert  Summary: Prior to ntp-4.2.7p230 ntp-keygen used a weak seed to
29232b15cb3dSCy Schubert  	prepare a random number generator that was of good quality back
29242b15cb3dSCy Schubert	in the late 1990s. The random numbers produced was then used to
29252b15cb3dSCy Schubert	generate symmetric keys. In ntp-4.2.8 we use a current-technology
29262b15cb3dSCy Schubert	cryptographic random number generator, either RAND_bytes from
29272b15cb3dSCy Schubert	OpenSSL, or arc4random().
29282b15cb3dSCy Schubert
29292b15cb3dSCy Schubert  Mitigation - any of:
29302b15cb3dSCy Schubert  	- Upgrade to 4.2.7p230 or later.
29312b15cb3dSCy Schubert	- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
29322b15cb3dSCy Schubert
29332b15cb3dSCy Schubert  Credit:  This vulnerability was discovered in ntp-4.2.6 by
29342b15cb3dSCy Schubert  	Stephen Roettger of the Google Security Team.
29352b15cb3dSCy Schubert
29362b15cb3dSCy Schubert* Buffer overflow in crypto_recv()
29372b15cb3dSCy Schubert
29382b15cb3dSCy Schubert  References: Sec 2667 / CVE-2014-9295 / VU#852879
29392b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
29402b15cb3dSCy Schubert  Versions: All releases before 4.2.8
29412b15cb3dSCy Schubert  Date Resolved: Stable (4.2.8) 18 Dec 2014
29422b15cb3dSCy Schubert
29432b15cb3dSCy Schubert  Summary: When Autokey Authentication is enabled (i.e. the ntp.conf
29442b15cb3dSCy Schubert  	file contains a 'crypto pw ...' directive) a remote attacker
29452b15cb3dSCy Schubert	can send a carefully crafted packet that can overflow a stack
29462b15cb3dSCy Schubert	buffer and potentially allow malicious code to be executed
29472b15cb3dSCy Schubert	with the privilege level of the ntpd process.
29482b15cb3dSCy Schubert
29492b15cb3dSCy Schubert  Mitigation - any of:
29502b15cb3dSCy Schubert  	- Upgrade to 4.2.8, or later, or
29512b15cb3dSCy Schubert	- Disable Autokey Authentication by removing, or commenting out,
29522b15cb3dSCy Schubert	  all configuration directives beginning with the crypto keyword
29532b15cb3dSCy Schubert	  in your ntp.conf file.
29542b15cb3dSCy Schubert
29552b15cb3dSCy Schubert  Credit: This vulnerability was discovered by Stephen Roettger of the
29562b15cb3dSCy Schubert  	Google Security Team.
29572b15cb3dSCy Schubert
29582b15cb3dSCy Schubert* Buffer overflow in ctl_putdata()
29592b15cb3dSCy Schubert
29602b15cb3dSCy Schubert  References: Sec 2668 / CVE-2014-9295 / VU#852879
29612b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
29622b15cb3dSCy Schubert  Versions: All NTP4 releases before 4.2.8
29632b15cb3dSCy Schubert  Date Resolved: Stable (4.2.8) 18 Dec 2014
29642b15cb3dSCy Schubert
29652b15cb3dSCy Schubert  Summary: A remote attacker can send a carefully crafted packet that
29662b15cb3dSCy Schubert  	can overflow a stack buffer and potentially allow malicious
29672b15cb3dSCy Schubert	code to be executed with the privilege level of the ntpd process.
29682b15cb3dSCy Schubert
29692b15cb3dSCy Schubert  Mitigation - any of:
29702b15cb3dSCy Schubert  	- Upgrade to 4.2.8, or later.
29712b15cb3dSCy Schubert	- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
29722b15cb3dSCy Schubert
29732b15cb3dSCy Schubert  Credit: This vulnerability was discovered by Stephen Roettger of the
29742b15cb3dSCy Schubert  	Google Security Team.
29752b15cb3dSCy Schubert
29762b15cb3dSCy Schubert* Buffer overflow in configure()
29772b15cb3dSCy Schubert
29782b15cb3dSCy Schubert  References: Sec 2669 / CVE-2014-9295 / VU#852879
29792b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
29802b15cb3dSCy Schubert  Versions: All NTP4 releases before 4.2.8
29812b15cb3dSCy Schubert  Date Resolved: Stable (4.2.8) 18 Dec 2014
29822b15cb3dSCy Schubert
29832b15cb3dSCy Schubert  Summary: A remote attacker can send a carefully crafted packet that
29842b15cb3dSCy Schubert	can overflow a stack buffer and potentially allow malicious
29852b15cb3dSCy Schubert	code to be executed with the privilege level of the ntpd process.
29862b15cb3dSCy Schubert
29872b15cb3dSCy Schubert  Mitigation - any of:
29882b15cb3dSCy Schubert  	- Upgrade to 4.2.8, or later.
29892b15cb3dSCy Schubert	- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
29902b15cb3dSCy Schubert
29912b15cb3dSCy Schubert  Credit: This vulnerability was discovered by Stephen Roettger of the
29922b15cb3dSCy Schubert	Google Security Team.
29932b15cb3dSCy Schubert
29942b15cb3dSCy Schubert* receive(): missing return on error
29952b15cb3dSCy Schubert
29962b15cb3dSCy Schubert  References: Sec 2670 / CVE-2014-9296 / VU#852879
29972b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:N/C:N/I:N/A:P) Base Score: 5.0
29982b15cb3dSCy Schubert  Versions: All NTP4 releases before 4.2.8
29992b15cb3dSCy Schubert  Date Resolved: Stable (4.2.8) 18 Dec 2014
30002b15cb3dSCy Schubert
30012b15cb3dSCy Schubert  Summary: Code in ntp_proto.c:receive() was missing a 'return;' in
30022b15cb3dSCy Schubert  	the code path where an error was detected, which meant
30032b15cb3dSCy Schubert	processing did not stop when a specific rare error occurred.
30042b15cb3dSCy Schubert	We haven't found a way for this bug to affect system integrity.
30052b15cb3dSCy Schubert	If there is no way to affect system integrity the base CVSS
30062b15cb3dSCy Schubert	score for this bug is 0. If there is one avenue through which
30072b15cb3dSCy Schubert	system integrity can be partially affected, the base score
30082b15cb3dSCy Schubert	becomes a 5. If system integrity can be partially affected
30092b15cb3dSCy Schubert	via all three integrity metrics, the CVSS base score become 7.5.
30102b15cb3dSCy Schubert
30112b15cb3dSCy Schubert  Mitigation - any of:
30122b15cb3dSCy Schubert        - Upgrade to 4.2.8, or later,
30132b15cb3dSCy Schubert        - Remove or comment out all configuration directives
30142b15cb3dSCy Schubert	  beginning with the crypto keyword in your ntp.conf file.
30152b15cb3dSCy Schubert
30162b15cb3dSCy Schubert  Credit: This vulnerability was discovered by Stephen Roettger of the
30172b15cb3dSCy Schubert  	Google Security Team.
30182b15cb3dSCy Schubert
30192b15cb3dSCy SchubertSee http://support.ntp.org/security for more information.
30202b15cb3dSCy Schubert
30212b15cb3dSCy SchubertNew features / changes in this release:
30222b15cb3dSCy Schubert
30232b15cb3dSCy SchubertImportant Changes
30242b15cb3dSCy Schubert
30252b15cb3dSCy Schubert* Internal NTP Era counters
30262b15cb3dSCy Schubert
30272b15cb3dSCy SchubertThe internal counters that track the "era" (range of years) we are in
30282b15cb3dSCy Schubertrolls over every 136 years'.  The current "era" started at the stroke of
30292b15cb3dSCy Schubertmidnight on 1 Jan 1900, and ends just before the stroke of midnight on
30302b15cb3dSCy Schubert1 Jan 2036.
30312b15cb3dSCy SchubertIn the past, we have used the "midpoint" of the  range to decide which
30322b15cb3dSCy Schubertera we were in.  Given the longevity of some products, it became clear
30332b15cb3dSCy Schubertthat it would be more functional to "look back" less, and "look forward"
30342b15cb3dSCy Schubertmore.  We now compile a timestamp into the ntpd executable and when we
30352b15cb3dSCy Schubertget a timestamp we us the "built-on" to tell us what era we are in.
30362b15cb3dSCy SchubertThis check "looks back" 10 years, and "looks forward" 126 years.
30372b15cb3dSCy Schubert
30382b15cb3dSCy Schubert* ntpdc responses disabled by default
30392b15cb3dSCy Schubert
30402b15cb3dSCy SchubertDave Hart writes:
30412b15cb3dSCy Schubert
30422b15cb3dSCy SchubertFor a long time, ntpq and its mostly text-based mode 6 (control)
30432b15cb3dSCy Schubertprotocol have been preferred over ntpdc and its mode 7 (private
30442b15cb3dSCy Schubertrequest) protocol for runtime queries and configuration.  There has
30452b15cb3dSCy Schubertbeen a goal of deprecating ntpdc, previously held back by numerous
30462b15cb3dSCy Schubertcapabilities exposed by ntpdc with no ntpq equivalent.  I have been
30472b15cb3dSCy Schubertadding commands to ntpq to cover these cases, and I believe I've
30482b15cb3dSCy Schubertcovered them all, though I've not compared command-by-command
30492b15cb3dSCy Schubertrecently.
30502b15cb3dSCy Schubert
30512b15cb3dSCy SchubertAs I've said previously, the binary mode 7 protocol involves a lot of
30522b15cb3dSCy Schuberthand-rolled structure layout and byte-swapping code in both ntpd and
30532b15cb3dSCy Schubertntpdc which is hard to get right.  As ntpd grows and changes, the
30542b15cb3dSCy Schubertchanges are difficult to expose via ntpdc while maintaining forward
30552b15cb3dSCy Schubertand backward compatibility between ntpdc and ntpd.  In contrast,
30562b15cb3dSCy Schubertntpq's text-based, label=value approach involves more code reuse and
30572b15cb3dSCy Schubertallows compatible changes without extra work in most cases.
30582b15cb3dSCy Schubert
30592b15cb3dSCy SchubertMode 7 has always been defined as vendor/implementation-specific while
30602b15cb3dSCy Schubertmode 6 is described in RFC 1305 and intended to be open to interoperate
30612b15cb3dSCy Schubertwith other implementations.  There is an early draft of an updated
30622b15cb3dSCy Schubertmode 6 description that likely will join the other NTPv4 RFCs
30632b15cb3dSCy Schuberteventually. (http://tools.ietf.org/html/draft-odonoghue-ntpv4-control-01)
30642b15cb3dSCy Schubert
30652b15cb3dSCy SchubertFor these reasons, ntpd 4.2.7p230 by default disables processing of
30662b15cb3dSCy Schubertntpdc queries, reducing ntpd's attack surface and functionally
30672b15cb3dSCy Schubertdeprecating ntpdc.  If you are in the habit of using ntpdc for certain
30682b15cb3dSCy Schubertoperations, please try the ntpq equivalent.  If there's no equivalent,
30692b15cb3dSCy Schubertplease open a bug report at http://bugs.ntp.org./
30702b15cb3dSCy Schubert
30712b15cb3dSCy SchubertIn addition to the above, over 1100 issues have been resolved between
30722b15cb3dSCy Schubertthe 4.2.6 branch and 4.2.8.  The ChangeLog file in the distribution
30732b15cb3dSCy Schubertlists these.
30742b15cb3dSCy Schubert
30752b15cb3dSCy Schubert---
30762b15cb3dSCy SchubertNTP 4.2.6p5 (Harlan Stenn <stenn@ntp.org>, 2011/12/24)
30772b15cb3dSCy Schubert
30782b15cb3dSCy SchubertFocus: Bug fixes
30792b15cb3dSCy Schubert
30802b15cb3dSCy SchubertSeverity: Medium
30812b15cb3dSCy Schubert
30822b15cb3dSCy SchubertThis is a recommended upgrade.
30832b15cb3dSCy Schubert
30842b15cb3dSCy SchubertThis release updates sys_rootdisp and sys_jitter calculations to match the
30852b15cb3dSCy SchubertRFC specification, fixes a potential IPv6 address matching error for the
30862b15cb3dSCy Schubert"nic" and "interface" configuration directives, suppresses the creation of
30872b15cb3dSCy Schubertextraneous ephemeral associations for certain broadcastclient and
30882b15cb3dSCy Schubertmulticastclient configurations, cleans up some ntpq display issues, and
30892b15cb3dSCy Schubertincludes improvements to orphan mode, minor bugs fixes and code clean-ups.
30902b15cb3dSCy Schubert
30912b15cb3dSCy SchubertNew features / changes in this release:
30922b15cb3dSCy Schubert
30932b15cb3dSCy Schubertntpd
30942b15cb3dSCy Schubert
30952b15cb3dSCy Schubert * Updated "nic" and "interface" IPv6 address handling to prevent
30962b15cb3dSCy Schubert   mismatches with localhost [::1] and wildcard [::] which resulted from
30972b15cb3dSCy Schubert   using the address/prefix format (e.g. fe80::/64)
30982b15cb3dSCy Schubert * Fix orphan mode stratum incorrectly counting to infinity
30992b15cb3dSCy Schubert * Orphan parent selection metric updated to includes missing ntohl()
31002b15cb3dSCy Schubert * Non-printable stratum 16 refid no longer sent to ntp
31012b15cb3dSCy Schubert * Duplicate ephemeral associations suppressed for broadcastclient and
31022b15cb3dSCy Schubert   multicastclient without broadcastdelay
31032b15cb3dSCy Schubert * Exclude undetermined sys_refid from use in loopback TEST12
31042b15cb3dSCy Schubert * Exclude MODE_SERVER responses from KoD rate limiting
31052b15cb3dSCy Schubert * Include root delay in clock_update() sys_rootdisp calculations
31062b15cb3dSCy Schubert * get_systime() updated to exclude sys_residual offset (which only
31072b15cb3dSCy Schubert   affected bits "below" sys_tick, the precision threshold)
31082b15cb3dSCy Schubert * sys.peer jitter weighting corrected in sys_jitter calculation
31092b15cb3dSCy Schubert
31102b15cb3dSCy Schubertntpq
31112b15cb3dSCy Schubert
31122b15cb3dSCy Schubert * -n option extended to include the billboard "server" column
31132b15cb3dSCy Schubert * IPv6 addresses in the local column truncated to prevent overruns
31142b15cb3dSCy Schubert
31152b15cb3dSCy Schubert---
31162b15cb3dSCy SchubertNTP 4.2.6p4 (Harlan Stenn <stenn@ntp.org>, 2011/09/22)
31172b15cb3dSCy Schubert
31182b15cb3dSCy SchubertFocus: Bug fixes and portability improvements
31192b15cb3dSCy Schubert
31202b15cb3dSCy SchubertSeverity: Medium
31212b15cb3dSCy Schubert
31222b15cb3dSCy SchubertThis is a recommended upgrade.
31232b15cb3dSCy Schubert
31242b15cb3dSCy SchubertThis release includes build infrastructure updates, code
31252b15cb3dSCy Schubertclean-ups, minor bug fixes, fixes for a number of minor
31262b15cb3dSCy Schubertref-clock issues, and documentation revisions.
31272b15cb3dSCy Schubert
31282b15cb3dSCy SchubertPortability improvements affect AIX, HP-UX, Linux, OS X and 64-bit time_t.
31292b15cb3dSCy Schubert
31302b15cb3dSCy SchubertNew features / changes in this release:
31312b15cb3dSCy Schubert
31322b15cb3dSCy SchubertBuild system
31332b15cb3dSCy Schubert
31342b15cb3dSCy Schubert* Fix checking for struct rtattr
31352b15cb3dSCy Schubert* Update config.guess and config.sub for AIX
31362b15cb3dSCy Schubert* Upgrade required version of autogen and libopts for building
31372b15cb3dSCy Schubert  from our source code repository
31382b15cb3dSCy Schubert
31392b15cb3dSCy Schubertntpd
31402b15cb3dSCy Schubert
31412b15cb3dSCy Schubert* Back-ported several fixes for Coverity warnings from ntp-dev
31422b15cb3dSCy Schubert* Fix a rare boundary condition in UNLINK_EXPR_SLIST()
31432b15cb3dSCy Schubert* Allow "logconfig =allall" configuration directive
31442b15cb3dSCy Schubert* Bind tentative IPv6 addresses on Linux
31452b15cb3dSCy Schubert* Correct WWVB/Spectracom driver to timestamp CR instead of LF
31462b15cb3dSCy Schubert* Improved tally bit handling to prevent incorrect ntpq peer status reports
31472b15cb3dSCy Schubert* Exclude the Undisciplined Local Clock and ACTS drivers from the initial
31482b15cb3dSCy Schubert  candidate list unless they are designated a "prefer peer"
31492b15cb3dSCy Schubert* Prevent the consideration of Undisciplined Local Clock or ACTS drivers for
31502b15cb3dSCy Schubert  selection during the 'tos orphanwait' period
31512b15cb3dSCy Schubert* Prefer an Orphan Mode Parent over the Undisciplined Local Clock or ACTS
31522b15cb3dSCy Schubert  drivers
31532b15cb3dSCy Schubert* Improved support of the Parse Refclock trusttime flag in Meinberg mode
31542b15cb3dSCy Schubert* Back-port utility routines from ntp-dev: mprintf(), emalloc_zero()
31552b15cb3dSCy Schubert* Added the NTPD_TICKADJ_PPM environment variable for specifying baseline
31562b15cb3dSCy Schubert  clock slew on Microsoft Windows
31572b15cb3dSCy Schubert* Code cleanup in libntpq
31582b15cb3dSCy Schubert
31592b15cb3dSCy Schubertntpdc
31602b15cb3dSCy Schubert
31612b15cb3dSCy Schubert* Fix timerstats reporting
31622b15cb3dSCy Schubert
31632b15cb3dSCy Schubertntpdate
31642b15cb3dSCy Schubert
31652b15cb3dSCy Schubert* Reduce time required to set clock
31662b15cb3dSCy Schubert* Allow a timeout greater than 2 seconds
31672b15cb3dSCy Schubert
31682b15cb3dSCy Schubertsntp
31692b15cb3dSCy Schubert
31702b15cb3dSCy Schubert* Backward incompatible command-line option change:
31712b15cb3dSCy Schubert  -l/--filelog changed -l/--logfile (to be consistent with ntpd)
31722b15cb3dSCy Schubert
31732b15cb3dSCy SchubertDocumentation
31742b15cb3dSCy Schubert
31752b15cb3dSCy Schubert* Update html2man. Fix some tags in the .html files
31762b15cb3dSCy Schubert* Distribute ntp-wait.html
31772b15cb3dSCy Schubert
31782b15cb3dSCy Schubert---
31792b15cb3dSCy SchubertNTP 4.2.6p3 (Harlan Stenn <stenn@ntp.org>, 2011/01/03)
31802b15cb3dSCy Schubert
31812b15cb3dSCy SchubertFocus: Bug fixes and portability improvements
31822b15cb3dSCy Schubert
31832b15cb3dSCy SchubertSeverity: Medium
31842b15cb3dSCy Schubert
31852b15cb3dSCy SchubertThis is a recommended upgrade.
31862b15cb3dSCy Schubert
31872b15cb3dSCy SchubertThis release includes build infrastructure updates, code
31882b15cb3dSCy Schubertclean-ups, minor bug fixes, fixes for a number of minor
31892b15cb3dSCy Schubertref-clock issues, and documentation revisions.
31902b15cb3dSCy Schubert
31912b15cb3dSCy SchubertPortability improvements in this release affect AIX, Atari FreeMiNT,
31922b15cb3dSCy SchubertFreeBSD4, Linux and Microsoft Windows.
31932b15cb3dSCy Schubert
31942b15cb3dSCy SchubertNew features / changes in this release:
31952b15cb3dSCy Schubert
31962b15cb3dSCy SchubertBuild system
31972b15cb3dSCy Schubert* Use lsb_release to get information about Linux distributions.
31982b15cb3dSCy Schubert* 'test' is in /usr/bin (instead of /bin) on some systems.
31992b15cb3dSCy Schubert* Basic sanity checks for the ChangeLog file.
32002b15cb3dSCy Schubert* Source certain build files with ./filename for systems without . in PATH.
32012b15cb3dSCy Schubert* IRIX portability fix.
32022b15cb3dSCy Schubert* Use a single copy of the "libopts" code.
32032b15cb3dSCy Schubert* autogen/libopts upgrade.
32042b15cb3dSCy Schubert* configure.ac m4 quoting cleanup.
32052b15cb3dSCy Schubert
32062b15cb3dSCy Schubertntpd
32072b15cb3dSCy Schubert* Do not bind to IN6_IFF_ANYCAST addresses.
32082b15cb3dSCy Schubert* Log the reason for exiting under Windows.
32092b15cb3dSCy Schubert* Multicast fixes for Windows.
32102b15cb3dSCy Schubert* Interpolation fixes for Windows.
32112b15cb3dSCy Schubert* IPv4 and IPv6 Multicast fixes.
32122b15cb3dSCy Schubert* Manycast solicitation fixes and general repairs.
32132b15cb3dSCy Schubert* JJY refclock cleanup.
32142b15cb3dSCy Schubert* NMEA refclock improvements.
32152b15cb3dSCy Schubert* Oncore debug message cleanup.
32162b15cb3dSCy Schubert* Palisade refclock now builds under Linux.
32172b15cb3dSCy Schubert* Give RAWDCF more baud rates.
32182b15cb3dSCy Schubert* Support Truetime Satellite clocks under Windows.
32192b15cb3dSCy Schubert* Support Arbiter 1093C Satellite clocks under Windows.
32202b15cb3dSCy Schubert* Make sure that the "filegen" configuration command defaults to "enable".
32212b15cb3dSCy Schubert* Range-check the status codes (plus other cleanup) in the RIPE-NCC driver.
32222b15cb3dSCy Schubert* Prohibit 'includefile' directive in remote configuration command.
32232b15cb3dSCy Schubert* Fix 'nic' interface bindings.
32242b15cb3dSCy Schubert* Fix the way we link with openssl if openssl is installed in the base
32252b15cb3dSCy Schubert  system.
32262b15cb3dSCy Schubert
32272b15cb3dSCy Schubertntp-keygen
32282b15cb3dSCy Schubert* Fix -V coredump.
32292b15cb3dSCy Schubert* OpenSSL version display cleanup.
32302b15cb3dSCy Schubert
32312b15cb3dSCy Schubertntpdc
32322b15cb3dSCy Schubert* Many counters should be treated as unsigned.
32332b15cb3dSCy Schubert
32342b15cb3dSCy Schubertntpdate
32352b15cb3dSCy Schubert* Do not ignore replies with equal receive and transmit timestamps.
32362b15cb3dSCy Schubert
32372b15cb3dSCy Schubertntpq
32382b15cb3dSCy Schubert* libntpq warning cleanup.
32392b15cb3dSCy Schubert
32402b15cb3dSCy Schubertntpsnmpd
32412b15cb3dSCy Schubert* Correct SNMP type for "precision" and "resolution".
32422b15cb3dSCy Schubert* Update the MIB from the draft version to RFC-5907.
32432b15cb3dSCy Schubert
32442b15cb3dSCy Schubertsntp
32452b15cb3dSCy Schubert* Display timezone offset when showing time for sntp in the local
32462b15cb3dSCy Schubert  timezone.
32472b15cb3dSCy Schubert* Pay proper attention to RATE KoD packets.
32482b15cb3dSCy Schubert* Fix a miscalculation of the offset.
32492b15cb3dSCy Schubert* Properly parse empty lines in the key file.
32502b15cb3dSCy Schubert* Logging cleanup.
32512b15cb3dSCy Schubert* Use tv_usec correctly in set_time().
32522b15cb3dSCy Schubert* Documentation cleanup.
32532b15cb3dSCy Schubert
32542b15cb3dSCy Schubert---
32552b15cb3dSCy SchubertNTP 4.2.6p2 (Harlan Stenn <stenn@ntp.org>, 2010/07/08)
32562b15cb3dSCy Schubert
32572b15cb3dSCy SchubertFocus: Bug fixes and portability improvements
32582b15cb3dSCy Schubert
32592b15cb3dSCy SchubertSeverity: Medium
32602b15cb3dSCy Schubert
32612b15cb3dSCy SchubertThis is a recommended upgrade.
32622b15cb3dSCy Schubert
32632b15cb3dSCy SchubertThis release includes build infrastructure updates, code
32642b15cb3dSCy Schubertclean-ups, minor bug fixes, fixes for a number of minor
32652b15cb3dSCy Schubertref-clock issues, improved KOD handling, OpenSSL related
32662b15cb3dSCy Schubertupdates and documentation revisions.
32672b15cb3dSCy Schubert
32682b15cb3dSCy SchubertPortability improvements in this release affect Irix, Linux,
32692b15cb3dSCy SchubertMac OS, Microsoft Windows, OpenBSD and QNX6
32702b15cb3dSCy Schubert
32712b15cb3dSCy SchubertNew features / changes in this release:
32722b15cb3dSCy Schubert
32732b15cb3dSCy Schubertntpd
32742b15cb3dSCy Schubert* Range syntax for the trustedkey configuration directive
32752b15cb3dSCy Schubert* Unified IPv4 and IPv6 restrict lists
32762b15cb3dSCy Schubert
32772b15cb3dSCy Schubertntpdate
32782b15cb3dSCy Schubert* Rate limiting and KOD handling
32792b15cb3dSCy Schubert
32802b15cb3dSCy Schubertntpsnmpd
32812b15cb3dSCy Schubert* default connection to net-snmpd via a unix-domain socket
32822b15cb3dSCy Schubert* command-line 'socket name' option
32832b15cb3dSCy Schubert
32842b15cb3dSCy Schubertntpq / ntpdc
32852b15cb3dSCy Schubert* support for the "passwd ..." syntax
32862b15cb3dSCy Schubert* key-type specific password prompts
32872b15cb3dSCy Schubert
32882b15cb3dSCy Schubertsntp
32892b15cb3dSCy Schubert* MD5 authentication of an ntpd
32902b15cb3dSCy Schubert* Broadcast and crypto
32912b15cb3dSCy Schubert* OpenSSL support
32922b15cb3dSCy Schubert
32932b15cb3dSCy Schubert---
32942b15cb3dSCy SchubertNTP 4.2.6p1 (Harlan Stenn <stenn@ntp.org>, 2010/04/09)
32952b15cb3dSCy Schubert
32962b15cb3dSCy SchubertFocus: Bug fixes, portability fixes, and documentation improvements
32972b15cb3dSCy Schubert
32982b15cb3dSCy SchubertSeverity: Medium
32992b15cb3dSCy Schubert
33002b15cb3dSCy SchubertThis is a recommended upgrade.
33012b15cb3dSCy Schubert
33022b15cb3dSCy Schubert---
33032b15cb3dSCy SchubertNTP 4.2.6 (Harlan Stenn <stenn@ntp.org>, 2009/12/08)
33042b15cb3dSCy Schubert
33052b15cb3dSCy SchubertFocus: enhancements and bug fixes.
33062b15cb3dSCy Schubert
33072b15cb3dSCy Schubert---
3308eb6d21b4SOllivier RobertNTP 4.2.4p8 (Harlan Stenn <stenn@ntp.org>, 2009/12/08)
3309eb6d21b4SOllivier Robert
3310eb6d21b4SOllivier RobertFocus: Security Fixes
3311eb6d21b4SOllivier Robert
3312eb6d21b4SOllivier RobertSeverity: HIGH
3313eb6d21b4SOllivier Robert
3314eb6d21b4SOllivier RobertThis release fixes the following high-severity vulnerability:
3315eb6d21b4SOllivier Robert
3316eb6d21b4SOllivier Robert* [Sec 1331] DoS with mode 7 packets - CVE-2009-3563.
3317eb6d21b4SOllivier Robert
3318eb6d21b4SOllivier Robert  See http://support.ntp.org/security for more information.
3319eb6d21b4SOllivier Robert
3320eb6d21b4SOllivier Robert  NTP mode 7 (MODE_PRIVATE) is used by the ntpdc query and control utility.
3321eb6d21b4SOllivier Robert  In contrast, ntpq uses NTP mode 6 (MODE_CONTROL), while routine NTP time
3322eb6d21b4SOllivier Robert  transfers use modes 1 through 5.  Upon receipt of an incorrect mode 7
3323eb6d21b4SOllivier Robert  request or a mode 7 error response from an address which is not listed
3324eb6d21b4SOllivier Robert  in a "restrict ... noquery" or "restrict ... ignore" statement, ntpd will
3325eb6d21b4SOllivier Robert  reply with a mode 7 error response (and log a message).  In this case:
3326eb6d21b4SOllivier Robert
3327eb6d21b4SOllivier Robert	* If an attacker spoofs the source address of ntpd host A in a
3328eb6d21b4SOllivier Robert	  mode 7 response packet sent to ntpd host B, both A and B will
3329eb6d21b4SOllivier Robert	  continuously send each other error responses, for as long as
3330eb6d21b4SOllivier Robert	  those packets get through.
3331eb6d21b4SOllivier Robert
3332eb6d21b4SOllivier Robert	* If an attacker spoofs an address of ntpd host A in a mode 7
3333eb6d21b4SOllivier Robert	  response packet sent to ntpd host A, A will respond to itself
3334eb6d21b4SOllivier Robert	  endlessly, consuming CPU and logging excessively.
3335eb6d21b4SOllivier Robert
3336eb6d21b4SOllivier Robert  Credit for finding this vulnerability goes to Robin Park and Dmitri
3337eb6d21b4SOllivier Robert  Vinokurov of Alcatel-Lucent.
3338eb6d21b4SOllivier Robert
3339eb6d21b4SOllivier RobertTHIS IS A STRONGLY RECOMMENDED UPGRADE.
3340eb6d21b4SOllivier Robert
3341eb6d21b4SOllivier Robert---
33422b15cb3dSCy Schubertntpd now syncs to refclocks right away.
33432b15cb3dSCy Schubert
33442b15cb3dSCy SchubertBackward-Incompatible changes:
33452b15cb3dSCy Schubert
33462b15cb3dSCy Schubertntpd no longer accepts '-v name' or '-V name' to define internal variables.
33472b15cb3dSCy SchubertUse '--var name' or '--dvar name' instead. (Bug 817)
33482b15cb3dSCy Schubert
33492b15cb3dSCy Schubert---
3350eb6d21b4SOllivier RobertNTP 4.2.4p7 (Harlan Stenn <stenn@ntp.org>, 2009/05/04)
3351eb6d21b4SOllivier Robert
3352eb6d21b4SOllivier RobertFocus: Security and Bug Fixes
3353eb6d21b4SOllivier Robert
3354eb6d21b4SOllivier RobertSeverity: HIGH
3355eb6d21b4SOllivier Robert
3356eb6d21b4SOllivier RobertThis release fixes the following high-severity vulnerability:
3357eb6d21b4SOllivier Robert
3358eb6d21b4SOllivier Robert* [Sec 1151] Remote exploit if autokey is enabled.  CVE-2009-1252
3359eb6d21b4SOllivier Robert
3360eb6d21b4SOllivier Robert  See http://support.ntp.org/security for more information.
3361eb6d21b4SOllivier Robert
3362eb6d21b4SOllivier Robert  If autokey is enabled (if ntp.conf contains a "crypto pw whatever"
3363eb6d21b4SOllivier Robert  line) then a carefully crafted packet sent to the machine will cause
3364eb6d21b4SOllivier Robert  a buffer overflow and possible execution of injected code, running
3365eb6d21b4SOllivier Robert  with the privileges of the ntpd process (often root).
3366eb6d21b4SOllivier Robert
3367eb6d21b4SOllivier Robert  Credit for finding this vulnerability goes to Chris Ries of CMU.
3368eb6d21b4SOllivier Robert
3369eb6d21b4SOllivier RobertThis release fixes the following low-severity vulnerabilities:
3370eb6d21b4SOllivier Robert
3371eb6d21b4SOllivier Robert* [Sec 1144] limited (two byte) buffer overflow in ntpq.  CVE-2009-0159
3372eb6d21b4SOllivier Robert  Credit for finding this vulnerability goes to Geoff Keating of Apple.
3373eb6d21b4SOllivier Robert
3374eb6d21b4SOllivier Robert* [Sec 1149] use SO_EXCLUSIVEADDRUSE on Windows
3375eb6d21b4SOllivier Robert  Credit for finding this issue goes to Dave Hart.
3376eb6d21b4SOllivier Robert
3377eb6d21b4SOllivier RobertThis release fixes a number of bugs and adds some improvements:
3378eb6d21b4SOllivier Robert
3379eb6d21b4SOllivier Robert* Improved logging
3380eb6d21b4SOllivier Robert* Fix many compiler warnings
3381eb6d21b4SOllivier Robert* Many fixes and improvements for Windows
3382eb6d21b4SOllivier Robert* Adds support for AIX 6.1
3383eb6d21b4SOllivier Robert* Resolves some issues under MacOS X and Solaris
3384eb6d21b4SOllivier Robert
3385eb6d21b4SOllivier RobertTHIS IS A STRONGLY RECOMMENDED UPGRADE.
3386eb6d21b4SOllivier Robert
3387eb6d21b4SOllivier Robert---
3388eb6d21b4SOllivier RobertNTP 4.2.4p6 (Harlan Stenn <stenn@ntp.org>, 2009/01/07)
3389eb6d21b4SOllivier Robert
3390eb6d21b4SOllivier RobertFocus: Security Fix
3391eb6d21b4SOllivier Robert
3392eb6d21b4SOllivier RobertSeverity: Low
3393eb6d21b4SOllivier Robert
3394eb6d21b4SOllivier RobertThis release fixes oCERT.org's CVE-2009-0021, a vulnerability affecting
3395eb6d21b4SOllivier Robertthe OpenSSL library relating to the incorrect checking of the return
3396eb6d21b4SOllivier Robertvalue of EVP_VerifyFinal function.
3397eb6d21b4SOllivier Robert
3398eb6d21b4SOllivier RobertCredit for finding this issue goes to the Google Security Team for
3399eb6d21b4SOllivier Robertfinding the original issue with OpenSSL, and to ocert.org for finding
3400eb6d21b4SOllivier Robertthe problem in NTP and telling us about it.
3401eb6d21b4SOllivier Robert
3402eb6d21b4SOllivier RobertThis is a recommended upgrade.
3403eb6d21b4SOllivier Robert---
3404ea906c41SOllivier RobertNTP 4.2.4p5 (Harlan Stenn <stenn@ntp.org>, 2008/08/17)
3405ea906c41SOllivier Robert
3406ea906c41SOllivier RobertFocus: Minor Bugfixes
3407ea906c41SOllivier Robert
3408ea906c41SOllivier RobertThis release fixes a number of Windows-specific ntpd bugs and
3409ea906c41SOllivier Robertplatform-independent ntpdate bugs. A logging bugfix has been applied
3410ea906c41SOllivier Robertto the ONCORE driver.
3411ea906c41SOllivier Robert
3412ea906c41SOllivier RobertThe "dynamic" keyword and is now obsolete and deferred binding to local
3413ea906c41SOllivier Robertinterfaces is the new default. The minimum time restriction for the
3414ea906c41SOllivier Robertinterface update interval has been dropped.
3415ea906c41SOllivier Robert
3416ea906c41SOllivier RobertA number of minor build system and documentation fixes are included.
3417ea906c41SOllivier Robert
3418ea906c41SOllivier RobertThis is a recommended upgrade for Windows.
3419ea906c41SOllivier Robert
3420ea906c41SOllivier Robert---
3421ea906c41SOllivier RobertNTP 4.2.4p4 (Harlan Stenn <stenn@ntp.org>, 2007/09/10)
3422ea906c41SOllivier Robert
3423ea906c41SOllivier RobertFocus: Minor Bugfixes
3424ea906c41SOllivier Robert
3425ea906c41SOllivier RobertThis release updates certain copyright information, fixes several display
3426ea906c41SOllivier Robertbugs in ntpdc, avoids SIGIO interrupting malloc(), cleans up file descriptor
3427ea906c41SOllivier Robertshutdown in the parse refclock driver, removes some lint from the code,
3428ea906c41SOllivier Robertstops accessing certain buffers immediately after they were freed, fixes
3429ea906c41SOllivier Roberta problem with non-command-line specification of -6, and allows the loopback
3430ea906c41SOllivier Robertinterface to share addresses with other interfaces.
3431ea906c41SOllivier Robert
3432ea906c41SOllivier Robert---
3433ea906c41SOllivier RobertNTP 4.2.4p3 (Harlan Stenn <stenn@ntp.org>, 2007/06/29)
3434ea906c41SOllivier Robert
3435ea906c41SOllivier RobertFocus: Minor Bugfixes
3436ea906c41SOllivier Robert
3437ea906c41SOllivier RobertThis release fixes a bug in Windows that made it difficult to
3438ea906c41SOllivier Robertterminate ntpd under windows.
3439ea906c41SOllivier RobertThis is a recommended upgrade for Windows.
3440ea906c41SOllivier Robert
3441ea906c41SOllivier Robert---
3442ea906c41SOllivier RobertNTP 4.2.4p2 (Harlan Stenn <stenn@ntp.org>, 2007/06/19)
3443ea906c41SOllivier Robert
3444ea906c41SOllivier RobertFocus: Minor Bugfixes
3445ea906c41SOllivier Robert
3446ea906c41SOllivier RobertThis release fixes a multicast mode authentication problem,
3447ea906c41SOllivier Robertan error in NTP packet handling on Windows that could lead to
3448ea906c41SOllivier Robertntpd crashing, and several other minor bugs. Handling of
3449ea906c41SOllivier Robertmulticast interfaces and logging configuration were improved.
3450ea906c41SOllivier RobertThe required versions of autogen and libopts were incremented.
3451ea906c41SOllivier RobertThis is a recommended upgrade for Windows and multicast users.
3452ea906c41SOllivier Robert
3453ea906c41SOllivier Robert---
3454ea906c41SOllivier RobertNTP 4.2.4 (Harlan Stenn <stenn@ntp.org>, 2006/12/31)
3455ea906c41SOllivier Robert
3456ea906c41SOllivier RobertFocus: enhancements and bug fixes.
3457ea906c41SOllivier Robert
3458ea906c41SOllivier RobertDynamic interface rescanning was added to simplify the use of ntpd in
3459ea906c41SOllivier Robertconjunction with DHCP. GNU AutoGen is used for its command-line options
3460ea906c41SOllivier Robertprocessing. Separate PPS devices are supported for PARSE refclocks, MD5
3461ea906c41SOllivier Robertsignatures are now provided for the release files. Drivers have been
3462ea906c41SOllivier Robertadded for some new ref-clocks and have been removed for some older
3463ea906c41SOllivier Robertref-clocks. This release also includes other improvements, documentation
3464ea906c41SOllivier Robertand bug fixes.
3465ea906c41SOllivier Robert
3466ea906c41SOllivier RobertK&R C is no longer supported as of NTP-4.2.4. We are now aiming for ANSI
3467ea906c41SOllivier RobertC support.
3468ea906c41SOllivier Robert
3469ea906c41SOllivier Robert---
3470ea906c41SOllivier RobertNTP 4.2.0 (Harlan Stenn <stenn@ntp.org>, 2003/10/15)
3471ea906c41SOllivier Robert
3472ea906c41SOllivier RobertFocus: enhancements and bug fixes.
3473