xref: /freebsd/contrib/ntp/NEWS (revision f0574f5cf69e168cc4ea71ebbe5fdec9ec9a3dfe)
1*f0574f5cSXin LI--
2*f0574f5cSXin LINTP 4.2.8p10 (Harlan Stenn <stenn@ntp.org>, 2017/03/21)
3*f0574f5cSXin LI
4*f0574f5cSXin LIFocus: Security, Bug fixes, enhancements.
5*f0574f5cSXin LI
6*f0574f5cSXin LISeverity: MEDIUM
7*f0574f5cSXin LI
8*f0574f5cSXin LIThis release fixes 5 medium-, 6 low-, and 4 informational-severity
9*f0574f5cSXin LIvulnerabilities, and provides 15 other non-security fixes and improvements:
10*f0574f5cSXin LI
11*f0574f5cSXin LI* NTP-01-016 NTP: Denial of Service via Malformed Config (Medium)
12*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
13*f0574f5cSXin LI   References: Sec 3389 / CVE-2017-6464 / VU#325339
14*f0574f5cSXin LI   Affects: All versions of NTP-4, up to but not including ntp-4.2.8p10, and
15*f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
16*f0574f5cSXin LI   CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C)
17*f0574f5cSXin LI   CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
18*f0574f5cSXin LI   Summary:
19*f0574f5cSXin LI	A vulnerability found in the NTP server makes it possible for an
20*f0574f5cSXin LI	authenticated remote user to crash ntpd via a malformed mode
21*f0574f5cSXin LI	configuration directive.
22*f0574f5cSXin LI   Mitigation:
23*f0574f5cSXin LI	Implement BCP-38.
24*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page or
25*f0574f5cSXin LI	    the NTP Public Services Project Download Page
26*f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
27*f0574f5cSXin LI	    ntpd (without -g) if it stops running.
28*f0574f5cSXin LI   Credit:
29*f0574f5cSXin LI	This weakness was discovered by Cure53.
30*f0574f5cSXin LI
31*f0574f5cSXin LI* NTP-01-014 NTP: Buffer Overflow in DPTS Clock (Low)
32*f0574f5cSXin LI    Date Resolved: 21 Mar 2017
33*f0574f5cSXin LI    References: Sec 3388 / CVE-2017-6462 / VU#325339
34*f0574f5cSXin 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.
35*f0574f5cSXin LI    CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
36*f0574f5cSXin LI    CVSS3: Low 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
37*f0574f5cSXin LI    Summary:
38*f0574f5cSXin LI	There is a potential for a buffer overflow in the legacy Datum
39*f0574f5cSXin LI	Programmable Time Server refclock driver.  Here the packets are
40*f0574f5cSXin LI	processed from the /dev/datum device and handled in
41*f0574f5cSXin LI	datum_pts_receive().  Since an attacker would be required to
42*f0574f5cSXin LI	somehow control a malicious /dev/datum device, this does not
43*f0574f5cSXin LI	appear to be a practical attack and renders this issue "Low" in
44*f0574f5cSXin LI	terms of severity.
45*f0574f5cSXin LI   Mitigation:
46*f0574f5cSXin LI	If you have a Datum reference clock installed and think somebody
47*f0574f5cSXin LI	    may maliciously change the device, upgrade to 4.2.8p10, or
48*f0574f5cSXin LI	    later, from the NTP Project Download Page or the NTP Public
49*f0574f5cSXin LI	    Services Project Download Page
50*f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
51*f0574f5cSXin LI	    ntpd (without -g) if it stops running.
52*f0574f5cSXin LI   Credit:
53*f0574f5cSXin LI	This weakness was discovered by Cure53.
54*f0574f5cSXin LI
55*f0574f5cSXin LI* NTP-01-012 NTP: Authenticated DoS via Malicious Config Option (Medium)
56*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
57*f0574f5cSXin LI   References: Sec 3387 / CVE-2017-6463 / VU#325339
58*f0574f5cSXin LI   Affects: All versions of ntp, up to but not including ntp-4.2.8p10, and
59*f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
60*f0574f5cSXin LI   CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C)
61*f0574f5cSXin LI   CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
62*f0574f5cSXin LI   Summary:
63*f0574f5cSXin LI	A vulnerability found in the NTP server allows an authenticated
64*f0574f5cSXin LI	remote attacker to crash the daemon by sending an invalid setting
65*f0574f5cSXin LI	via the :config directive.  The unpeer option expects a number or
66*f0574f5cSXin LI	an address as an argument.  In case the value is "0", a
67*f0574f5cSXin LI	segmentation fault occurs.
68*f0574f5cSXin LI   Mitigation:
69*f0574f5cSXin LI	Implement BCP-38.
70*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
71*f0574f5cSXin LI	    or the NTP Public Services Project Download Page
72*f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
73*f0574f5cSXin LI	    ntpd (without -g) if it stops running.
74*f0574f5cSXin LI   Credit:
75*f0574f5cSXin LI	This weakness was discovered by Cure53.
76*f0574f5cSXin LI
77*f0574f5cSXin LI* NTP-01-011 NTP: ntpq_stripquotes() returns incorrect value (Informational)
78*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
79*f0574f5cSXin LI   References: Sec 3386
80*f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
81*f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
82*f0574f5cSXin LI   CVSS2: None 0.0 (AV:N/AC:H/Au:N/C:N/I:N/A:N)
83*f0574f5cSXin LI   CVSS3: None 0.0 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:N
84*f0574f5cSXin LI   Summary:
85*f0574f5cSXin LI	The NTP Mode 6 monitoring and control client, ntpq, uses the
86*f0574f5cSXin LI	function ntpq_stripquotes() to remove quotes and escape characters
87*f0574f5cSXin LI	from a given string.  According to the documentation, the function
88*f0574f5cSXin LI	is supposed to return the number of copied bytes but due to
89*f0574f5cSXin LI	incorrect pointer usage this value is always zero.  Although the
90*f0574f5cSXin LI	return value of this function is never used in the code, this
91*f0574f5cSXin LI	flaw could lead to a vulnerability in the future.  Since relying
92*f0574f5cSXin LI	on wrong return values when performing memory operations is a
93*f0574f5cSXin LI	dangerous practice, it is recommended to return the correct value
94*f0574f5cSXin LI	in accordance with the documentation pertinent to the code.
95*f0574f5cSXin LI   Mitigation:
96*f0574f5cSXin LI	Implement BCP-38.
97*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
98*f0574f5cSXin LI	    or the NTP Public Services Project Download Page
99*f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
100*f0574f5cSXin LI	    ntpd (without -g) if it stops running.
101*f0574f5cSXin LI   Credit:
102*f0574f5cSXin LI	This weakness was discovered by Cure53.
103*f0574f5cSXin LI
104*f0574f5cSXin LI* NTP-01-010 NTP: ereallocarray()/eallocarray() underused (Info)
105*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
106*f0574f5cSXin LI   References: Sec 3385
107*f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
108*f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
109*f0574f5cSXin LI   Summary:
110*f0574f5cSXin LI	NTP makes use of several wrappers around the standard heap memory
111*f0574f5cSXin LI	allocation functions that are provided by libc.  This is mainly
112*f0574f5cSXin LI	done to introduce additional safety checks concentrated on
113*f0574f5cSXin LI	several goals.  First, they seek to ensure that memory is not
114*f0574f5cSXin LI	accidentally freed, secondly they verify that a correct amount
115*f0574f5cSXin LI	is always allocated and, thirdly, that allocation failures are
116*f0574f5cSXin LI	correctly handled.  There is an additional implementation for
117*f0574f5cSXin LI	scenarios where memory for a specific amount of items of the
118*f0574f5cSXin LI	same size needs to be allocated.  The handling can be found in
119*f0574f5cSXin LI	the oreallocarray() function for which a further number-of-elements
120*f0574f5cSXin LI	parameter needs to be provided.  Although no considerable threat
121*f0574f5cSXin LI	was identified as tied to a lack of use of this function, it is
122*f0574f5cSXin LI	recommended to correctly apply oreallocarray() as a preferred
123*f0574f5cSXin LI	option across all of the locations where it is possible.
124*f0574f5cSXin LI   Mitigation:
125*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
126*f0574f5cSXin LI	    or the NTP Public Services Project Download Page
127*f0574f5cSXin LI   Credit:
128*f0574f5cSXin LI	This weakness was discovered by Cure53.
129*f0574f5cSXin LI
130*f0574f5cSXin LI* NTP-01-009 NTP: Privileged execution of User Library code (WINDOWS
131*f0574f5cSXin LI	PPSAPI ONLY) (Low)
132*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
133*f0574f5cSXin LI   References: Sec 3384 / CVE-2017-6455 / VU#325339
134*f0574f5cSXin LI   Affects: All Windows versions of ntp-4 that use the PPSAPI, up to but
135*f0574f5cSXin LI	not including ntp-4.2.8p10, and ntp-4.3.0 up to, but not
136*f0574f5cSXin LI	including ntp-4.3.94.
137*f0574f5cSXin LI   CVSS2: MED 3.8 (AV:L/AC:H/Au:S/C:N/I:N/A:C)
138*f0574f5cSXin LI   CVSS3: MED 4.0 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
139*f0574f5cSXin LI   Summary:
140*f0574f5cSXin LI	The Windows NT port has the added capability to preload DLLs
141*f0574f5cSXin LI	defined in the inherited global local environment variable
142*f0574f5cSXin LI	PPSAPI_DLLS.  The code contained within those libraries is then
143*f0574f5cSXin LI	called from the NTPD service, usually running with elevated
144*f0574f5cSXin LI	privileges. Depending on how securely the machine is setup and
145*f0574f5cSXin LI	configured, if ntpd is configured to use the PPSAPI under Windows
146*f0574f5cSXin LI	this can easily lead to a code injection.
147*f0574f5cSXin LI   Mitigation:
148*f0574f5cSXin LI	Implement BCP-38.
149*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
150*f0574f5cSXin LI	    or the NTP Public Services Project Download Page
151*f0574f5cSXin LI   Credit:
152*f0574f5cSXin LI   This weakness was discovered by Cure53.
153*f0574f5cSXin LI
154*f0574f5cSXin LI* NTP-01-008 NTP: Stack Buffer Overflow from Command Line (WINDOWS
155*f0574f5cSXin LI	installer ONLY) (Low)
156*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
157*f0574f5cSXin LI   References: Sec 3383 / CVE-2017-6452 / VU#325339
158*f0574f5cSXin LI   Affects: WINDOWS installer ONLY: All versions of the ntp-4 Windows
159*f0574f5cSXin LI	installer, up to but not including ntp-4.2.8p10, and ntp-4.3.0 up
160*f0574f5cSXin LI	to, but not including ntp-4.3.94.
161*f0574f5cSXin LI   CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
162*f0574f5cSXin LI   CVSS3: Low 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
163*f0574f5cSXin LI   Summary:
164*f0574f5cSXin LI	The Windows installer for NTP calls strcat(), blindly appending
165*f0574f5cSXin LI	the string passed to the stack buffer in the addSourceToRegistry()
166*f0574f5cSXin LI	function.  The stack buffer is 70 bytes smaller than the buffer
167*f0574f5cSXin LI	in the calling main() function.  Together with the initially
168*f0574f5cSXin LI	copied Registry path, the combination causes a stack buffer
169*f0574f5cSXin LI	overflow and effectively overwrites the stack frame.  The
170*f0574f5cSXin LI	passed application path is actually limited to 256 bytes by the
171*f0574f5cSXin LI	operating system, but this is not sufficient to assure that the
172*f0574f5cSXin LI	affected stack buffer is consistently protected against
173*f0574f5cSXin LI	overflowing at all times.
174*f0574f5cSXin LI   Mitigation:
175*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
176*f0574f5cSXin LI	or the NTP Public Services Project Download Page
177*f0574f5cSXin LI   Credit:
178*f0574f5cSXin LI	This weakness was discovered by Cure53.
179*f0574f5cSXin LI
180*f0574f5cSXin LI* NTP-01-007 NTP: Data Structure terminated insufficiently (WINDOWS
181*f0574f5cSXin LI	installer ONLY) (Low)
182*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
183*f0574f5cSXin LI   References: Sec 3382 / CVE-2017-6459 / VU#325339
184*f0574f5cSXin LI   Affects: WINDOWS installer ONLY: All ntp-4 versions of the Windows
185*f0574f5cSXin LI	installer, up to but not including ntp-4.2.8p10, and ntp-4.3.0
186*f0574f5cSXin LI	up to, but not including ntp-4.3.94.
187*f0574f5cSXin LI   CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
188*f0574f5cSXin LI   CVSS3: Low 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
189*f0574f5cSXin LI   Summary:
190*f0574f5cSXin LI	The Windows installer for NTP calls strcpy() with an argument
191*f0574f5cSXin LI	that specifically contains multiple null bytes.  strcpy() only
192*f0574f5cSXin LI	copies a single terminating null character into the target
193*f0574f5cSXin LI	buffer instead of copying the required double null bytes in the
194*f0574f5cSXin LI	addKeysToRegistry() function.  As a consequence, a garbage
195*f0574f5cSXin LI	registry entry can be created.  The additional arsize parameter
196*f0574f5cSXin LI	is erroneously set to contain two null bytes and the following
197*f0574f5cSXin LI	call to RegSetValueEx() claims to be passing in a multi-string
198*f0574f5cSXin LI	value, though this may not be true.
199*f0574f5cSXin LI   Mitigation:
200*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
201*f0574f5cSXin LI	    or the NTP Public Services Project Download Page
202*f0574f5cSXin LI   Credit:
203*f0574f5cSXin LI	This weakness was discovered by Cure53.
204*f0574f5cSXin LI
205*f0574f5cSXin LI* NTP-01-006 NTP: Copious amounts of Unused Code (Informational)
206*f0574f5cSXin LI   References: Sec 3381
207*f0574f5cSXin LI   Summary:
208*f0574f5cSXin LI	The report says: Statically included external projects
209*f0574f5cSXin LI	potentially introduce several problems and the issue of having
210*f0574f5cSXin LI	extensive amounts of code that is "dead" in the resulting binary
211*f0574f5cSXin LI	must clearly be pointed out.  The unnecessary unused code may or
212*f0574f5cSXin LI	may not contain bugs and, quite possibly, might be leveraged for
213*f0574f5cSXin LI	code-gadget-based branch-flow redirection exploits.  Analogically,
214*f0574f5cSXin LI	having source trees statically included as well means a failure
215*f0574f5cSXin LI	in taking advantage of the free feature for periodical updates.
216*f0574f5cSXin LI	This solution is offered by the system's Package Manager. The
217*f0574f5cSXin LI	three libraries identified are libisc, libevent, and libopts.
218*f0574f5cSXin LI   Resolution:
219*f0574f5cSXin LI	For libisc, we already only use a portion of the original library.
220*f0574f5cSXin LI	We've found and fixed bugs in the original implementation (and
221*f0574f5cSXin LI	offered the patches to ISC), and plan to see what has changed
222*f0574f5cSXin LI	since we last upgraded the code.  libisc is generally not
223*f0574f5cSXin LI	installed, and when it it we usually only see the static libisc.a
224*f0574f5cSXin LI	file installed.  Until we know for sure that the bugs we've found
225*f0574f5cSXin LI	and fixed are fixed upstream, we're better off with the copy we
226*f0574f5cSXin LI	are using.
227*f0574f5cSXin LI
228*f0574f5cSXin LI        Version 1 of libevent was the only production version available
229*f0574f5cSXin LI	until recently, and we've been requiring version 2 for a long time.
230*f0574f5cSXin LI	But if the build system has at least version 2 of libevent
231*f0574f5cSXin LI	installed, we'll use the version that is installed on the system.
232*f0574f5cSXin LI	Otherwise, we provide a copy of libevent that we know works.
233*f0574f5cSXin LI
234*f0574f5cSXin LI        libopts is provided by GNU AutoGen, and that library and package
235*f0574f5cSXin LI	undergoes frequent API version updates.  The version of autogen
236*f0574f5cSXin LI	used to generate the tables for the code must match the API
237*f0574f5cSXin LI	version in libopts.  AutoGen can be ... difficult to build and
238*f0574f5cSXin LI	install, and very few developers really need it.  So we have it
239*f0574f5cSXin LI	on our build and development machines, and we provide the
240*f0574f5cSXin LI	specific version of the libopts code in the distribution to make
241*f0574f5cSXin LI	sure that the proper API version of libopts is available.
242*f0574f5cSXin LI
243*f0574f5cSXin LI        As for the point about there being code in these libraries that
244*f0574f5cSXin LI	NTP doesn't use, OK.  But other packages used these libraries as
245*f0574f5cSXin LI	well, and it is reasonable to assume that other people are paying
246*f0574f5cSXin LI	attention to security and code quality issues for the overall
247*f0574f5cSXin LI	libraries.  It takes significant resources to analyze and
248*f0574f5cSXin LI	customize these libraries to only include what we need, and to
249*f0574f5cSXin LI	date we believe the cost of this effort does not justify the benefit.
250*f0574f5cSXin LI   Credit:
251*f0574f5cSXin LI	This issue was discovered by Cure53.
252*f0574f5cSXin LI
253*f0574f5cSXin LI* NTP-01-005 NTP: Off-by-one in Oncore GPS Receiver (Low)
254*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
255*f0574f5cSXin LI   References: Sec 3380
256*f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
257*f0574f5cSXin LI   	ntp-4.3.0 up to, but not including ntp-4.3.94.
258*f0574f5cSXin LI   CVSS2: None 0.0 (AV:L/AC:H/Au:N/C:N/I:N/A:N)
259*f0574f5cSXin LI   CVSS3: None 0.0 CVSS:3.0/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:N
260*f0574f5cSXin LI   Summary:
261*f0574f5cSXin LI	There is a fencepost error in a "recovery branch" of the code for
262*f0574f5cSXin LI	the Oncore GPS receiver if the communication link to the ONCORE
263*f0574f5cSXin LI	is weak / distorted and the decoding doesn't work.
264*f0574f5cSXin LI   Mitigation:
265*f0574f5cSXin LI        Upgrade to 4.2.8p10, or later, from the NTP Project Download Page or
266*f0574f5cSXin LI	    the NTP Public Services Project Download Page
267*f0574f5cSXin LI        Properly monitor your ntpd instances, and auto-restart
268*f0574f5cSXin LI	    ntpd (without -g) if it stops running.
269*f0574f5cSXin LI   Credit:
270*f0574f5cSXin LI	This weakness was discovered by Cure53.
271*f0574f5cSXin LI
272*f0574f5cSXin LI* NTP-01-004 NTP: Potential Overflows in ctl_put() functions (Medium)
273*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
274*f0574f5cSXin LI   References: Sec 3379 / CVE-2017-6458 / VU#325339
275*f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
276*f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
277*f0574f5cSXin LI   CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C)
278*f0574f5cSXin LI   CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
279*f0574f5cSXin LI   Summary:
280*f0574f5cSXin LI	ntpd makes use of different wrappers around ctl_putdata() to
281*f0574f5cSXin LI	create name/value ntpq (mode 6) response strings.  For example,
282*f0574f5cSXin LI	ctl_putstr() is usually used to send string data (variable names
283*f0574f5cSXin LI	or string data).  The formatting code was missing a length check
284*f0574f5cSXin LI	for variable names.  If somebody explicitly created any unusually
285*f0574f5cSXin LI	long variable names in ntpd (longer than 200-512 bytes, depending
286*f0574f5cSXin LI	on the type of variable), then if any of these variables are
287*f0574f5cSXin LI	added to the response list it would overflow a buffer.
288*f0574f5cSXin LI   Mitigation:
289*f0574f5cSXin LI	Implement BCP-38.
290*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
291*f0574f5cSXin LI	    or the NTP Public Services Project Download Page
292*f0574f5cSXin LI	If you don't want to upgrade, then don't setvar variable names
293*f0574f5cSXin LI	    longer than 200-512 bytes in your ntp.conf file.
294*f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
295*f0574f5cSXin LI	    ntpd (without -g) if it stops running.
296*f0574f5cSXin LI   Credit:
297*f0574f5cSXin LI	This weakness was discovered by Cure53.
298*f0574f5cSXin LI
299*f0574f5cSXin LI* NTP-01-003 NTP: Improper use of snprintf() in mx4200_send() (Low)
300*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
301*f0574f5cSXin LI   References: Sec 3378 / CVE-2017-6451 / VU#325339
302*f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
303*f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
304*f0574f5cSXin LI   CVSS2: LOW 0.8 (AV:L/AC:H/Au:M/C:N/I:N/A:P)
305*f0574f5cSXin LI   CVSS3: LOW 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N
306*f0574f5cSXin LI   Summary:
307*f0574f5cSXin LI	The legacy MX4200 refclock is only built if is specifically
308*f0574f5cSXin LI	enabled, and furthermore additional code changes are required to
309*f0574f5cSXin LI	compile and use it.  But it uses the libc functions snprintf()
310*f0574f5cSXin LI	and vsnprintf() incorrectly, which can lead to an out-of-bounds
311*f0574f5cSXin LI	memory write due to an improper handling of the return value of
312*f0574f5cSXin LI	snprintf()/vsnprintf().  Since the return value is used as an
313*f0574f5cSXin LI	iterator and it can be larger than the buffer's size, it is
314*f0574f5cSXin LI	possible for the iterator to point somewhere outside of the
315*f0574f5cSXin LI	allocated buffer space.  This results in an out-of-bound memory
316*f0574f5cSXin LI	write.  This behavior can be leveraged to overwrite a saved
317*f0574f5cSXin LI	instruction pointer on the stack and gain control over the
318*f0574f5cSXin LI	execution flow.  During testing it was not possible to identify
319*f0574f5cSXin LI	any malicious usage for this vulnerability.  Specifically, no
320*f0574f5cSXin LI	way for an attacker to exploit this vulnerability was ultimately
321*f0574f5cSXin LI	unveiled.  However, it has the potential to be exploited, so the
322*f0574f5cSXin LI	code should be fixed.
323*f0574f5cSXin LI   Mitigation, if you have a Magnavox MX4200 refclock:
324*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
325*f0574f5cSXin LI	    or the NTP Public Services Project Download Page.
326*f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
327*f0574f5cSXin LI	    ntpd (without -g) if it stops running.
328*f0574f5cSXin LI   Credit:
329*f0574f5cSXin LI	This weakness was discovered by Cure53.
330*f0574f5cSXin LI
331*f0574f5cSXin LI* NTP-01-002 NTP: Buffer Overflow in ntpq when fetching reslist from a
332*f0574f5cSXin LI	malicious ntpd (Medium)
333*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
334*f0574f5cSXin LI   References: Sec 3377 / CVE-2017-6460 / VU#325339
335*f0574f5cSXin LI   Affects: All versions of ntpq, up to but not including ntp-4.2.8p10, and
336*f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
337*f0574f5cSXin LI   CVSS2: MED 4.9 (AV:N/AC:H/Au:S/C:N/I:N/A:C)
338*f0574f5cSXin LI   CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
339*f0574f5cSXin LI   Summary:
340*f0574f5cSXin LI	A stack buffer overflow in ntpq can be triggered by a malicious
341*f0574f5cSXin LI	ntpd server when ntpq requests the restriction list from the server.
342*f0574f5cSXin LI	This is due to a missing length check in the reslist() function.
343*f0574f5cSXin LI	It occurs whenever the function parses the server's response and
344*f0574f5cSXin LI	encounters a flagstr variable of an excessive length.  The string
345*f0574f5cSXin LI	will be copied into a fixed-size buffer, leading to an overflow on
346*f0574f5cSXin LI	the function's stack-frame.  Note well that this problem requires
347*f0574f5cSXin LI	a malicious server, and affects ntpq, not ntpd.
348*f0574f5cSXin LI   Mitigation:
349*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
350*f0574f5cSXin LI	    or the NTP Public Services Project Download Page
351*f0574f5cSXin LI	If you can't upgrade your version of ntpq then if you want to know
352*f0574f5cSXin LI	    the reslist of an instance of ntpd that you do not control,
353*f0574f5cSXin LI	    know that if the target ntpd is malicious that it can send back
354*f0574f5cSXin LI	    a response that intends to crash your ntpq process.
355*f0574f5cSXin LI   Credit:
356*f0574f5cSXin LI	This weakness was discovered by Cure53.
357*f0574f5cSXin LI
358*f0574f5cSXin LI* NTP-01-001 NTP: Makefile does not enforce Security Flags (Informational)
359*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
360*f0574f5cSXin LI   References: Sec 3376
361*f0574f5cSXin LI   Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
362*f0574f5cSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
363*f0574f5cSXin LI   CVSS2: N/A
364*f0574f5cSXin LI   CVSS3: N/A
365*f0574f5cSXin LI   Summary:
366*f0574f5cSXin LI	The build process for NTP has not, by default, provided compile
367*f0574f5cSXin LI	or link flags to offer "hardened" security options.  Package
368*f0574f5cSXin LI	maintainers have always been able to provide hardening security
369*f0574f5cSXin LI	flags for their builds.  As of ntp-4.2.8p10, the NTP build
370*f0574f5cSXin LI	system has a way to provide OS-specific hardening flags.  Please
371*f0574f5cSXin LI	note that this is still not a really great solution because it
372*f0574f5cSXin LI	is specific to NTP builds.  It's inefficient to have every
373*f0574f5cSXin LI	package supply, track and maintain this information for every
374*f0574f5cSXin LI	target build.  It would be much better if there was a common way
375*f0574f5cSXin LI	for OSes to provide this information in a way that arbitrary
376*f0574f5cSXin LI	packages could benefit from it.
377*f0574f5cSXin LI   Mitigation:
378*f0574f5cSXin LI	Implement BCP-38.
379*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
380*f0574f5cSXin LI	    or the NTP Public Services Project Download Page
381*f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
382*f0574f5cSXin LI	    ntpd (without -g) if it stops running.
383*f0574f5cSXin LI   Credit:
384*f0574f5cSXin LI	This weakness was reported by Cure53.
385*f0574f5cSXin LI
386*f0574f5cSXin LI* 0rigin DoS (Medium)
387*f0574f5cSXin LI   Date Resolved: 21 Mar 2017
388*f0574f5cSXin LI   References: Sec 3361 / CVE-2016-9042 / VU#325339
389*f0574f5cSXin LI   Affects: ntp-4.2.8p9 (21 Nov 2016), up to but not including ntp-4.2.8p10
390*f0574f5cSXin LI   CVSS2: MED 4.9 (AV:N/AC:H/Au:N/C:N/I:N/A:C) (worst case)
391*f0574f5cSXin 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)
392*f0574f5cSXin LI   Summary:
393*f0574f5cSXin LI	An exploitable denial of service vulnerability exists in the
394*f0574f5cSXin LI	origin timestamp check functionality of ntpd 4.2.8p9.  A specially
395*f0574f5cSXin LI	crafted unauthenticated network packet can be used to reset the
396*f0574f5cSXin LI	expected origin timestamp for target peers.  Legitimate replies
397*f0574f5cSXin LI	from targeted peers will fail the origin timestamp check (TEST2)
398*f0574f5cSXin LI	causing the reply to be dropped and creating a denial of service
399*f0574f5cSXin LI	condition.  This vulnerability can only be exploited if the
400*f0574f5cSXin LI	attacker can spoof all of the servers.
401*f0574f5cSXin LI   Mitigation:
402*f0574f5cSXin LI	Implement BCP-38.
403*f0574f5cSXin LI	Configure enough servers/peers that an attacker cannot target
404*f0574f5cSXin LI	    all of your time sources.
405*f0574f5cSXin LI	Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
406*f0574f5cSXin LI	    or the NTP Public Services Project Download Page
407*f0574f5cSXin LI	Properly monitor your ntpd instances, and auto-restart
408*f0574f5cSXin LI	    ntpd (without -g) if it stops running.
409*f0574f5cSXin LI   Credit:
410*f0574f5cSXin LI	This weakness was discovered by Matthew Van Gundy of Cisco.
411*f0574f5cSXin LI
412*f0574f5cSXin LIOther fixes:
413*f0574f5cSXin LI
414*f0574f5cSXin LI* [Bug 3393] clang scan-build findings <perlinger@ntp.org>
415*f0574f5cSXin LI* [Bug 3363] Support for openssl-1.1.0 without compatibility modes
416*f0574f5cSXin LI  - rework of patch set from <ntp.org@eroen.eu>. <perlinger@ntp.org>
417*f0574f5cSXin LI* [Bug 3356] Bugfix 3072 breaks multicastclient <perlinger@ntp.org>
418*f0574f5cSXin LI* [Bug 3216] libntp audio ioctl() args incorrectly cast to int
419*f0574f5cSXin LI  on 4.4BSD-Lite derived platforms <perlinger@ntp.org>
420*f0574f5cSXin LI  - original patch by Majdi S. Abbas
421*f0574f5cSXin LI* [Bug 3215] 'make distcheck' fails with new BK repo format <perlinger@ntp.org>
422*f0574f5cSXin LI* [Bug 3173] forking async worker: interrupted pipe I/O <perlinger@ntp.org>
423*f0574f5cSXin LI  - initial patch by Christos Zoulas
424*f0574f5cSXin LI* [Bug 3139] (...) time_pps_create: Exec format error <perlinger@ntp.org>
425*f0574f5cSXin LI  - move loader API from 'inline' to proper source
426*f0574f5cSXin LI  - augment pathless dlls with absolute path to NTPD
427*f0574f5cSXin LI  - use 'msyslog()' instead of 'printf() 'for reporting trouble
428*f0574f5cSXin LI* [Bug 3107] Incorrect Logic for Peer Event Limiting <perlinger@ntp.org>
429*f0574f5cSXin LI  - applied patch by Matthew Van Gundy
430*f0574f5cSXin LI* [Bug 3065] Quiet warnings on NetBSD <perlinger@ntp.org>
431*f0574f5cSXin LI  - applied some of the patches provided by Havard. Not all of them
432*f0574f5cSXin LI    still match the current code base, and I did not touch libopt.
433*f0574f5cSXin LI* [Bug 3062] Change the process name of forked DNS worker <perlinger@ntp.org>
434*f0574f5cSXin LI  - applied patch by Reinhard Max. See bugzilla for limitations.
435*f0574f5cSXin LI* [Bug 2923] Trap Configuration Fail <perlinger@ntp.org>
436*f0574f5cSXin LI  - fixed dependency inversion from [Bug 2837]
437*f0574f5cSXin LI* [Bug 2896] Nothing happens if minsane < maxclock < minclock
438*f0574f5cSXin LI  - produce ERROR log message about dysfunctional daemon. <perlinger@ntp.org>
439*f0574f5cSXin LI* [Bug 2851] allow -4/-6 on restrict line with mask <perlinger@ntp.org>
440*f0574f5cSXin LI  - applied patch by Miroslav Lichvar for ntp4.2.6 compat
441*f0574f5cSXin LI* [Bug 2645] out-of-bound pointers in ctl_putsys and decode_bitflags
442*f0574f5cSXin LI  - Fixed these and some more locations of this pattern.
443*f0574f5cSXin LI    Probably din't get them all, though. <perlinger@ntp.org>
444*f0574f5cSXin LI* Update copyright year.
445*f0574f5cSXin LI
446*f0574f5cSXin LI--
447*f0574f5cSXin LI(4.2.8p9-win) 2017/02/01 Released by Harlan Stenn <stenn@ntp.org>
448*f0574f5cSXin LI
449*f0574f5cSXin LI* [Bug 3144] NTP does not build without openSSL. <perlinger@ntp.org>
450*f0574f5cSXin LI  - added missed changeset for automatic openssl lib detection
451*f0574f5cSXin LI  - fixed some minor warning issues
452*f0574f5cSXin LI* [Bug 3095]  More compatibility with openssl 1.1. <perlinger@ntp.org>
453*f0574f5cSXin LI* configure.ac cleanup.  stenn@ntp.org
454*f0574f5cSXin LI* openssl configure cleanup.  stenn@ntp.org
455*f0574f5cSXin LI
456*f0574f5cSXin LI--
457f391d6bcSXin LINTP 4.2.8p9 (Harlan Stenn <stenn@ntp.org>, 2016/11/21)
458f391d6bcSXin LI
459f391d6bcSXin LIFocus: Security, Bug fixes, enhancements.
460f391d6bcSXin LI
461f391d6bcSXin LISeverity: HIGH
462f391d6bcSXin LI
463f391d6bcSXin LIIn addition to bug fixes and enhancements, this release fixes the
464f391d6bcSXin LIfollowing 1 high- (Windows only), 2 medium-, 2 medium-/low, and
465f391d6bcSXin LI5 low-severity vulnerabilities, and provides 28 other non-security
466f391d6bcSXin LIfixes and improvements:
467f391d6bcSXin LI
468f391d6bcSXin LI* Trap crash
469f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
470f391d6bcSXin LI   References: Sec 3119 / CVE-2016-9311 / VU#633847
471f391d6bcSXin LI   Affects: ntp-4.0.90 (21 July 1999), possibly earlier, up to but not
472f391d6bcSXin LI   	including 4.2.8p9, and ntp-4.3.0 up to but not including ntp-4.3.94.
473f391d6bcSXin LI   CVSS2: MED 4.9 (AV:N/AC:H/Au:N/C:N/I:N/A:C)
474f391d6bcSXin LI   CVSS3: MED 4.4 CVSS:3.0/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H
475f391d6bcSXin LI   Summary:
476f391d6bcSXin LI	ntpd does not enable trap service by default. If trap service
477f391d6bcSXin LI	has been explicitly enabled, an attacker can send a specially
478f391d6bcSXin LI	crafted packet to cause a null pointer dereference that will
479f391d6bcSXin LI	crash ntpd, resulting in a denial of service.
480f391d6bcSXin LI   Mitigation:
481f391d6bcSXin LI        Implement BCP-38.
482f391d6bcSXin LI	Use "restrict default noquery ..." in your ntp.conf file. Only
483f391d6bcSXin LI	    allow mode 6 queries from trusted networks and hosts.
484f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
485f391d6bcSXin LI	    or the NTP Public Services Project Download Page
486f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
487f391d6bcSXin LI	    (without -g) if it stops running.
488f391d6bcSXin LI   Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
489f391d6bcSXin LI
490f391d6bcSXin LI* Mode 6 information disclosure and DDoS vector
491f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
492f391d6bcSXin LI   References: Sec 3118 / CVE-2016-9310 / VU#633847
493f391d6bcSXin LI   Affects: ntp-4.0.90 (21 July 1999), possibly earlier, up to but not
494f391d6bcSXin LI	including 4.2.8p9, and ntp-4.3.0 up to but not including ntp-4.3.94.
495f391d6bcSXin LI   CVSS2: MED 6.4 (AV:A/AC:L/Au:N/C:N/I:N/A:P)
496f391d6bcSXin LI   CVSS3: MED 6.5 CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
497f391d6bcSXin LI   Summary:
498f391d6bcSXin LI	An exploitable configuration modification vulnerability exists
499f391d6bcSXin LI	in the control mode (mode 6) functionality of ntpd. If, against
500f391d6bcSXin LI	long-standing BCP recommendations, "restrict default noquery ..."
501f391d6bcSXin LI	is not specified, a specially crafted control mode packet can set
502f391d6bcSXin LI	ntpd traps, providing information disclosure and DDoS
503f391d6bcSXin LI	amplification, and unset ntpd traps, disabling legitimate
504f391d6bcSXin LI	monitoring. A remote, unauthenticated, network attacker can
505f391d6bcSXin LI	trigger this vulnerability.
506f391d6bcSXin LI   Mitigation:
507f391d6bcSXin LI        Implement BCP-38.
508f391d6bcSXin LI	Use "restrict default noquery ..." in your ntp.conf file.
509f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
510f391d6bcSXin LI	    or the NTP Public Services Project Download Page
511f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
512f391d6bcSXin LI	    (without -g) if it stops running.
513f391d6bcSXin LI   Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
514f391d6bcSXin LI
515f391d6bcSXin LI* Broadcast Mode Replay Prevention DoS
516f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
517f391d6bcSXin LI   References: Sec 3114 / CVE-2016-7427 / VU#633847
518f391d6bcSXin LI   Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p9, and
519f391d6bcSXin LI	ntp-4.3.90 up to, but not including ntp-4.3.94.
520f391d6bcSXin LI   CVSS2: LOW 3.3 (AV:A/AC:L/Au:N/C:N/I:N/A:P)
521f391d6bcSXin LI   CVSS3: MED 4.3 CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
522f391d6bcSXin LI   Summary:
523f391d6bcSXin LI	The broadcast mode of NTP is expected to only be used in a
524f391d6bcSXin LI	trusted network. If the broadcast network is accessible to an
525f391d6bcSXin LI	attacker, a potentially exploitable denial of service
526f391d6bcSXin LI	vulnerability in ntpd's broadcast mode replay prevention
527f391d6bcSXin LI	functionality can be abused. An attacker with access to the NTP
528f391d6bcSXin LI	broadcast domain can periodically inject specially crafted
529f391d6bcSXin LI	broadcast mode NTP packets into the broadcast domain which,
530f391d6bcSXin LI	while being logged by ntpd, can cause ntpd to reject broadcast
531f391d6bcSXin LI	mode packets from legitimate NTP broadcast servers.
532f391d6bcSXin LI   Mitigation:
533f391d6bcSXin LI        Implement BCP-38.
534f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
535f391d6bcSXin LI	    or the NTP Public Services Project Download Page
536f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
537f391d6bcSXin LI	    (without -g) if it stops running.
538f391d6bcSXin LI   Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
539f391d6bcSXin LI
540f391d6bcSXin LI* Broadcast Mode Poll Interval Enforcement DoS
541f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
542f391d6bcSXin LI   References: Sec 3113 / CVE-2016-7428 / VU#633847
543f391d6bcSXin LI   Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p9, and
544f391d6bcSXin LI	ntp-4.3.90 up to, but not including ntp-4.3.94
545f391d6bcSXin LI   CVSS2: LOW 3.3 (AV:A/AC:L/Au:N/C:N/I:N/A:P)
546f391d6bcSXin LI   CVSS3: MED 4.3 CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
547f391d6bcSXin LI   Summary:
548f391d6bcSXin LI	The broadcast mode of NTP is expected to only be used in a
549f391d6bcSXin LI	trusted network. If the broadcast network is accessible to an
550f391d6bcSXin LI	attacker, a potentially exploitable denial of service
551f391d6bcSXin LI	vulnerability in ntpd's broadcast mode poll interval enforcement
552f391d6bcSXin LI	functionality can be abused. To limit abuse, ntpd restricts the
553f391d6bcSXin LI	rate at which each broadcast association will process incoming
554f391d6bcSXin LI	packets. ntpd will reject broadcast mode packets that arrive
555f391d6bcSXin LI	before the poll interval specified in the preceding broadcast
556f391d6bcSXin LI	packet expires. An attacker with access to the NTP broadcast
557f391d6bcSXin LI	domain can send specially crafted broadcast mode NTP packets to
558f391d6bcSXin LI	the broadcast domain which, while being logged by ntpd, will
559f391d6bcSXin LI	cause ntpd to reject broadcast mode packets from legitimate NTP
560f391d6bcSXin LI	broadcast servers.
561f391d6bcSXin LI   Mitigation:
562f391d6bcSXin LI        Implement BCP-38.
563f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
564f391d6bcSXin LI	    or the NTP Public Services Project Download Page
565f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
566f391d6bcSXin LI	    (without -g) if it stops running.
567f391d6bcSXin LI   Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
568f391d6bcSXin LI
569f391d6bcSXin LI* Windows: ntpd DoS by oversized UDP packet
570f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
571f391d6bcSXin LI   References: Sec 3110 / CVE-2016-9312 / VU#633847
572f391d6bcSXin LI   Affects Windows only: ntp-4.?.?, up to but not including ntp-4.2.8p9,
573f391d6bcSXin LI	and ntp-4.3.0 up to, but not including ntp-4.3.94.
574f391d6bcSXin LI   CVSS2: HIGH 7.8 (AV:N/AC:L/Au:N/C:N/I:N/A:C)
575f391d6bcSXin LI   CVSS3: HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
576f391d6bcSXin LI   Summary:
577f391d6bcSXin LI	If a vulnerable instance of ntpd on Windows receives a crafted
578f391d6bcSXin LI	malicious packet that is "too big", ntpd will stop working.
579f391d6bcSXin LI   Mitigation:
580f391d6bcSXin LI        Implement BCP-38.
581f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
582f391d6bcSXin LI	    or the NTP Public Services Project Download Page
583f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
584f391d6bcSXin LI	    (without -g) if it stops running.
585f391d6bcSXin LI   Credit: This weakness was discovered by Robert Pajak of ABB.
586f391d6bcSXin LI
587f391d6bcSXin LI* 0rigin (zero origin) issues
588f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
589f391d6bcSXin LI   References: Sec 3102 / CVE-2016-7431 / VU#633847
590f391d6bcSXin LI   Affects: ntp-4.2.8p8, and ntp-4.3.93.
591f391d6bcSXin LI   CVSS2: MED 5.0 (AV:N/AC:L/Au:N/C:N/I:P/A:N)
592f391d6bcSXin LI   CVSS3: MED 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
593f391d6bcSXin LI   Summary:
594f391d6bcSXin LI	Zero Origin timestamp problems were fixed by Bug 2945 in
595f391d6bcSXin LI	ntp-4.2.8p6. However, subsequent timestamp validation checks
596f391d6bcSXin LI	introduced a regression in the handling of some Zero origin
597f391d6bcSXin LI	timestamp checks.
598f391d6bcSXin LI   Mitigation:
599f391d6bcSXin LI        Implement BCP-38.
600f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
601f391d6bcSXin LI	    or the NTP Public Services Project Download Page
602f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
603f391d6bcSXin LI	    (without -g) if it stops running.
604f391d6bcSXin LI   Credit: This weakness was discovered by Sharon Goldberg and Aanchal
605f391d6bcSXin LI	Malhotra of Boston University.
606f391d6bcSXin LI
607f391d6bcSXin LI* read_mru_list() does inadequate incoming packet checks
608f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
609f391d6bcSXin LI   References: Sec 3082 / CVE-2016-7434 / VU#633847
610f391d6bcSXin LI   Affects: ntp-4.2.7p22, up to but not including ntp-4.2.8p9, and
611f391d6bcSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94.
612f391d6bcSXin LI   CVSS2: LOW 3.8 (AV:L/AC:H/Au:S/C:N/I:N/A:C)
613f391d6bcSXin LI   CVSS3: LOW 3.8 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
614f391d6bcSXin LI   Summary:
615f391d6bcSXin LI	If ntpd is configured to allow mrulist query requests from a
616f391d6bcSXin LI	server that sends a crafted malicious packet, ntpd will crash
617f391d6bcSXin LI	on receipt of that crafted malicious mrulist query packet.
618f391d6bcSXin LI   Mitigation:
619f391d6bcSXin LI	Only allow mrulist query packets from trusted hosts.
620f391d6bcSXin LI        Implement BCP-38.
621f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
622f391d6bcSXin LI	    or the NTP Public Services Project Download Page
623f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
624f391d6bcSXin LI	    (without -g) if it stops running.
625f391d6bcSXin LI   Credit: This weakness was discovered by Magnus Stubman.
626f391d6bcSXin LI
627f391d6bcSXin LI* Attack on interface selection
628f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
629f391d6bcSXin LI   References: Sec 3072 / CVE-2016-7429 / VU#633847
630f391d6bcSXin LI   Affects: ntp-4.2.7p385, up to but not including ntp-4.2.8p9, and
631f391d6bcSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94
632f391d6bcSXin LI   CVSS2: LOW 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
633f391d6bcSXin LI   CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
634f391d6bcSXin LI   Summary:
635f391d6bcSXin LI	When ntpd receives a server response on a socket that corresponds
636f391d6bcSXin LI	to a different interface than was used for the request, the peer
637f391d6bcSXin LI	structure is updated to use the interface for new requests. If
638f391d6bcSXin LI	ntpd is running on a host with multiple interfaces in separate
639f391d6bcSXin LI	networks and the operating system doesn't check source address in
640f391d6bcSXin LI	received packets (e.g. rp_filter on Linux is set to 0), an
641f391d6bcSXin LI	attacker that knows the address of the source can send a packet
642f391d6bcSXin LI	with spoofed source address which will cause ntpd to select wrong
643f391d6bcSXin LI	interface for the source and prevent it from sending new requests
644f391d6bcSXin LI	until the list of interfaces is refreshed, which happens on
645f391d6bcSXin LI	routing changes or every 5 minutes by default. If the attack is
646f391d6bcSXin LI	repeated often enough (once per second), ntpd will not be able to
647f391d6bcSXin LI	synchronize with the source.
648f391d6bcSXin LI   Mitigation:
649f391d6bcSXin LI        Implement BCP-38.
650f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
651f391d6bcSXin LI	    or the NTP Public Services Project Download Page
652f391d6bcSXin LI	If you are going to configure your OS to disable source address
653f391d6bcSXin LI	    checks, also configure your firewall configuration to control
654f391d6bcSXin LI	    what interfaces can receive packets from what networks.
655f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
656f391d6bcSXin LI	    (without -g) if it stops running.
657f391d6bcSXin LI   Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
658f391d6bcSXin LI
659f391d6bcSXin LI* Client rate limiting and server responses
660f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
661f391d6bcSXin LI   References: Sec 3071 / CVE-2016-7426 / VU#633847
662f391d6bcSXin LI   Affects: ntp-4.2.5p203, up to but not including ntp-4.2.8p9, and
663f391d6bcSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94
664f391d6bcSXin LI   CVSS2: LOW 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
665f391d6bcSXin LI   CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
666f391d6bcSXin LI   Summary:
667f391d6bcSXin LI	When ntpd is configured with rate limiting for all associations
668f391d6bcSXin LI	(restrict default limited in ntp.conf), the limits are applied
669f391d6bcSXin LI	also to responses received from its configured sources. An
670f391d6bcSXin LI	attacker who knows the sources (e.g., from an IPv4 refid in
671f391d6bcSXin LI	server response) and knows the system is (mis)configured in this
672f391d6bcSXin LI	way can periodically send packets with spoofed source address to
673f391d6bcSXin LI	keep the rate limiting activated and prevent ntpd from accepting
674f391d6bcSXin LI	valid responses from its sources.
675f391d6bcSXin LI
676f391d6bcSXin LI	While this blanket rate limiting can be useful to prevent
677f391d6bcSXin LI	brute-force attacks on the origin timestamp, it allows this DoS
678f391d6bcSXin LI	attack. Similarly, it allows the attacker to prevent mobilization
679f391d6bcSXin LI	of ephemeral associations.
680f391d6bcSXin LI   Mitigation:
681f391d6bcSXin LI        Implement BCP-38.
682f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
683f391d6bcSXin LI	    or the NTP Public Services Project Download Page
684f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
685f391d6bcSXin LI	    (without -g) if it stops running.
686f391d6bcSXin LI   Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
687f391d6bcSXin LI
688f391d6bcSXin LI* Fix for bug 2085 broke initial sync calculations
689f391d6bcSXin LI   Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
690f391d6bcSXin LI   References: Sec 3067 / CVE-2016-7433 / VU#633847
691f391d6bcSXin LI   Affects: ntp-4.2.7p385, up to but not including ntp-4.2.8p9, and
692f391d6bcSXin LI	ntp-4.3.0 up to, but not including ntp-4.3.94. But the
693f391d6bcSXin LI	root-distance calculation in general is incorrect in all versions
694f391d6bcSXin LI	of ntp-4 until this release.
695f391d6bcSXin LI   CVSS2: LOW 1.2 (AV:L/AC:H/Au:N/C:N/I:N/A:P)
696f391d6bcSXin LI   CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L
697f391d6bcSXin LI   Summary:
698f391d6bcSXin LI	Bug 2085 described a condition where the root delay was included
699f391d6bcSXin LI	twice, causing the jitter value to be higher than expected. Due
700f391d6bcSXin LI	to a misinterpretation of a small-print variable in The Book, the
701f391d6bcSXin LI	fix for this problem was incorrect, resulting in a root distance
702f391d6bcSXin LI	that did not include the peer dispersion. The calculations and
703f391d6bcSXin LI	formulae have been reviewed and reconciled, and the code has been
704f391d6bcSXin LI	updated accordingly.
705f391d6bcSXin LI   Mitigation:
706f391d6bcSXin LI        Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
707f391d6bcSXin LI	    or the NTP Public Services Project Download Page
708f391d6bcSXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
709f391d6bcSXin LI	    (without -g) if it stops running.
710f391d6bcSXin LI   Credit: This weakness was discovered independently by Brian Utterback of
711f391d6bcSXin LI	Oracle, and Sharon Goldberg and Aanchal Malhotra of Boston University.
712f391d6bcSXin LI
713f391d6bcSXin LIOther fixes:
714f391d6bcSXin LI
715f391d6bcSXin LI* [Bug 3142] bug in netmask prefix length detection <perlinger@ntp.org>
716f391d6bcSXin LI* [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org
717f391d6bcSXin LI* [Bug 3129] Unknown hosts can put resolver thread into a hard loop
718f391d6bcSXin LI  - moved retry decision where it belongs. <perlinger@ntp.org>
719f391d6bcSXin LI* [Bug 3125] NTPD doesn't fully start when ntp.conf entries are out of order
720f391d6bcSXin LI  using the loopback-ppsapi-provider.dll <perlinger@ntp.org>
721f391d6bcSXin LI* [Bug 3116] unit tests for NTP time stamp expansion. <perlinger@ntp.org>
722f391d6bcSXin LI* [Bug 3100] ntpq can't retrieve daemon_version <perlinger@ntp.org>
723f391d6bcSXin LI  - fixed extended sysvar lookup (bug introduced with bug 3008 fix)
724f391d6bcSXin LI* [Bug 3095] Compatibility with openssl 1.1 <perlinger@ntp.org>
725f391d6bcSXin LI  - applied patches by Kurt Roeckx <kurt@roeckx.be> to source
726f391d6bcSXin LI  - added shim layer for SSL API calls with issues (both directions)
727f391d6bcSXin LI* [Bug 3089] Serial Parser does not work anymore for hopfser like device
728f391d6bcSXin LI  - simplified / refactored hex-decoding in driver. <perlinger@ntp.org>
729f391d6bcSXin LI* [Bug 3084] update-leap mis-parses the leapfile name.  HStenn.
730f391d6bcSXin LI* [Bug 3068] Linker warnings when building on Solaris. perlinger@ntp.org
731f391d6bcSXin LI  - applied patch thanks to Andrew Stormont <andyjstormont@gmail.com>
732f391d6bcSXin LI* [Bug 3067] Root distance calculation needs improvement.  HStenn
733f391d6bcSXin LI* [Bug 3066] NMEA clock ignores pps. perlinger@ntp.org
734f391d6bcSXin LI  - PPS-HACK works again.
735f391d6bcSXin LI* [Bug 3059] Potential buffer overrun from oversized hash <perlinger@ntp.org>
736f391d6bcSXin LI  - applied patch by Brian Utterback <brian.utterback@oracle.com>
737f391d6bcSXin LI* [Bug 3053] ntp_loopfilter.c frequency calc precedence error.  Sarah White.
738f391d6bcSXin LI* [Bug 3050] Fix for bug #2960 causes [...] spurious error message.
739f391d6bcSXin LI  <perlinger@ntp.org>
740f391d6bcSXin LI  - patches by Reinhard Max <max@suse.com> and Havard Eidnes <he@uninett.no>
741f391d6bcSXin LI* [Bug 3047] Fix refclock_jjy C-DEX JST2000. abe@ntp.org
742f391d6bcSXin LI  - Patch provided by Kuramatsu.
743f391d6bcSXin LI* [Bug 3021] unity_fixture.c needs pragma weak <perlinger@ntp.org>
744f391d6bcSXin LI  - removed unnecessary & harmful decls of 'setUp()' & 'tearDown()'
745f391d6bcSXin LI* [Bug 3019] Windows: ERROR_HOST_UNREACHABLE block packet processing. DMayer
746f391d6bcSXin LI* [Bug 2998] sntp/tests/packetProcessing.c broken without openssl. JPerlinger
747f391d6bcSXin LI* [Bug 2961] sntp/tests/packetProcessing.c assumes AUTOKEY.  HStenn.
748f391d6bcSXin LI* [Bug 2959] refclock_jupiter: gps week correction <perlinger@ntp.org>
749f391d6bcSXin LI  - fixed GPS week expansion to work based on build date. Special thanks
750f391d6bcSXin LI    to Craig Leres for initial patch and testing.
751f391d6bcSXin LI* [Bug 2951] ntpd tests fail: multiple definition of `send_via_ntp_signd'
752f391d6bcSXin LI  - fixed Makefile.am <perlinger@ntp.org>
753f391d6bcSXin LI* [Bug 2689] ATOM driver processes last PPS pulse at startup,
754f391d6bcSXin LI             even if it is very old <perlinger@ntp.org>
755f391d6bcSXin LI  - make sure PPS source is alive before processing samples
756f391d6bcSXin LI  - improve stability close to the 500ms phase jump (phase gate)
757f391d6bcSXin LI* Fix typos in include/ntp.h.
758f391d6bcSXin LI* Shim X509_get_signature_nid() if needed
759f391d6bcSXin LI* git author attribution cleanup
760f391d6bcSXin LI* bk ignore file cleanup
761f391d6bcSXin LI* remove locks in Windows IO, use rpc-like thread synchronisation instead
762f391d6bcSXin LI
763f391d6bcSXin LI---
764e27abb66SXin LINTP 4.2.8p8 (Harlan Stenn <stenn@ntp.org>, 2016/06/02)
765e27abb66SXin LI
766e27abb66SXin LIFocus: Security, Bug fixes, enhancements.
767e27abb66SXin LI
768e27abb66SXin LISeverity: HIGH
769e27abb66SXin LI
770e27abb66SXin LIIn addition to bug fixes and enhancements, this release fixes the
771e27abb66SXin LIfollowing 1 high- and 4 low-severity vulnerabilities:
772e27abb66SXin LI
773e27abb66SXin LI* CRYPTO_NAK crash
774e27abb66SXin LI   Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
775e27abb66SXin LI   References: Sec 3046 / CVE-2016-4957 / VU#321640
776e27abb66SXin LI   Affects: ntp-4.2.8p7, and ntp-4.3.92.
777e27abb66SXin LI   CVSS2: HIGH 7.8 (AV:N/AC:L/Au:N/C:N/I:N/A:C)
778e27abb66SXin LI   CVSS3: HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
779e27abb66SXin LI   Summary: The fix for Sec 3007 in ntp-4.2.8p7 contained a bug that
780e27abb66SXin LI	could cause ntpd to crash.
781e27abb66SXin LI   Mitigation:
782e27abb66SXin LI        Implement BCP-38.
783e27abb66SXin LI        Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
784e27abb66SXin LI	    or the NTP Public Services Project Download Page
785e27abb66SXin LI        If you cannot upgrade from 4.2.8p7, the only other alternatives
786e27abb66SXin LI	    are to patch your code or filter CRYPTO_NAK packets.
787e27abb66SXin LI        Properly monitor your ntpd instances, and auto-restart ntpd
788e27abb66SXin LI	    (without -g) if it stops running.
789e27abb66SXin LI   Credit: This weakness was discovered by Nicolas Edet of Cisco.
790e27abb66SXin LI
791e27abb66SXin LI* Bad authentication demobilizes ephemeral associations
792e27abb66SXin LI   Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
793e27abb66SXin LI   References: Sec 3045 / CVE-2016-4953 / VU#321640
794e27abb66SXin LI   Affects: ntp-4, up to but not including ntp-4.2.8p8, and
795e27abb66SXin LI	ntp-4.3.0 up to, but not including ntp-4.3.93.
796e27abb66SXin LI   CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
797e27abb66SXin LI   CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
798e27abb66SXin LI   Summary: An attacker who knows the origin timestamp and can send a
799e27abb66SXin LI	spoofed packet containing a CRYPTO-NAK to an ephemeral peer
800e27abb66SXin LI	target before any other response is sent can demobilize that
801e27abb66SXin LI	association.
802e27abb66SXin LI   Mitigation:
803e27abb66SXin LI	Implement BCP-38.
804e27abb66SXin LI	Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
805e27abb66SXin LI	    or the NTP Public Services Project Download Page
806e27abb66SXin LI	Properly monitor your ntpd instances.
807e27abb66SXin LI	Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
808e27abb66SXin LI
809e27abb66SXin LI* Processing spoofed server packets
810e27abb66SXin LI   Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
811e27abb66SXin LI   References: Sec 3044 / CVE-2016-4954 / VU#321640
812e27abb66SXin LI   Affects: ntp-4, up to but not including ntp-4.2.8p8, and
813e27abb66SXin LI	ntp-4.3.0 up to, but not including ntp-4.3.93.
814e27abb66SXin LI   CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
815e27abb66SXin LI   CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
816e27abb66SXin LI   Summary: An attacker who is able to spoof packets with correct origin
817e27abb66SXin LI	timestamps from enough servers before the expected response
818e27abb66SXin LI	packets arrive at the target machine can affect some peer
819e27abb66SXin LI	variables and, for example, cause a false leap indication to be set.
820e27abb66SXin LI   Mitigation:
821e27abb66SXin LI	Implement BCP-38.
822e27abb66SXin LI	Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
823e27abb66SXin LI	    or the NTP Public Services Project Download Page
824e27abb66SXin LI	Properly monitor your ntpd instances.
825e27abb66SXin LI   Credit: This weakness was discovered by Jakub Prokes of Red Hat.
826e27abb66SXin LI
827e27abb66SXin LI* Autokey association reset
828e27abb66SXin LI   Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
829e27abb66SXin LI   References: Sec 3043 / CVE-2016-4955 / VU#321640
830e27abb66SXin LI   Affects: ntp-4, up to but not including ntp-4.2.8p8, and
831e27abb66SXin LI	ntp-4.3.0 up to, but not including ntp-4.3.93.
832e27abb66SXin LI   CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
833e27abb66SXin LI   CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
834e27abb66SXin LI   Summary: An attacker who is able to spoof a packet with a correct
835e27abb66SXin LI	origin timestamp before the expected response packet arrives at
836e27abb66SXin LI	the target machine can send a CRYPTO_NAK or a bad MAC and cause
837e27abb66SXin LI	the association's peer variables to be cleared. If this can be
838e27abb66SXin LI	done often enough, it will prevent that association from working.
839e27abb66SXin LI   Mitigation:
840e27abb66SXin LI	Implement BCP-38.
841e27abb66SXin LI	Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
842e27abb66SXin LI	    or the NTP Public Services Project Download Page
843e27abb66SXin LI	Properly monitor your ntpd instances.
844e27abb66SXin LI   Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
845e27abb66SXin LI
846e27abb66SXin LI* Broadcast interleave
847e27abb66SXin LI   Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
848e27abb66SXin LI   References: Sec 3042 / CVE-2016-4956 / VU#321640
849e27abb66SXin LI   Affects: ntp-4, up to but not including ntp-4.2.8p8, and
850e27abb66SXin LI   	ntp-4.3.0 up to, but not including ntp-4.3.93.
851e27abb66SXin LI   CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
852e27abb66SXin LI   CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
853e27abb66SXin LI   Summary: The fix for NtpBug2978 does not cover broadcast associations,
854e27abb66SXin LI   	so broadcast clients can be triggered to flip into interleave mode.
855e27abb66SXin LI   Mitigation:
856e27abb66SXin LI	Implement BCP-38.
857e27abb66SXin LI	Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
858e27abb66SXin LI	    or the NTP Public Services Project Download Page
859e27abb66SXin LI	Properly monitor your ntpd instances.
860e27abb66SXin LI   Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
861e27abb66SXin LI
862e27abb66SXin LIOther fixes:
863e27abb66SXin LI* [Bug 3038] NTP fails to build in VS2015. perlinger@ntp.org
864e27abb66SXin LI  - provide build environment
865e27abb66SXin LI  - 'wint_t' and 'struct timespec' defined by VS2015
866e27abb66SXin LI  - fixed print()/scanf() format issues
867e27abb66SXin LI* [Bug 3052] Add a .gitignore file.  Edmund Wong.
868e27abb66SXin LI* [Bug 3054] miscopt.html documents the allan intercept in seconds. SWhite.
869e27abb66SXin LI* [Bug 3058] fetch_timestamp() mishandles 64-bit alignment. Brian Utterback,
870e27abb66SXin LI  JPerlinger, HStenn.
871e27abb66SXin LI* Fix typo in ntp-wait and plot_summary.  HStenn.
872e27abb66SXin LI* Make sure we have an "author" file for git imports.  HStenn.
873e27abb66SXin LI* Update the sntp problem tests for MacOS.  HStenn.
874e27abb66SXin LI
875e27abb66SXin LI---
8764990d495SXin LINTP 4.2.8p7 (Harlan Stenn <stenn@ntp.org>, 2016/04/26)
8773311ff84SXin LI
8784990d495SXin LIFocus: Security, Bug fixes, enhancements.
8794990d495SXin LI
8804990d495SXin LISeverity: MEDIUM
8814990d495SXin LI
8824990d495SXin LIWhen building NTP from source, there is a new configure option
8834990d495SXin LIavailable, --enable-dynamic-interleave.  More information on this below.
8844990d495SXin LI
8854990d495SXin LIAlso note that ntp-4.2.8p7 logs more "unexpected events" than previous
8864990d495SXin LIversions of ntp.  These events have almost certainly happened in the
8874990d495SXin LIpast, it's just that they were silently counted and not logged.  With
8884990d495SXin LIthe increasing awareness around security, we feel it's better to clearly
8894990d495SXin LIlog these events to help detect abusive behavior.  This increased
8904990d495SXin LIlogging can also help detect other problems, too.
8914990d495SXin LI
8924990d495SXin LIIn addition to bug fixes and enhancements, this release fixes the
8934990d495SXin LIfollowing 9 low- and medium-severity vulnerabilities:
8944990d495SXin LI
8954990d495SXin LI* Improve NTP security against buffer comparison timing attacks,
8964990d495SXin LI  AKA: authdecrypt-timing
8974990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
8984990d495SXin LI   References: Sec 2879 / CVE-2016-1550
8994990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
9004990d495SXin LI	4.3.0 up to, but not including 4.3.92
9014990d495SXin LI   CVSSv2: LOW 2.6 - (AV:L/AC:H/Au:N/C:P/I:P/A:N)
9024990d495SXin LI   CVSSv3: MED 4.0 - CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
9034990d495SXin LI   Summary: Packet authentication tests have been performed using
9044990d495SXin LI	memcmp() or possibly bcmp(), and it is potentially possible
9054990d495SXin LI	for a local or perhaps LAN-based attacker to send a packet with
9064990d495SXin LI	an authentication payload and indirectly observe how much of
9074990d495SXin LI	the digest has matched.
9084990d495SXin LI   Mitigation:
9094990d495SXin LI	Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
9104990d495SXin LI	    or the NTP Public Services Project Download Page.
9114990d495SXin LI	Properly monitor your ntpd instances.
9124990d495SXin LI   Credit: This weakness was discovered independently by Loganaden
9134990d495SXin LI   	Velvindron, and Matthew Van Gundy and Stephen Gray of Cisco ASIG.
9144990d495SXin LI
9154990d495SXin LI* Zero origin timestamp bypass: Additional KoD checks.
9164990d495SXin LI   References: Sec 2945 / Sec 2901 / CVE-2015-8138
9174990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7,
9184990d495SXin LI   Summary: Improvements to the fixes incorporated in t 4.2.8p6 and 4.3.92.
9194990d495SXin LI
9204990d495SXin LI* peer associations were broken by the fix for NtpBug2899
9214990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
9224990d495SXin LI   References: Sec 2952 / CVE-2015-7704
9234990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
9244990d495SXin LI   	4.3.0 up to, but not including 4.3.92
9254990d495SXin LI   CVSSv2: MED 4.3 - (AV:N/AC:M/Au:N/C:N/I:N/A:P)
9264990d495SXin LI   Summary: The fix for NtpBug2952 in ntp-4.2.8p5 to address broken peer
9274990d495SXin LI   	associations did not address all of the issues.
9284990d495SXin LI   Mitigation:
9294990d495SXin LI        Implement BCP-38.
9304990d495SXin LI        Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
9314990d495SXin LI	    or the NTP Public Services Project Download Page
9324990d495SXin LI        If you can't upgrade, use "server" associations instead of
9334990d495SXin LI	    "peer" associations.
9344990d495SXin LI        Monitor your ntpd instances.
9354990d495SXin LI   Credit: This problem was discovered by Michael Tatarinov.
9364990d495SXin LI
9374990d495SXin LI* Validate crypto-NAKs, AKA: CRYPTO-NAK DoS
9384990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
9394990d495SXin LI   References: Sec 3007 / CVE-2016-1547 / VU#718152
9404990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
9414990d495SXin LI	4.3.0 up to, but not including 4.3.92
9424990d495SXin LI   CVSS2: MED 4.3 - (AV:N/AC:M/Au:N/C:N/I:N/A:P)
9434990d495SXin LI   CVSS3: MED 3.7 - CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
9444990d495SXin LI   Summary: For ntp-4 versions up to but not including ntp-4.2.8p7, an
9454990d495SXin LI	off-path attacker can cause a preemptable client association to
9464990d495SXin LI	be demobilized by sending a crypto NAK packet to a victim client
9474990d495SXin LI	with a spoofed source address of an existing associated peer.
9484990d495SXin LI	This is true even if authentication is enabled.
9494990d495SXin LI
9504990d495SXin LI	Furthermore, if the attacker keeps sending crypto NAK packets,
9514990d495SXin LI	for example one every second, the victim never has a chance to
9524990d495SXin LI	reestablish the association and synchronize time with that
9534990d495SXin LI	legitimate server.
9544990d495SXin LI
9554990d495SXin LI	For ntp-4.2.8 thru ntp-4.2.8p6 there is less risk because more
9564990d495SXin LI	stringent checks are performed on incoming packets, but there
9574990d495SXin LI	are still ways to exploit this vulnerability in versions before
9584990d495SXin LI	ntp-4.2.8p7.
9594990d495SXin LI   Mitigation:
9604990d495SXin LI	Implement BCP-38.
9614990d495SXin LI	Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
9624990d495SXin LI	    or the NTP Public Services Project Download Page
9634990d495SXin LI	Properly monitor your =ntpd= instances
9644990d495SXin LI   Credit: This weakness was discovered by Stephen Gray and
9654990d495SXin LI   	Matthew Van Gundy of Cisco ASIG.
9664990d495SXin LI
9674990d495SXin LI* ctl_getitem() return value not always checked
9684990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
9694990d495SXin LI   References: Sec 3008 / CVE-2016-2519
9704990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
9714990d495SXin LI	4.3.0 up to, but not including 4.3.92
9724990d495SXin LI   CVSSv2: MED 4.9 - (AV:N/AC:H/Au:S/C:N/I:N/A:C)
9734990d495SXin LI   CVSSv3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
9744990d495SXin LI   Summary: ntpq and ntpdc can be used to store and retrieve information
9754990d495SXin LI   	in ntpd. It is possible to store a data value that is larger
9764990d495SXin LI	than the size of the buffer that the ctl_getitem() function of
9774990d495SXin LI	ntpd uses to report the return value. If the length of the
9784990d495SXin LI	requested data value returned by ctl_getitem() is too large,
9794990d495SXin LI	the value NULL is returned instead. There are 2 cases where the
9804990d495SXin LI	return value from ctl_getitem() was not directly checked to make
9814990d495SXin LI	sure it's not NULL, but there are subsequent INSIST() checks
9824990d495SXin LI	that make sure the return value is not NULL. There are no data
9834990d495SXin LI	values ordinarily stored in ntpd that would exceed this buffer
9844990d495SXin LI	length. But if one has permission to store values and one stores
9854990d495SXin LI	a value that is "too large", then ntpd will abort if an attempt
9864990d495SXin LI	is made to read that oversized value.
9874990d495SXin LI    Mitigation:
9884990d495SXin LI        Implement BCP-38.
9894990d495SXin LI        Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
9904990d495SXin LI	    or the NTP Public Services Project Download Page
9914990d495SXin LI        Properly monitor your ntpd instances.
9924990d495SXin LI    Credit: This weakness was discovered by Yihan Lian of the Cloud
9934990d495SXin LI    	Security Team, Qihoo 360.
9944990d495SXin LI
9954990d495SXin LI* Crafted addpeer with hmode > 7 causes array wraparound with MATCH_ASSOC
9964990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
9974990d495SXin LI   References: Sec 3009 / CVE-2016-2518 / VU#718152
9984990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
9994990d495SXin LI	4.3.0 up to, but not including 4.3.92
10004990d495SXin LI   CVSS2: LOW 2.1 - (AV:N/AC:H/Au:S/C:N/I:N/A:P)
10014990d495SXin LI   CVSS3: LOW 2.0 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
10024990d495SXin LI   Summary: Using a crafted packet to create a peer association with
10034990d495SXin LI   	hmode > 7 causes the MATCH_ASSOC() lookup to make an
10044990d495SXin LI	out-of-bounds reference.
10054990d495SXin LI   Mitigation:
10064990d495SXin LI	Implement BCP-38.
10074990d495SXin LI	Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
10084990d495SXin LI	    or the NTP Public Services Project Download Page
10094990d495SXin LI	Properly monitor your ntpd instances
10104990d495SXin LI   Credit: This weakness was discovered by Yihan Lian of the Cloud
10114990d495SXin LI   	Security Team, Qihoo 360.
10124990d495SXin LI
10134990d495SXin LI* remote configuration trustedkey/requestkey/controlkey values are not
10144990d495SXin LI	properly validated
10154990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
10164990d495SXin LI   References: Sec 3010 / CVE-2016-2517 / VU#718152
10174990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
10184990d495SXin LI	4.3.0 up to, but not including 4.3.92
10194990d495SXin LI   CVSS2: MED 4.9 - (AV:N/AC:H/Au:S/C:N/I:N/A:C)
10204990d495SXin LI   CVSS3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
10214990d495SXin LI   Summary: If ntpd was expressly configured to allow for remote
10224990d495SXin LI   	configuration, a malicious user who knows the controlkey for
10234990d495SXin LI	ntpq or the requestkey for ntpdc (if mode7 is expressly enabled)
10244990d495SXin LI	can create a session with ntpd and then send a crafted packet to
10254990d495SXin LI	ntpd that will change the value of the trustedkey, controlkey,
10264990d495SXin LI	or requestkey to a value that will prevent any subsequent
10274990d495SXin LI	authentication with ntpd until ntpd is restarted.
10284990d495SXin LI   Mitigation:
10294990d495SXin LI	Implement BCP-38.
10304990d495SXin LI	Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
10314990d495SXin LI	    or the NTP Public Services Project Download Page
10324990d495SXin LI	Properly monitor your =ntpd= instances
10334990d495SXin LI   Credit: This weakness was discovered by Yihan Lian of the Cloud
10344990d495SXin LI   	Security Team, Qihoo 360.
10354990d495SXin LI
10364990d495SXin LI* Duplicate IPs on unconfig directives will cause an assertion botch in ntpd
10374990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
10384990d495SXin LI   References: Sec 3011 / CVE-2016-2516 / VU#718152
10394990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
10404990d495SXin LI   	4.3.0 up to, but not including 4.3.92
10414990d495SXin LI   CVSS2: MED 6.3 - (AV:N/AC:M/Au:S/C:N/I:N/A:C)
10424990d495SXin LI   CVSS3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
10434990d495SXin LI   Summary: If ntpd was expressly configured to allow for remote
10444990d495SXin LI   	configuration, a malicious user who knows the controlkey for
10454990d495SXin LI	ntpq or the requestkey for ntpdc (if mode7 is expressly enabled)
10464990d495SXin LI	can create a session with ntpd and if an existing association is
10474990d495SXin LI	unconfigured using the same IP twice on the unconfig directive
10484990d495SXin LI	line, ntpd will abort.
10494990d495SXin LI   Mitigation:
10504990d495SXin LI	Implement BCP-38.
10514990d495SXin LI	Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
10524990d495SXin LI	    or the NTP Public Services Project Download Page
10534990d495SXin LI	Properly monitor your ntpd instances
10544990d495SXin LI   Credit: This weakness was discovered by Yihan Lian of the Cloud
10554990d495SXin LI   	Security Team, Qihoo 360.
10564990d495SXin LI
10574990d495SXin LI* Refclock impersonation vulnerability
10584990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
10594990d495SXin LI   References: Sec 3020 / CVE-2016-1551
10604990d495SXin LI   Affects: On a very limited number of OSes, all NTP releases up to but
10614990d495SXin LI	not including 4.2.8p7, and 4.3.0 up to but not including 4.3.92.
10624990d495SXin LI	By "very limited number of OSes" we mean no general-purpose OSes
10634990d495SXin LI	have yet been identified that have this vulnerability.
10644990d495SXin LI   CVSSv2: LOW 2.6 - (AV:N/AC:H/Au:N/C:N/I:P/A:N)
10654990d495SXin LI   CVSSv3: LOW 3.7 - CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
10664990d495SXin LI   Summary: While most OSes implement martian packet filtering in their
10674990d495SXin LI   	network stack, at least regarding 127.0.0.0/8, some will allow
10684990d495SXin LI	packets claiming to be from 127.0.0.0/8 that arrive over a
10694990d495SXin LI	physical network. On these OSes, if ntpd is configured to use a
10704990d495SXin LI	reference clock an attacker can inject packets over the network
10714990d495SXin LI	that look like they are coming from that reference clock.
10724990d495SXin LI   Mitigation:
10734990d495SXin LI        Implement martian packet filtering and BCP-38.
10744990d495SXin LI        Configure ntpd to use an adequate number of time sources.
10754990d495SXin LI        Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
10764990d495SXin LI	    or the NTP Public Services Project Download Page
10774990d495SXin LI        If you are unable to upgrade and if you are running an OS that
10784990d495SXin LI	    has this vulnerability, implement martian packet filters and
10794990d495SXin LI	    lobby your OS vendor to fix this problem, or run your
10804990d495SXin LI	    refclocks on computers that use OSes that are not vulnerable
10814990d495SXin LI	    to these attacks and have your vulnerable machines get their
10824990d495SXin LI	    time from protected resources.
10834990d495SXin LI        Properly monitor your ntpd instances.
10844990d495SXin LI   Credit: This weakness was discovered by Matt Street and others of
10854990d495SXin LI   	Cisco ASIG.
10864990d495SXin LI
10874990d495SXin LIThe following issues were fixed in earlier releases and contain
10884990d495SXin LIimprovements in 4.2.8p7:
10894990d495SXin LI
10904990d495SXin LI* Clients that receive a KoD should validate the origin timestamp field.
10914990d495SXin LI   References: Sec 2901 / CVE-2015-7704, CVE-2015-7705
10924990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7,
10934990d495SXin LI   Summary: Improvements to the fixes incorporated into 4.2.8p4 and 4.3.77.
10944990d495SXin LI
10954990d495SXin LI* Skeleton key: passive server with trusted key can serve time.
10964990d495SXin LI   References: Sec 2936 / CVE-2015-7974
10974990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7,
10984990d495SXin LI   Summary: Improvements to the fixes incorporated in t 4.2.8p6 and 4.3.90.
10994990d495SXin LI
11004990d495SXin LITwo other vulnerabilities have been reported, and the mitigations
11014990d495SXin LIfor these are as follows:
11024990d495SXin LI
11034990d495SXin LI* Interleave-pivot
11044990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
11054990d495SXin LI   References: Sec 2978 / CVE-2016-1548
11064990d495SXin LI   Affects: All ntp-4 releases.
11074990d495SXin LI   CVSSv2: MED 6.4 - (AV:N/AC:L/Au:N/C:N/I:P/A:P)
11084990d495SXin LI   CVSSv3: MED 7.2 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L
11094990d495SXin LI   Summary: It is possible to change the time of an ntpd client or deny
11104990d495SXin LI   	service to an ntpd client by forcing it to change from basic
11114990d495SXin LI	client/server mode to interleaved symmetric mode. An attacker
11124990d495SXin LI	can spoof a packet from a legitimate ntpd server with an origin
11134990d495SXin LI	timestamp that matches the peer->dst timestamp recorded for that
11144990d495SXin LI	server. After making this switch, the client will reject all
11154990d495SXin LI	future legitimate server responses. It is possible to force the
11164990d495SXin LI	victim client to move time after the mode has been changed.
11174990d495SXin LI	ntpq gives no indication that the mode has been switched.
11184990d495SXin LI   Mitigation:
11194990d495SXin LI        Implement BCP-38.
11204990d495SXin LI        Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
11214990d495SXin LI	    or the NTP Public Services Project Download Page.  These
11224990d495SXin LI	    versions will not dynamically "flip" into interleave mode
11234990d495SXin LI	    unless configured to do so.
11244990d495SXin LI        Properly monitor your ntpd instances.
11254990d495SXin LI   Credit: This weakness was discovered by Miroslav Lichvar of RedHat
11264990d495SXin LI   	and separately by Jonathan Gardner of Cisco ASIG.
11274990d495SXin LI
11284990d495SXin LI* Sybil vulnerability: ephemeral association attack
11294990d495SXin LI   Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
11304990d495SXin LI   References: Sec 3012 / CVE-2016-1549
11314990d495SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
11324990d495SXin LI   	4.3.0 up to, but not including 4.3.92
11334990d495SXin LI   CVSSv2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N)
11344990d495SXin LI   CVSS3v: MED 5.3 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
11354990d495SXin LI   Summary: ntpd can be vulnerable to Sybil attacks. If one is not using
11364990d495SXin LI   	the feature introduced in ntp-4.2.8p6 allowing an optional 4th
11374990d495SXin LI	field in the ntp.keys file to specify which IPs can serve time,
11384990d495SXin LI	a malicious authenticated peer can create arbitrarily-many
11394990d495SXin LI	ephemeral associations in order to win the clock selection of
11404990d495SXin LI	ntpd and modify a victim's clock.
11414990d495SXin LI   Mitigation:
11424990d495SXin LI        Implement BCP-38.
11434990d495SXin LI        Use the 4th field in the ntp.keys file to specify which IPs
11444990d495SXin LI	    can be time servers.
11454990d495SXin LI        Properly monitor your ntpd instances.
11464990d495SXin LI   Credit: This weakness was discovered by Matthew Van Gundy of Cisco ASIG.
11474990d495SXin LI
11484990d495SXin LIOther fixes:
11494990d495SXin LI
11504990d495SXin LI* [Bug 2831]  Segmentation Fault in DNS lookup during startup. perlinger@ntp.org
11514990d495SXin LI  - fixed yet another race condition in the threaded resolver code.
11524990d495SXin LI* [Bug 2858] bool support.  Use stdbool.h when available.  HStenn.
11534990d495SXin LI* [Bug 2879] Improve NTP security against timing attacks. perlinger@ntp.org
11544990d495SXin LI  - integrated patches by Loganaden Velvidron <logan@ntp.org>
11554990d495SXin LI    with some modifications & unit tests
11564990d495SXin LI* [Bug 2960] async name resolution fixes for chroot() environments.
11574990d495SXin LI  Reinhard Max.
11584990d495SXin LI* [Bug 2994] Systems with HAVE_SIGNALED_IO fail to compile. perlinger@ntp.org
11594990d495SXin LI* [Bug 2995] Fixes to compile on Windows
11604990d495SXin LI* [Bug 2999] out-of-bounds access in 'is_safe_filename()'. perlinger@ntp.org
11614990d495SXin LI* [Bug 3013] Fix for ssl_init.c SHA1 test. perlinger@ntp.org
11624990d495SXin LI  - Patch provided by Ch. Weisgerber
11634990d495SXin LI* [Bug 3015] ntpq: config-from-file: "request contains an unprintable character"
11644990d495SXin LI  - A change related to [Bug 2853] forbids trailing white space in
11654990d495SXin LI    remote config commands. perlinger@ntp.org
11664990d495SXin LI* [Bug 3019] NTPD stops processing packets after ERROR_HOST_UNREACHABLE
11674990d495SXin LI  - report and patch from Aleksandr Kostikov.
11684990d495SXin LI  - Overhaul of Windows IO completion port handling. perlinger@ntp.org
11694990d495SXin LI* [Bug 3022] authkeys.c should be refactored. perlinger@ntp.org
11704990d495SXin LI  - fixed memory leak in access list (auth[read]keys.c)
11714990d495SXin LI  - refactored handling of key access lists (auth[read]keys.c)
11724990d495SXin LI  - reduced number of error branches (authreadkeys.c)
11734990d495SXin LI* [Bug 3023] ntpdate cannot correct dates in the future. perlinger@ntp.org
11744990d495SXin LI* [Bug 3030] ntpq needs a general way to specify refid output format.  HStenn.
11754990d495SXin LI* [Bug 3031] ntp broadcastclient unable to synchronize to an server
11764990d495SXin LI             when the time of server changed. perlinger@ntp.org
11774990d495SXin LI  - Check the initial delay calculation and reject/unpeer the broadcast
11784990d495SXin LI    server if the delay exceeds 50ms. Retry again after the next
11794990d495SXin LI    broadcast packet.
11804990d495SXin LI* [Bug 3036] autokey trips an INSIST in authistrustedip().  Harlan Stenn.
11814990d495SXin LI* Document ntp.key's optional IP list in authenetic.html.  Harlan Stenn.
11824990d495SXin LI* Update html/xleave.html documentation.  Harlan Stenn.
11834990d495SXin LI* Update ntp.conf documentation.  Harlan Stenn.
11844990d495SXin LI* Fix some Credit: attributions in the NEWS file.  Harlan Stenn.
11854990d495SXin LI* Fix typo in html/monopt.html.  Harlan Stenn.
11864990d495SXin LI* Add README.pullrequests.  Harlan Stenn.
11874990d495SXin LI* Cleanup to include/ntp.h.  Harlan Stenn.
11884990d495SXin LI
11894990d495SXin LINew option to 'configure':
11904990d495SXin LI
11914990d495SXin LIWhile looking in to the issues around Bug 2978, the "interleave pivot"
11924990d495SXin LIissue, it became clear that there are some intricate and unresolved
11934990d495SXin LIissues with interleave operations.  We also realized that the interleave
11944990d495SXin LIprotocol was never added to the NTPv4 Standard, and it should have been.
11954990d495SXin LI
11964990d495SXin LIInterleave mode was first released in July of 2008, and can be engaged
11974990d495SXin LIin two ways.  Any 'peer' and 'broadcast' lines in the ntp.conf file may
11984990d495SXin LIcontain the 'xleave' option, which will expressly enable interlave mode
11994990d495SXin LIfor that association.  Additionally, if a time packet arrives and is
12004990d495SXin LIfound inconsistent with normal protocol behavior but has certain
12014990d495SXin LIcharacteristics that are compatible with interleave mode, NTP will
12024990d495SXin LIdynamically switch to interleave mode.  With sufficient knowledge, an
12034990d495SXin LIattacker can send a crafted forged packet to an NTP instance that
12044990d495SXin LItriggers only one side to enter interleaved mode.
12054990d495SXin LI
12064990d495SXin LITo prevent this attack until we can thoroughly document, describe,
12074990d495SXin LIfix, and test the dynamic interleave mode, we've added a new
12084990d495SXin LI'configure' option to the build process:
12094990d495SXin LI
12104990d495SXin LI --enable-dynamic-interleave
12114990d495SXin LI
12124990d495SXin LIThis option controls whether or not NTP will, if conditions are right,
12134990d495SXin LIengage dynamic interleave mode.  Dynamic interleave mode is disabled by
12144990d495SXin LIdefault in ntp-4.2.8p7.
12154990d495SXin LI
12164990d495SXin LI---
12174990d495SXin LINTP 4.2.8p6 (Harlan Stenn <stenn@ntp.org>, 2016/01/20)
121868ba7e87SXin LI
121968ba7e87SXin LIFocus: Security, Bug fixes, enhancements.
122068ba7e87SXin LI
122168ba7e87SXin LISeverity: MEDIUM
122268ba7e87SXin LI
122368ba7e87SXin LIIn addition to bug fixes and enhancements, this release fixes the
12244990d495SXin LIfollowing 1 low- and 8 medium-severity vulnerabilities:
122568ba7e87SXin LI
122668ba7e87SXin LI* Potential Infinite Loop in 'ntpq'
122768ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
122868ba7e87SXin LI   References: Sec 2548 / CVE-2015-8158
122968ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
123068ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
123168ba7e87SXin LI   CVSS2: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM
123268ba7e87SXin 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
123368ba7e87SXin LI   Summary: 'ntpq' processes incoming packets in a loop in 'getresponse()'.
123468ba7e87SXin LI	The loop's only stopping conditions are receiving a complete and
123568ba7e87SXin LI	correct response or hitting a small number of error conditions.
123668ba7e87SXin LI	If the packet contains incorrect values that don't trigger one of
123768ba7e87SXin LI	the error conditions, the loop continues to receive new packets.
123868ba7e87SXin LI	Note well, this is an attack against an instance of 'ntpq', not
123968ba7e87SXin LI	'ntpd', and this attack requires the attacker to do one of the
124068ba7e87SXin LI	following:
124168ba7e87SXin LI	* Own a malicious NTP server that the client trusts
124268ba7e87SXin LI	* Prevent a legitimate NTP server from sending packets to
124368ba7e87SXin LI	    the 'ntpq' client
124468ba7e87SXin LI	* MITM the 'ntpq' communications between the 'ntpq' client
124568ba7e87SXin LI	    and the NTP server
124668ba7e87SXin LI   Mitigation:
124768ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
124868ba7e87SXin LI	or the NTP Public Services Project Download Page
124968ba7e87SXin LI   Credit: This weakness was discovered by Jonathan Gardner of Cisco ASIG.
125068ba7e87SXin LI
125168ba7e87SXin LI* 0rigin: Zero Origin Timestamp Bypass
125268ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
125368ba7e87SXin LI   References: Sec 2945 / CVE-2015-8138
125468ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
125568ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
125668ba7e87SXin LI   CVSS2: (AV:N/AC:L/Au:N/C:N/I:P/A:N) Base Score: 5.0 - MEDIUM
125768ba7e87SXin 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
125868ba7e87SXin LI	(3.7 - LOW if you score AC:L)
125968ba7e87SXin LI   Summary: To distinguish legitimate peer responses from forgeries, a
126068ba7e87SXin LI	client attempts to verify a response packet by ensuring that the
126168ba7e87SXin LI	origin timestamp in the packet matches the origin timestamp it
126268ba7e87SXin LI	transmitted in its last request.  A logic error exists that
126368ba7e87SXin LI	allows packets with an origin timestamp of zero to bypass this
126468ba7e87SXin LI	check whenever there is not an outstanding request to the server.
126568ba7e87SXin LI   Mitigation:
126668ba7e87SXin LI	Configure 'ntpd' to get time from multiple sources.
126768ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
126868ba7e87SXin LI	    or the NTP Public Services Project Download Page.
126968ba7e87SXin LI	Monitor your 'ntpd= instances.
12704990d495SXin LI   Credit: This weakness was discovered by Matthey Van Gundy and
12714990d495SXin LI	Jonathan Gardner of Cisco ASIG.
127268ba7e87SXin LI
127368ba7e87SXin LI* Stack exhaustion in recursive traversal of restriction list
127468ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016
127568ba7e87SXin LI   References: Sec 2940 / CVE-2015-7978
127668ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
127768ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
127868ba7e87SXin LI   CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM
127968ba7e87SXin LI   Summary: An unauthenticated 'ntpdc reslist' command can cause a
128068ba7e87SXin LI   	segmentation fault in ntpd by exhausting the call stack.
128168ba7e87SXin LI   Mitigation:
128268ba7e87SXin LI	Implement BCP-38.
128368ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
128468ba7e87SXin LI	    or the NTP Public Services Project Download Page.
128568ba7e87SXin LI	If you are unable to upgrade:
128668ba7e87SXin LI            In ntp-4.2.8, mode 7 is disabled by default. Don't enable it.
128768ba7e87SXin LI	    If you must enable mode 7:
128868ba7e87SXin LI		configure the use of a 'requestkey' to control who can
128968ba7e87SXin LI		    issue mode 7 requests.
129068ba7e87SXin LI		configure 'restrict noquery' to further limit mode 7
129168ba7e87SXin LI		    requests to trusted sources.
129268ba7e87SXin LI		Monitor your ntpd instances.
129368ba7e87SXin LI   Credit: This weakness was discovered by Stephen Gray at Cisco ASIG.
129468ba7e87SXin LI
129568ba7e87SXin LI* Off-path Denial of Service (!DoS) attack on authenticated broadcast mode
129668ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
129768ba7e87SXin LI   References: Sec 2942 / CVE-2015-7979
129868ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
129968ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
130068ba7e87SXin LI   CVSS: (AV:N/AC:M/Au:N/C:N/I:P/A:P) Base Score: 5.8
130168ba7e87SXin LI   Summary: An off-path attacker can send broadcast packets with bad
130268ba7e87SXin LI	authentication (wrong key, mismatched key, incorrect MAC, etc)
130368ba7e87SXin LI	to broadcast clients. It is observed that the broadcast client
130468ba7e87SXin LI	tears down the association with the broadcast server upon
130568ba7e87SXin LI	receiving just one bad packet.
130668ba7e87SXin LI   Mitigation:
130768ba7e87SXin LI	Implement BCP-38.
130868ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
130968ba7e87SXin LI	or the NTP Public Services Project Download Page.
131068ba7e87SXin LI	Monitor your 'ntpd' instances.
131168ba7e87SXin LI	If this sort of attack is an active problem for you, you have
131268ba7e87SXin LI	    deeper problems to investigate.  In this case also consider
131368ba7e87SXin LI	    having smaller NTP broadcast domains.
131468ba7e87SXin LI   Credit: This weakness was discovered by Aanchal Malhotra of Boston
131568ba7e87SXin LI   	University.
131668ba7e87SXin LI
131768ba7e87SXin LI* reslist NULL pointer dereference
131868ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
131968ba7e87SXin LI   References: Sec 2939 / CVE-2015-7977
132068ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
132168ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
132268ba7e87SXin LI   CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM
132368ba7e87SXin LI   Summary: An unauthenticated 'ntpdc reslist' command can cause a
132468ba7e87SXin LI	segmentation fault in ntpd by causing a NULL pointer dereference.
132568ba7e87SXin LI   Mitigation:
132668ba7e87SXin LI	Implement BCP-38.
132768ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from NTP Project Download Page or
132868ba7e87SXin LI	the NTP Public Services Project Download Page.
132968ba7e87SXin LI	If you are unable to upgrade:
133068ba7e87SXin LI	    mode 7 is disabled by default.  Don't enable it.
133168ba7e87SXin LI	    If you must enable mode 7:
133268ba7e87SXin LI		configure the use of a 'requestkey' to control who can
133368ba7e87SXin LI		    issue mode 7 requests.
133468ba7e87SXin LI		configure 'restrict noquery' to further limit mode 7
133568ba7e87SXin LI		    requests to trusted sources.
133668ba7e87SXin LI	Monitor your ntpd instances.
133768ba7e87SXin LI   Credit: This weakness was discovered by Stephen Gray of Cisco ASIG.
133868ba7e87SXin LI
133968ba7e87SXin LI* 'ntpq saveconfig' command allows dangerous characters in filenames.
134068ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
134168ba7e87SXin LI   References: Sec 2938 / CVE-2015-7976
134268ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
134368ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
134468ba7e87SXin LI   CVSS: (AV:N/AC:L/Au:S/C:N/I:P/A:N) Base Score: 4.0 - MEDIUM
134568ba7e87SXin LI   Summary: The ntpq saveconfig command does not do adequate filtering
134668ba7e87SXin LI   	of special characters from the supplied filename.
134768ba7e87SXin LI	Note well: The ability to use the saveconfig command is controlled
134868ba7e87SXin LI	by the 'restrict nomodify' directive, and the recommended default
134968ba7e87SXin LI	configuration is to disable this capability.  If the ability to
135068ba7e87SXin LI	execute a 'saveconfig' is required, it can easily (and should) be
135168ba7e87SXin LI	limited and restricted to a known small number of IP addresses.
135268ba7e87SXin LI   Mitigation:
135368ba7e87SXin LI	Implement BCP-38.
135468ba7e87SXin LI	use 'restrict default nomodify' in your 'ntp.conf' file.
135568ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page.
135668ba7e87SXin LI	If you are unable to upgrade:
135768ba7e87SXin LI	    build NTP with 'configure --disable-saveconfig' if you will
135868ba7e87SXin LI	    	never need this capability, or
135968ba7e87SXin LI	    use 'restrict default nomodify' in your 'ntp.conf' file.  Be
136068ba7e87SXin LI		careful about what IPs have the ability to send 'modify'
136168ba7e87SXin LI		requests to 'ntpd'.
136268ba7e87SXin LI	Monitor your ntpd instances.
136368ba7e87SXin LI	'saveconfig' requests are logged to syslog - monitor your syslog files.
136468ba7e87SXin LI   Credit: This weakness was discovered by Jonathan Gardner of Cisco ASIG.
136568ba7e87SXin LI
136668ba7e87SXin LI* nextvar() missing length check in ntpq
136768ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
136868ba7e87SXin LI   References: Sec 2937 / CVE-2015-7975
136968ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
137068ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
137168ba7e87SXin LI   CVSS: (AV:L/AC:H/Au:N/C:N/I:N/A:P) Base Score: 1.2 - LOW
137268ba7e87SXin LI	If you score A:C, this becomes 4.0.
137368ba7e87SXin 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
137468ba7e87SXin LI   Summary: ntpq may call nextvar() which executes a memcpy() into the
137568ba7e87SXin LI	name buffer without a proper length check against its maximum
137668ba7e87SXin LI	length of 256 bytes. Note well that we're taking about ntpq here.
137768ba7e87SXin LI	The usual worst-case effect of this vulnerability is that the
137868ba7e87SXin LI	specific instance of ntpq will crash and the person or process
137968ba7e87SXin LI	that did this will have stopped themselves.
138068ba7e87SXin LI   Mitigation:
138168ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
138268ba7e87SXin LI	    or the NTP Public Services Project Download Page.
138368ba7e87SXin LI	If you are unable to upgrade:
138468ba7e87SXin LI	    If you have scripts that feed input to ntpq make sure there are
138568ba7e87SXin LI		some sanity checks on the input received from the "outside".
138668ba7e87SXin LI	    This is potentially more dangerous if ntpq is run as root.
138768ba7e87SXin LI   Credit: This weakness was discovered by Jonathan Gardner at Cisco ASIG.
138868ba7e87SXin LI
138968ba7e87SXin LI* Skeleton Key: Any trusted key system can serve time
139068ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
139168ba7e87SXin LI   References: Sec 2936 / CVE-2015-7974
139268ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
139368ba7e87SXin LI	4.3.0 up to, but not including 4.3.90
139468ba7e87SXin LI   CVSS: (AV:N/AC:H/Au:S/C:N/I:C/A:N) Base Score: 4.9
139568ba7e87SXin LI   Summary: Symmetric key encryption uses a shared trusted key. The
139668ba7e87SXin LI	reported title for this issue was "Missing key check allows
139768ba7e87SXin LI	impersonation between authenticated peers" and the report claimed
139868ba7e87SXin LI	"A key specified only for one server should only work to
139968ba7e87SXin LI	authenticate that server, other trusted keys should be refused."
140068ba7e87SXin LI	Except there has never been any correlation between this trusted
140168ba7e87SXin LI	key and server v. clients machines and there has never been any
140268ba7e87SXin LI	way to specify a key only for one server. We have treated this as
140368ba7e87SXin LI	an enhancement request, and ntp-4.2.8p6 includes other checks and
140468ba7e87SXin LI	tests to strengthen clients against attacks coming from broadcast
140568ba7e87SXin LI	servers.
140668ba7e87SXin LI   Mitigation:
140768ba7e87SXin LI	Implement BCP-38.
140868ba7e87SXin LI	If this scenario represents a real or a potential issue for you,
140968ba7e87SXin LI	    upgrade to 4.2.8p6, or later, from the NTP Project Download
141068ba7e87SXin LI	    Page or the NTP Public Services Project Download Page, and
141168ba7e87SXin LI	    use the new field in the ntp.keys file that specifies the list
141268ba7e87SXin LI	    of IPs that are allowed to serve time. Note that this alone
141368ba7e87SXin LI	    will not protect against time packets with forged source IP
141468ba7e87SXin LI	    addresses, however other changes in ntp-4.2.8p6 provide
141568ba7e87SXin LI	    significant mitigation against broadcast attacks. MITM attacks
141668ba7e87SXin LI	    are a different story.
141768ba7e87SXin LI	If you are unable to upgrade:
141868ba7e87SXin LI	    Don't use broadcast mode if you cannot monitor your client
141968ba7e87SXin LI	    	servers.
142068ba7e87SXin LI	    If you choose to use symmetric keys to authenticate time
142168ba7e87SXin LI	    	packets in a hostile environment where ephemeral time
142268ba7e87SXin LI		servers can be created, or if it is expected that malicious
142368ba7e87SXin LI		time servers will participate in an NTP broadcast domain,
142468ba7e87SXin LI		limit the number of participating systems that participate
142568ba7e87SXin LI		in the shared-key group.
142668ba7e87SXin LI	Monitor your ntpd instances.
142768ba7e87SXin LI   Credit: This weakness was discovered by Matt Street of Cisco ASIG.
142868ba7e87SXin LI
142968ba7e87SXin LI* Deja Vu: Replay attack on authenticated broadcast mode
143068ba7e87SXin LI   Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
143168ba7e87SXin LI   References: Sec 2935 / CVE-2015-7973
143268ba7e87SXin LI   Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
143368ba7e87SXin LI   	4.3.0 up to, but not including 4.3.90
143468ba7e87SXin LI   CVSS: (AV:A/AC:M/Au:N/C:N/I:P/A:P) Base Score: 4.3 - MEDIUM
143568ba7e87SXin LI   Summary: If an NTP network is configured for broadcast operations then
143668ba7e87SXin LI   	either a man-in-the-middle attacker or a malicious participant
143768ba7e87SXin LI	that has the same trusted keys as the victim can replay time packets.
143868ba7e87SXin LI   Mitigation:
143968ba7e87SXin LI	Implement BCP-38.
144068ba7e87SXin LI	Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
144168ba7e87SXin LI	    or the NTP Public Services Project Download Page.
144268ba7e87SXin LI	If you are unable to upgrade:
144368ba7e87SXin LI	    Don't use broadcast mode if you cannot monitor your client servers.
144468ba7e87SXin LI	Monitor your ntpd instances.
144568ba7e87SXin LI   Credit: This weakness was discovered by Aanchal Malhotra of Boston
144668ba7e87SXin LI	University.
144768ba7e87SXin LI
144868ba7e87SXin LIOther fixes:
144968ba7e87SXin LI
145068ba7e87SXin LI* [Bug 2772] adj_systime overflows tv_usec. perlinger@ntp.org
145168ba7e87SXin LI* [Bug 2814] msyslog deadlock when signaled. perlinger@ntp.org
145268ba7e87SXin LI  - applied patch by shenpeng11@huawei.com with minor adjustments
145368ba7e87SXin LI* [Bug 2882] Look at ntp_request.c:list_peers_sum(). perlinger@ntp.org
145468ba7e87SXin LI* [Bug 2891] Deadlock in deferred DNS lookup framework. perlinger@ntp.org
145568ba7e87SXin LI* [Bug 2892] Several test cases assume IPv6 capabilities even when
145668ba7e87SXin LI             IPv6 is disabled in the build. perlinger@ntp.org
145768ba7e87SXin LI  - Found this already fixed, but validation led to cleanup actions.
145868ba7e87SXin LI* [Bug 2905] DNS lookups broken. perlinger@ntp.org
145968ba7e87SXin LI  - added limits to stack consumption, fixed some return code handling
146068ba7e87SXin LI* [Bug 2971] ntpq bails on ^C: select fails: Interrupted system call
146168ba7e87SXin LI  - changed stacked/nested handling of CTRL-C. perlinger@ntp.org
146268ba7e87SXin LI  - make CTRL-C work for retrieval and printing od MRU list. perlinger@ntp.org
146368ba7e87SXin LI* [Bug 2980] reduce number of warnings. perlinger@ntp.org
146468ba7e87SXin LI  - integrated several patches from Havard Eidnes (he@uninett.no)
146568ba7e87SXin LI* [Bug 2985] bogus calculation in authkeys.c perlinger@ntp.org
146668ba7e87SXin LI  - implement 'auth_log2()' using integer bithack instead of float calculation
146768ba7e87SXin LI* Make leapsec_query debug messages less verbose.  Harlan Stenn.
146868ba7e87SXin LI
146968ba7e87SXin LI---
14704990d495SXin LINTP 4.2.8p5 (Harlan Stenn <stenn@ntp.org>, 2016/01/07)
14713311ff84SXin LI
14723311ff84SXin LIFocus: Security, Bug fixes, enhancements.
14733311ff84SXin LI
14743311ff84SXin LISeverity: MEDIUM
14753311ff84SXin LI
14763311ff84SXin LIIn addition to bug fixes and enhancements, this release fixes the
14773311ff84SXin LIfollowing medium-severity vulnerability:
14783311ff84SXin LI
14793311ff84SXin LI* Small-step/big-step.  Close the panic gate earlier.
14803311ff84SXin LI    References: Sec 2956, CVE-2015-5300
14813311ff84SXin LI    Affects: All ntp-4 releases up to, but not including 4.2.8p5, and
14823311ff84SXin LI	4.3.0 up to, but not including 4.3.78
14833311ff84SXin LI    CVSS3: (AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:N/A:L) Base Score: 4.0, MEDIUM
14843311ff84SXin LI    Summary: If ntpd is always started with the -g option, which is
14853311ff84SXin LI	common and against long-standing recommendation, and if at the
14863311ff84SXin LI	moment ntpd is restarted an attacker can immediately respond to
14873311ff84SXin LI	enough requests from enough sources trusted by the target, which
14883311ff84SXin LI	is difficult and not common, there is a window of opportunity
14893311ff84SXin LI	where the attacker can cause ntpd to set the time to an
14903311ff84SXin LI	arbitrary value. Similarly, if an attacker is able to respond
14913311ff84SXin LI	to enough requests from enough sources trusted by the target,
14923311ff84SXin LI	the attacker can cause ntpd to abort and restart, at which
14933311ff84SXin LI	point it can tell the target to set the time to an arbitrary
14943311ff84SXin LI	value if and only if ntpd was re-started against long-standing
14953311ff84SXin LI	recommendation with the -g flag, or if ntpd was not given the
14963311ff84SXin LI	-g flag, the attacker can move the target system's time by at
14973311ff84SXin LI	most 900 seconds' time per attack.
14983311ff84SXin LI    Mitigation:
14993311ff84SXin LI	Configure ntpd to get time from multiple sources.
15003311ff84SXin LI	Upgrade to 4.2.8p5, or later, from the NTP Project Download
15013311ff84SXin LI	    Page or the NTP Public Services Project Download Page
15023311ff84SXin LI	As we've long documented, only use the -g option to ntpd in
15033311ff84SXin LI	    cold-start situations.
15043311ff84SXin LI	Monitor your ntpd instances.
15053311ff84SXin LI    Credit: This weakness was discovered by Aanchal Malhotra,
15063311ff84SXin LI	Isaac E. Cohen, and Sharon Goldberg at Boston University.
15073311ff84SXin LI
15083311ff84SXin LI    NOTE WELL: The -g flag disables the limit check on the panic_gate
15093311ff84SXin LI	in ntpd, which is 900 seconds by default. The bug identified by
15103311ff84SXin LI	the researchers at Boston University is that the panic_gate
15113311ff84SXin LI	check was only re-enabled after the first change to the system
15123311ff84SXin LI	clock that was greater than 128 milliseconds, by default. The
15133311ff84SXin LI	correct behavior is that the panic_gate check should be
15143311ff84SXin LI	re-enabled after any initial time correction.
15153311ff84SXin LI
15163311ff84SXin LI	If an attacker is able to inject consistent but erroneous time
15173311ff84SXin LI	responses to your systems via the network or "over the air",
15183311ff84SXin LI	perhaps by spoofing radio, cellphone, or navigation satellite
15193311ff84SXin LI	transmissions, they are in a great position to affect your
15203311ff84SXin LI	system's clock. There comes a point where your very best
15213311ff84SXin LI	defenses include:
15223311ff84SXin LI
15233311ff84SXin LI	    Configure ntpd to get time from multiple sources.
15243311ff84SXin LI	    Monitor your ntpd instances.
15253311ff84SXin LI
15263311ff84SXin LIOther fixes:
15273311ff84SXin LI
15283311ff84SXin LI* Coverity submission process updated from Coverity 5 to Coverity 7.
15293311ff84SXin LI  The NTP codebase has been undergoing regular Coverity scans on an
15303311ff84SXin LI  ongoing basis since 2006.  As part of our recent upgrade from
15313311ff84SXin LI  Coverity 5 to Coverity 7, Coverity identified 16 nits in some of
15323311ff84SXin LI  the newly-written Unity test programs.  These were fixed.
15333311ff84SXin LI* [Bug 2829] Clean up pipe_fds in ntpd.c  perlinger@ntp.org
15343311ff84SXin LI* [Bug 2887] stratum -1 config results as showing value 99
15353311ff84SXin LI  - fudge stratum should only accept values [0..16]. perlinger@ntp.org
15363311ff84SXin LI* [Bug 2932] Update leapsecond file info in miscopt.html.  CWoodbury, HStenn.
15373311ff84SXin LI* [Bug 2934] tests/ntpd/t-ntp_scanner.c has a magic constant wired in.  HMurray
15383311ff84SXin LI* [Bug 2944] errno is not preserved properly in ntpdate after sendto call.
15393311ff84SXin LI  - applied patch by Christos Zoulas.  perlinger@ntp.org
15403311ff84SXin LI* [Bug 2952] Peer associations broken by fix for Bug 2901/CVE-2015-7704.
15413311ff84SXin LI* [Bug 2954] Version 4.2.8p4 crashes on startup on some OSes.
15423311ff84SXin LI  - fixed data race conditions in threaded DNS worker. perlinger@ntp.org
15433311ff84SXin LI  - limit threading warm-up to linux; FreeBSD bombs on it. perlinger@ntp.org
15443311ff84SXin LI* [Bug 2957] 'unsigned int' vs 'size_t' format clash. perlinger@ntp.org
15453311ff84SXin LI  - accept key file only if there are no parsing errors
15463311ff84SXin LI  - fixed size_t/u_int format clash
15473311ff84SXin LI  - fixed wrong use of 'strlcpy'
15483311ff84SXin LI* [Bug 2958] ntpq: fatal error messages need a final newline. Craig Leres.
15493311ff84SXin LI* [Bug 2962] truncation of size_t/ptrdiff_t on 64bit targets. perlinger@ntp.org
15503311ff84SXin LI  - fixed several other warnings (cast-alignment, missing const, missing prototypes)
15513311ff84SXin LI  - promote use of 'size_t' for values that express a size
15523311ff84SXin LI  - use ptr-to-const for read-only arguments
15533311ff84SXin LI  - make sure SOCKET values are not truncated (win32-specific)
15543311ff84SXin LI  - format string fixes
15553311ff84SXin LI* [Bug 2965] Local clock didn't work since 4.2.8p4.  Martin Burnicki.
15563311ff84SXin LI* [Bug 2967] ntpdate command suffers an assertion failure
15573311ff84SXin LI  - fixed ntp_rfc2553.c to return proper address length. perlinger@ntp.org
15583311ff84SXin LI* [Bug 2969]  Seg fault from ntpq/mrulist when looking at server with
15593311ff84SXin LI              lots of clients. perlinger@ntp.org
15603311ff84SXin LI* [Bug 2971] ntpq bails on ^C: select fails: Interrupted system call
15613311ff84SXin LI  - changed stacked/nested handling of CTRL-C. perlinger@ntp.org
15623311ff84SXin LI* Unity cleanup for FreeBSD-6.4.  Harlan Stenn.
15633311ff84SXin LI* Unity test cleanup.  Harlan Stenn.
15643311ff84SXin LI* Libevent autoconf pthread fixes for FreeBSD-10.  Harlan Stenn.
15653311ff84SXin LI* Header cleanup in tests/sandbox/uglydate.c.  Harlan Stenn.
15663311ff84SXin LI* Header cleanup in tests/libntp/sfptostr.c.  Harlan Stenn.
15673311ff84SXin LI* Quiet a warning from clang.  Harlan Stenn.
15683311ff84SXin LI
15693311ff84SXin LI---
15704990d495SXin LINTP 4.2.8p4 (Harlan Stenn <stenn@ntp.org>, 2015/10/21)
15719034852cSGleb Smirnoff
15723311ff84SXin LIFocus: Security, Bug fixes, enhancements.
15739034852cSGleb Smirnoff
15749034852cSGleb SmirnoffSeverity: MEDIUM
15759034852cSGleb Smirnoff
15769034852cSGleb SmirnoffIn addition to bug fixes and enhancements, this release fixes the
15779034852cSGleb Smirnofffollowing 13 low- and medium-severity vulnerabilities:
15789034852cSGleb Smirnoff
15799034852cSGleb Smirnoff* Incomplete vallen (value length) checks in ntp_crypto.c, leading
15809034852cSGleb Smirnoff  to potential crashes or potential code injection/information leakage.
15819034852cSGleb Smirnoff
15829034852cSGleb Smirnoff    References: Sec 2899, Sec 2671, CVE-2015-7691, CVE-2015-7692, CVE-2015-7702
15839034852cSGleb Smirnoff    Affects: All ntp-4 releases up to, but not including 4.2.8p4,
15849034852cSGleb Smirnoff    	and 4.3.0 up to, but not including 4.3.77
15859034852cSGleb Smirnoff    CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6
15869034852cSGleb Smirnoff    Summary: The fix for CVE-2014-9750 was incomplete in that there were
15879034852cSGleb Smirnoff    	certain code paths where a packet with particular autokey operations
15889034852cSGleb Smirnoff	that contained malicious data was not always being completely
15899034852cSGleb Smirnoff	validated. Receipt of these packets can cause ntpd to crash.
15909034852cSGleb Smirnoff    Mitigation:
15919034852cSGleb Smirnoff        Don't use autokey.
15929034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
15939034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page
15949034852cSGleb Smirnoff	Monitor your ntpd instances.
15959034852cSGleb Smirnoff	Credit: This weakness was discovered by Tenable Network Security.
15969034852cSGleb Smirnoff
15979034852cSGleb Smirnoff* Clients that receive a KoD should validate the origin timestamp field.
15989034852cSGleb Smirnoff
15999034852cSGleb Smirnoff    References: Sec 2901 / CVE-2015-7704, CVE-2015-7705
16009034852cSGleb Smirnoff    Affects: All ntp-4 releases up to, but not including 4.2.8p4,
16019034852cSGleb Smirnoff	and 4.3.0 up to, but not including 4.3.77
16029034852cSGleb Smirnoff    CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3-5.0 at worst
16039034852cSGleb Smirnoff    Summary: An ntpd client that honors Kiss-of-Death responses will honor
16049034852cSGleb Smirnoff    	KoD messages that have been forged by an attacker, causing it to
16059034852cSGleb Smirnoff	delay or stop querying its servers for time updates. Also, an
16069034852cSGleb Smirnoff	attacker can forge packets that claim to be from the target and
16079034852cSGleb Smirnoff	send them to servers often enough that a server that implements
16089034852cSGleb Smirnoff	KoD rate limiting will send the target machine a KoD response to
16099034852cSGleb Smirnoff	attempt to reduce the rate of incoming packets, or it may also
16109034852cSGleb Smirnoff	trigger a firewall block at the server for packets from the target
16119034852cSGleb Smirnoff	machine. For either of these attacks to succeed, the attacker must
16129034852cSGleb Smirnoff	know what servers the target is communicating with. An attacker
16139034852cSGleb Smirnoff	can be anywhere on the Internet and can frequently learn the
16149034852cSGleb Smirnoff	identity of the target's time source by sending the target a
16159034852cSGleb Smirnoff	time query.
16169034852cSGleb Smirnoff    Mitigation:
16179034852cSGleb Smirnoff        Implement BCP-38.
16189034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download Page
16199034852cSGleb Smirnoff	    or the NTP Public Services Project Download Page
16209034852cSGleb Smirnoff	If you can't upgrade, restrict who can query ntpd to learn who
16219034852cSGleb Smirnoff	    its servers are, and what IPs are allowed to ask your system
16229034852cSGleb Smirnoff	    for the time. This mitigation is heavy-handed.
16239034852cSGleb Smirnoff	Monitor your ntpd instances.
16249034852cSGleb Smirnoff    Note:
16259034852cSGleb Smirnoff    	4.2.8p4 protects against the first attack. For the second attack,
16269034852cSGleb Smirnoff    	all we can do is warn when it is happening, which we do in 4.2.8p4.
16279034852cSGleb Smirnoff    Credit: This weakness was discovered by Aanchal Malhotra,
16289034852cSGleb Smirnoff    	Issac E. Cohen, and Sharon Goldberg of Boston University.
16299034852cSGleb Smirnoff
16309034852cSGleb Smirnoff* configuration directives to change "pidfile" and "driftfile" should
16319034852cSGleb Smirnoff  only be allowed locally.
16329034852cSGleb Smirnoff
16339034852cSGleb Smirnoff  References: Sec 2902 / CVE-2015-5196
16349034852cSGleb Smirnoff  Affects: All ntp-4 releases up to, but not including 4.2.8p4,
16359034852cSGleb Smirnoff	and 4.3.0 up to, but not including 4.3.77
16369034852cSGleb Smirnoff   CVSS: (AV:N/AC:H/Au:M/C:N/I:C/A:C) Base Score: 6.2 worst case
16379034852cSGleb Smirnoff   Summary: If ntpd is configured to allow for remote configuration,
16389034852cSGleb Smirnoff	and if the (possibly spoofed) source IP address is allowed to
16399034852cSGleb Smirnoff	send remote configuration requests, and if the attacker knows
16409034852cSGleb Smirnoff	the remote configuration password, it's possible for an attacker
16419034852cSGleb Smirnoff	to use the "pidfile" or "driftfile" directives to potentially
16429034852cSGleb Smirnoff	overwrite other files.
16439034852cSGleb Smirnoff   Mitigation:
16449034852cSGleb Smirnoff	Implement BCP-38.
16459034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
16469034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page
16479034852cSGleb Smirnoff	If you cannot upgrade, don't enable remote configuration.
16489034852cSGleb Smirnoff	If you must enable remote configuration and cannot upgrade,
16499034852cSGleb Smirnoff	    remote configuration of NTF's ntpd requires:
16509034852cSGleb Smirnoff	    - an explicitly configured trustedkey, and you should also
16519034852cSGleb Smirnoff	    	configure a controlkey.
16529034852cSGleb Smirnoff	    - access from a permitted IP. You choose the IPs.
16539034852cSGleb Smirnoff	    - authentication. Don't disable it. Practice secure key safety.
16549034852cSGleb Smirnoff	Monitor your ntpd instances.
16559034852cSGleb Smirnoff   Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
16569034852cSGleb Smirnoff
16579034852cSGleb Smirnoff* Slow memory leak in CRYPTO_ASSOC
16589034852cSGleb Smirnoff
16599034852cSGleb Smirnoff  References: Sec 2909 / CVE-2015-7701
16609034852cSGleb Smirnoff  Affects: All ntp-4 releases that use autokey up to, but not
16619034852cSGleb Smirnoff    including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
16629034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 0.0 best/usual case,
16639034852cSGleb Smirnoff  	4.6 otherwise
16649034852cSGleb Smirnoff  Summary: If ntpd is configured to use autokey, then an attacker can
16659034852cSGleb Smirnoff	send packets to ntpd that will, after several days of ongoing
16669034852cSGleb Smirnoff	attack, cause it to run out of memory.
16679034852cSGleb Smirnoff  Mitigation:
16689034852cSGleb Smirnoff	Don't use autokey.
16699034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
16709034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page
16719034852cSGleb Smirnoff	Monitor your ntpd instances.
16729034852cSGleb Smirnoff  Credit: This weakness was discovered by Tenable Network Security.
16739034852cSGleb Smirnoff
16749034852cSGleb Smirnoff* mode 7 loop counter underrun
16759034852cSGleb Smirnoff
16769034852cSGleb Smirnoff  References:  Sec 2913 / CVE-2015-7848 / TALOS-CAN-0052
16779034852cSGleb Smirnoff  Affects: All ntp-4 releases up to, but not including 4.2.8p4,
16789034852cSGleb Smirnoff  	and 4.3.0 up to, but not including 4.3.77
16799034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6
16809034852cSGleb Smirnoff  Summary: If ntpd is configured to enable mode 7 packets, and if the
16819034852cSGleb Smirnoff	use of mode 7 packets is not properly protected thru the use of
16829034852cSGleb Smirnoff	the available mode 7 authentication and restriction mechanisms,
16839034852cSGleb Smirnoff	and if the (possibly spoofed) source IP address is allowed to
16849034852cSGleb Smirnoff	send mode 7 queries, then an attacker can send a crafted packet
16859034852cSGleb Smirnoff	to ntpd that will cause it to crash.
16869034852cSGleb Smirnoff  Mitigation:
16879034852cSGleb Smirnoff	Implement BCP-38.
16889034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
16899034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
16909034852cSGleb Smirnoff	      If you are unable to upgrade:
16919034852cSGleb Smirnoff	In ntp-4.2.8, mode 7 is disabled by default. Don't enable it.
16929034852cSGleb Smirnoff	If you must enable mode 7:
16939034852cSGleb Smirnoff	    configure the use of a requestkey to control who can issue
16949034852cSGleb Smirnoff		mode 7 requests.
16959034852cSGleb Smirnoff	    configure restrict noquery to further limit mode 7 requests
16969034852cSGleb Smirnoff		to trusted sources.
16979034852cSGleb Smirnoff	Monitor your ntpd instances.
16989034852cSGleb SmirnoffCredit: This weakness was discovered by Aleksandar Nikolic of Cisco Talos.
16999034852cSGleb Smirnoff
17009034852cSGleb Smirnoff* memory corruption in password store
17019034852cSGleb Smirnoff
17029034852cSGleb Smirnoff  References: Sec 2916 / CVE-2015-7849 / TALOS-CAN-0054
17039034852cSGleb 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
17049034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:N/I:C/A:C) Base Score: 6.8, worst case
17059034852cSGleb Smirnoff  Summary: If ntpd is configured to allow remote configuration, and if
17069034852cSGleb Smirnoff	the (possibly spoofed) source IP address is allowed to send
17079034852cSGleb Smirnoff	remote configuration requests, and if the attacker knows the
17089034852cSGleb Smirnoff	remote configuration password or if ntpd was configured to
17099034852cSGleb Smirnoff	disable authentication, then an attacker can send a set of
17109034852cSGleb Smirnoff	packets to ntpd that may cause a crash or theoretically
17119034852cSGleb Smirnoff	perform a code injection attack.
17129034852cSGleb Smirnoff  Mitigation:
17139034852cSGleb Smirnoff	Implement BCP-38.
17149034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
17159034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
17169034852cSGleb Smirnoff	If you are unable to upgrade, remote configuration of NTF's
17179034852cSGleb Smirnoff	    ntpd requires:
17189034852cSGleb Smirnoff		an explicitly configured "trusted" key. Only configure
17199034852cSGleb Smirnoff			this if you need it.
17209034852cSGleb Smirnoff		access from a permitted IP address. You choose the IPs.
17219034852cSGleb Smirnoff		authentication. Don't disable it. Practice secure key safety.
17229034852cSGleb Smirnoff	Monitor your ntpd instances.
17239034852cSGleb Smirnoff  Credit: This weakness was discovered by Yves Younan of Cisco Talos.
17249034852cSGleb Smirnoff
17259034852cSGleb Smirnoff* Infinite loop if extended logging enabled and the logfile and
17269034852cSGleb Smirnoff  keyfile are the same.
17279034852cSGleb Smirnoff
17289034852cSGleb Smirnoff    References: Sec 2917 / CVE-2015-7850 / TALOS-CAN-0055
17299034852cSGleb Smirnoff    Affects: All ntp-4 releases up to, but not including 4.2.8p4,
17309034852cSGleb Smirnoff	and 4.3.0 up to, but not including 4.3.77
17319034852cSGleb Smirnoff    CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6, worst case
17329034852cSGleb Smirnoff    Summary: If ntpd is configured to allow remote configuration, and if
17339034852cSGleb Smirnoff	the (possibly spoofed) source IP address is allowed to send
17349034852cSGleb Smirnoff	remote configuration requests, and if the attacker knows the
17359034852cSGleb Smirnoff	remote configuration password or if ntpd was configured to
17369034852cSGleb Smirnoff	disable authentication, then an attacker can send a set of
17379034852cSGleb Smirnoff	packets to ntpd that will cause it to crash and/or create a
17389034852cSGleb Smirnoff	potentially huge log file. Specifically, the attacker could
17399034852cSGleb Smirnoff	enable extended logging, point the key file at the log file,
17409034852cSGleb Smirnoff	and cause what amounts to an infinite loop.
17419034852cSGleb Smirnoff    Mitigation:
17429034852cSGleb Smirnoff	Implement BCP-38.
17439034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
17449034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
17459034852cSGleb Smirnoff	If you are unable to upgrade, remote configuration of NTF's ntpd
17469034852cSGleb Smirnoff	  requires:
17479034852cSGleb Smirnoff            an explicitly configured "trusted" key. Only configure this
17489034852cSGleb Smirnoff	    	if you need it.
17499034852cSGleb Smirnoff            access from a permitted IP address. You choose the IPs.
17509034852cSGleb Smirnoff            authentication. Don't disable it. Practice secure key safety.
17519034852cSGleb Smirnoff        Monitor your ntpd instances.
17529034852cSGleb Smirnoff    Credit: This weakness was discovered by Yves Younan of Cisco Talos.
17539034852cSGleb Smirnoff
17549034852cSGleb Smirnoff* Potential path traversal vulnerability in the config file saving of
17559034852cSGleb Smirnoff  ntpd on VMS.
17569034852cSGleb Smirnoff
17579034852cSGleb Smirnoff  References: Sec 2918 / CVE-2015-7851 / TALOS-CAN-0062
17589034852cSGleb Smirnoff  Affects: All ntp-4 releases running under VMS up to, but not
17599034852cSGleb Smirnoff	including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
17609034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:N/I:P/A:C) Base Score: 5.2, worst case
17619034852cSGleb Smirnoff  Summary: If ntpd is configured to allow remote configuration, and if
17629034852cSGleb Smirnoff	the (possibly spoofed) IP address is allowed to send remote
17639034852cSGleb Smirnoff	configuration requests, and if the attacker knows the remote
17649034852cSGleb Smirnoff	configuration password or if ntpd was configured to disable
17659034852cSGleb Smirnoff	authentication, then an attacker can send a set of packets to
17669034852cSGleb Smirnoff	ntpd that may cause ntpd to overwrite files.
17679034852cSGleb Smirnoff  Mitigation:
17689034852cSGleb Smirnoff	Implement BCP-38.
17699034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
17709034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
17719034852cSGleb Smirnoff	If you are unable to upgrade, remote configuration of NTF's ntpd
17729034852cSGleb Smirnoff	    requires:
17739034852cSGleb Smirnoff		an explicitly configured "trusted" key. Only configure
17749034852cSGleb Smirnoff			this if you need it.
17759034852cSGleb Smirnoff		access from permitted IP addresses. You choose the IPs.
17769034852cSGleb Smirnoff		authentication. Don't disable it. Practice key security safety.
17779034852cSGleb Smirnoff        Monitor your ntpd instances.
17789034852cSGleb Smirnoff    Credit: This weakness was discovered by Yves Younan of Cisco Talos.
17799034852cSGleb Smirnoff
17809034852cSGleb Smirnoff* ntpq atoascii() potential memory corruption
17819034852cSGleb Smirnoff
17829034852cSGleb Smirnoff  References: Sec 2919 / CVE-2015-7852 / TALOS-CAN-0063
17839034852cSGleb Smirnoff  Affects: All ntp-4 releases running up to, but not including 4.2.8p4,
17849034852cSGleb Smirnoff	and 4.3.0 up to, but not including 4.3.77
17859034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:N/C:N/I:P/A:P) Base Score: 4.0, worst case
17869034852cSGleb Smirnoff  Summary: If an attacker can figure out the precise moment that ntpq
17879034852cSGleb Smirnoff	is listening for data and the port number it is listening on or
17889034852cSGleb Smirnoff	if the attacker can provide a malicious instance ntpd that
17899034852cSGleb Smirnoff	victims will connect to then an attacker can send a set of
17909034852cSGleb Smirnoff	crafted mode 6 response packets that, if received by ntpq,
17919034852cSGleb Smirnoff	can cause ntpq to crash.
17929034852cSGleb Smirnoff  Mitigation:
17939034852cSGleb Smirnoff	Implement BCP-38.
17949034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
17959034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
17969034852cSGleb Smirnoff	If you are unable to upgrade and you run ntpq against a server
17979034852cSGleb Smirnoff	    and ntpq crashes, try again using raw mode. Build or get a
17989034852cSGleb Smirnoff	    patched ntpq and see if that fixes the problem. Report new
17999034852cSGleb Smirnoff	    bugs in ntpq or abusive servers appropriately.
18009034852cSGleb Smirnoff	If you use ntpq in scripts, make sure ntpq does what you expect
18019034852cSGleb Smirnoff	    in your scripts.
18029034852cSGleb Smirnoff  Credit: This weakness was discovered by Yves Younan and
18039034852cSGleb Smirnoff  	Aleksander Nikolich of Cisco Talos.
18049034852cSGleb Smirnoff
18059034852cSGleb Smirnoff* Invalid length data provided by a custom refclock driver could cause
18069034852cSGleb Smirnoff  a buffer overflow.
18079034852cSGleb Smirnoff
18089034852cSGleb Smirnoff  References: Sec 2920 / CVE-2015-7853 / TALOS-CAN-0064
18099034852cSGleb Smirnoff  Affects: Potentially all ntp-4 releases running up to, but not
18109034852cSGleb Smirnoff	including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
18119034852cSGleb Smirnoff	that have custom refclocks
18129034852cSGleb Smirnoff  CVSS: (AV:L/AC:H/Au:M/C:C/I:C/A:C) Base Score: 0.0 usual case,
18139034852cSGleb Smirnoff	5.9 unusual worst case
18149034852cSGleb Smirnoff  Summary: A negative value for the datalen parameter will overflow a
18159034852cSGleb Smirnoff	data buffer. NTF's ntpd driver implementations always set this
18169034852cSGleb Smirnoff	value to 0 and are therefore not vulnerable to this weakness.
18179034852cSGleb Smirnoff	If you are running a custom refclock driver in ntpd and that
18189034852cSGleb Smirnoff	driver supplies a negative value for datalen (no custom driver
18199034852cSGleb Smirnoff	of even minimal competence would do this) then ntpd would
18209034852cSGleb Smirnoff	overflow a data buffer. It is even hypothetically possible
18219034852cSGleb Smirnoff	in this case that instead of simply crashing ntpd the attacker
18229034852cSGleb Smirnoff	could effect a code injection attack.
18239034852cSGleb Smirnoff  Mitigation:
18249034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
18259034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
18269034852cSGleb Smirnoff	If you are unable to upgrade:
18279034852cSGleb Smirnoff		If you are running custom refclock drivers, make sure
18289034852cSGleb Smirnoff			the signed datalen value is either zero or positive.
18299034852cSGleb Smirnoff	Monitor your ntpd instances.
18309034852cSGleb Smirnoff  Credit: This weakness was discovered by Yves Younan of Cisco Talos.
18319034852cSGleb Smirnoff
18329034852cSGleb Smirnoff* Password Length Memory Corruption Vulnerability
18339034852cSGleb Smirnoff
18349034852cSGleb Smirnoff  References: Sec 2921 / CVE-2015-7854 / TALOS-CAN-0065
18359034852cSGleb Smirnoff  Affects: All ntp-4 releases up to, but not including 4.2.8p4, and
18369034852cSGleb Smirnoff  	4.3.0 up to, but not including 4.3.77
18379034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:C/I:C/A:C) Base Score: 0.0 best case,
18389034852cSGleb Smirnoff  	1.7 usual case, 6.8, worst case
18399034852cSGleb Smirnoff  Summary: If ntpd is configured to allow remote configuration, and if
18409034852cSGleb Smirnoff	the (possibly spoofed) source IP address is allowed to send
18419034852cSGleb Smirnoff	remote configuration requests, and if the attacker knows the
18429034852cSGleb Smirnoff	remote configuration password or if ntpd was (foolishly)
18439034852cSGleb Smirnoff	configured to disable authentication, then an attacker can
18449034852cSGleb Smirnoff	send a set of packets to ntpd that may cause it to crash,
18459034852cSGleb Smirnoff	with the hypothetical possibility of a small code injection.
18469034852cSGleb Smirnoff  Mitigation:
18479034852cSGleb Smirnoff	Implement BCP-38.
18489034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
18499034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
18509034852cSGleb Smirnoff	If you are unable to upgrade, remote configuration of NTF's
18519034852cSGleb Smirnoff	    ntpd requires:
18529034852cSGleb Smirnoff		an explicitly configured "trusted" key. Only configure
18539034852cSGleb Smirnoff			this if you need it.
18549034852cSGleb Smirnoff		access from a permitted IP address. You choose the IPs.
18559034852cSGleb Smirnoff		authentication. Don't disable it. Practice secure key safety.
18569034852cSGleb Smirnoff	Monitor your ntpd instances.
18579034852cSGleb Smirnoff  Credit: This weakness was discovered by Yves Younan and
18589034852cSGleb Smirnoff  	Aleksander Nikolich of Cisco Talos.
18599034852cSGleb Smirnoff
18609034852cSGleb Smirnoff* decodenetnum() will ASSERT botch instead of returning FAIL on some
18619034852cSGleb Smirnoff  bogus values.
18629034852cSGleb Smirnoff
18639034852cSGleb Smirnoff  References: Sec 2922 / CVE-2015-7855
18649034852cSGleb Smirnoff  Affects: All ntp-4 releases up to, but not including 4.2.8p4, and
18659034852cSGleb Smirnoff	4.3.0 up to, but not including 4.3.77
18669034852cSGleb Smirnoff  CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6, worst case
18679034852cSGleb Smirnoff  Summary: If ntpd is fed a crafted mode 6 or mode 7 packet containing
18689034852cSGleb Smirnoff	an unusually long data value where a network address is expected,
18699034852cSGleb Smirnoff	the decodenetnum() function will abort with an assertion failure
18709034852cSGleb Smirnoff	instead of simply returning a failure condition.
18719034852cSGleb Smirnoff  Mitigation:
18729034852cSGleb Smirnoff	Implement BCP-38.
18739034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
18749034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
18759034852cSGleb Smirnoff	If you are unable to upgrade:
18769034852cSGleb Smirnoff		mode 7 is disabled by default. Don't enable it.
18779034852cSGleb Smirnoff		Use restrict noquery to limit who can send mode 6
18789034852cSGleb Smirnoff			and mode 7 requests.
18799034852cSGleb Smirnoff		Configure and use the controlkey and requestkey
18809034852cSGleb Smirnoff			authentication directives to limit who can
18819034852cSGleb Smirnoff			send mode 6 and mode 7 requests.
18829034852cSGleb Smirnoff	Monitor your ntpd instances.
18839034852cSGleb Smirnoff  Credit: This weakness was discovered by John D "Doug" Birdwell of IDA.org.
18849034852cSGleb Smirnoff
18859034852cSGleb Smirnoff* NAK to the Future: Symmetric association authentication bypass via
18869034852cSGleb Smirnoff  crypto-NAK.
18879034852cSGleb Smirnoff
18889034852cSGleb Smirnoff  References: Sec 2941 / CVE-2015-7871
18899034852cSGleb Smirnoff  Affects: All ntp-4 releases between 4.2.5p186 up to but not including
18909034852cSGleb Smirnoff  	4.2.8p4, and 4.3.0 up to but not including 4.3.77
18919034852cSGleb Smirnoff  CVSS: (AV:N/AC:L/Au:N/C:N/I:P/A:P) Base Score: 6.4
18929034852cSGleb Smirnoff  Summary: Crypto-NAK packets can be used to cause ntpd to accept time
18939034852cSGleb Smirnoff	from unauthenticated ephemeral symmetric peers by bypassing the
18949034852cSGleb Smirnoff	authentication required to mobilize peer associations. This
18959034852cSGleb Smirnoff	vulnerability appears to have been introduced in ntp-4.2.5p186
18969034852cSGleb Smirnoff	when the code handling mobilization of new passive symmetric
18979034852cSGleb Smirnoff	associations (lines 1103-1165) was refactored.
18989034852cSGleb Smirnoff  Mitigation:
18999034852cSGleb Smirnoff	Implement BCP-38.
19009034852cSGleb Smirnoff	Upgrade to 4.2.8p4, or later, from the NTP Project Download
19019034852cSGleb Smirnoff	    Page or the NTP Public Services Project Download Page.
19029034852cSGleb Smirnoff	If you are unable to upgrade:
19039034852cSGleb Smirnoff		Apply the patch to the bottom of the "authentic" check
19049034852cSGleb Smirnoff			block around line 1136 of ntp_proto.c.
19059034852cSGleb Smirnoff	Monitor your ntpd instances.
19064990d495SXin LI  Credit: This weakness was discovered by Matthew Van Gundy of Cisco ASIG.
19079034852cSGleb Smirnoff
19089034852cSGleb SmirnoffBackward-Incompatible changes:
19099034852cSGleb Smirnoff* [Bug 2817] Default on Linux is now "rlimit memlock -1".
19109034852cSGleb Smirnoff  While the general default of 32M is still the case, under Linux
19119034852cSGleb Smirnoff  the default value has been changed to -1 (do not lock ntpd into
19129034852cSGleb Smirnoff  memory).  A value of 0 means "lock ntpd into memory with whatever
19139034852cSGleb Smirnoff  memory it needs." If your ntp.conf file has an explicit "rlimit memlock"
19149034852cSGleb Smirnoff  value in it, that value will continue to be used.
19159034852cSGleb Smirnoff
19169034852cSGleb Smirnoff* [Bug 2886] Misspelling: "outlyer" should be "outlier".
19179034852cSGleb Smirnoff  If you've written a script that looks for this case in, say, the
19189034852cSGleb Smirnoff  output of ntpq, you probably want to change your regex matches
19199034852cSGleb Smirnoff  from 'outlyer' to 'outl[iy]er'.
19209034852cSGleb Smirnoff
19219034852cSGleb SmirnoffNew features in this release:
19229034852cSGleb Smirnoff* 'rlimit memlock' now has finer-grained control.  A value of -1 means
19239034852cSGleb Smirnoff  "don't lock ntpd into memore".  This is the default for Linux boxes.
19249034852cSGleb Smirnoff  A value of 0 means "lock ntpd into memory" with no limits.  Otherwise
19259034852cSGleb Smirnoff  the value is the number of megabytes of memory to lock.  The default
19269034852cSGleb Smirnoff  is 32 megabytes.
19279034852cSGleb Smirnoff
19289034852cSGleb Smirnoff* The old Google Test framework has been replaced with a new framework,
19299034852cSGleb Smirnoff  based on http://www.throwtheswitch.org/unity/ .
19309034852cSGleb Smirnoff
19319034852cSGleb SmirnoffBug Fixes and Improvements:
19329034852cSGleb Smirnoff* [Bug 2332] (reopened) Exercise thread cancellation once before dropping
19339034852cSGleb Smirnoff  privileges and limiting resources in NTPD removes the need to link
19349034852cSGleb Smirnoff  forcefully against 'libgcc_s' which does not always work. J.Perlinger
19359034852cSGleb Smirnoff* [Bug 2595] ntpdate man page quirks.  Hal Murray, Harlan Stenn.
19369034852cSGleb Smirnoff* [Bug 2625] Deprecate flag1 in local refclock.  Hal Murray, Harlan Stenn.
19379034852cSGleb Smirnoff* [Bug 2817] Stop locking ntpd into memory by default under Linux.  H.Stenn.
19389034852cSGleb Smirnoff* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c.  perlinger@ntp.org
19399034852cSGleb Smirnoff* [Bug 2823] ntpsweep with recursive peers option doesn't work.  H.Stenn.
19409034852cSGleb Smirnoff* [Bug 2849] Systems with more than one default route may never
19419034852cSGleb Smirnoff  synchronize.  Brian Utterback.  Note that this patch might need to
19429034852cSGleb Smirnoff  be reverted once Bug 2043 has been fixed.
19439034852cSGleb Smirnoff* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger
19449034852cSGleb Smirnoff* [Bug 2866] segmentation fault at initgroups().  Harlan Stenn.
19459034852cSGleb Smirnoff* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger
19469034852cSGleb Smirnoff* [Bug 2873] libevent should not include .deps/ in the tarball.  H.Stenn
19479034852cSGleb Smirnoff* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn
19489034852cSGleb Smirnoff* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS.  libevent must
19499034852cSGleb Smirnoff  be configured for the distribution targets.  Harlan Stenn.
19509034852cSGleb Smirnoff* [Bug 2883] ntpd crashes on exit with empty driftfile.  Miroslav Lichvar.
19519034852cSGleb Smirnoff* [Bug 2886] Mis-spelling: "outlyer" should be "outlier".  dave@horsfall.org
19529034852cSGleb Smirnoff* [Bug 2888] streamline calendar functions.  perlinger@ntp.org
19539034852cSGleb Smirnoff* [Bug 2889] ntp-dev-4.3.67 does not build on Windows.  perlinger@ntp.org
19549034852cSGleb Smirnoff* [Bug 2890] Ignore ENOBUFS on routing netlink socket.  Konstantin Khlebnikov.
19559034852cSGleb Smirnoff* [Bug 2906] make check needs better support for pthreads.  Harlan Stenn.
19569034852cSGleb Smirnoff* [Bug 2907] dist* build targets require our libevent/ to be enabled.  HStenn.
19579034852cSGleb Smirnoff* [Bug 2912] no munlockall() under Windows.  David Taylor, Harlan Stenn.
19589034852cSGleb Smirnoff* libntp/emalloc.c: Remove explicit include of stdint.h.  Harlan Stenn.
19599034852cSGleb Smirnoff* Put Unity CPPFLAGS items in unity_config.h.  Harlan Stenn.
19609034852cSGleb Smirnoff* tests/ntpd/g_leapsec.cpp typo fix.  Harlan Stenn.
19619034852cSGleb Smirnoff* Phase 1 deprecation of google test in sntp/tests/.  Harlan Stenn.
19629034852cSGleb Smirnoff* On some versions of HP-UX, inttypes.h does not include stdint.h.  H.Stenn.
19639034852cSGleb Smirnoff* top_srcdir can change based on ntp v. sntp.  Harlan Stenn.
19649034852cSGleb Smirnoff* sntp/tests/ function parameter list cleanup.  Damir Tomić.
19659034852cSGleb Smirnoff* tests/libntp/ function parameter list cleanup.  Damir Tomić.
19669034852cSGleb Smirnoff* tests/ntpd/ function parameter list cleanup.  Damir Tomić.
19679034852cSGleb Smirnoff* sntp/unity/unity_config.h: handle stdint.h.  Harlan Stenn.
19689034852cSGleb Smirnoff* sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris.  H.Stenn.
19699034852cSGleb Smirnoff* tests/libntp/timevalops.c and timespecops.c fixed error printing.  D.Tomić.
19709034852cSGleb Smirnoff* tests/libntp/ improvements in code and fixed error printing.  Damir Tomić.
19719034852cSGleb Smirnoff* tests/libntp: a_md5encrypt.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c,
19729034852cSGleb Smirnoff  caltontp.c, clocktime.c, humandate.c, hextolfp.c, decodenetnum.c - fixed
19739034852cSGleb Smirnoff  formatting; first declaration, then code (C90); deleted unnecessary comments;
19749034852cSGleb Smirnoff  changed from sprintf to snprintf; fixed order of includes. Tomasz Flendrich
19759034852cSGleb Smirnoff* tests/libntp/lfpfunc.c remove unnecessary include, remove old comments,
19769034852cSGleb Smirnoff  fix formatting, cleanup. Tomasz Flendrich
19779034852cSGleb Smirnoff* tests/libntp/lfptostr.c remove unnecessary include, add consts, fix formatting.
19789034852cSGleb Smirnoff  Tomasz Flendrich
19799034852cSGleb Smirnoff* tests/libntp/statestr.c remove empty functions, remove unnecessary include,
19809034852cSGleb Smirnoff  fix formatting. Tomasz Flendrich
19819034852cSGleb Smirnoff* tests/libntp/modetoa.c fixed formatting. Tomasz Flendrich
19829034852cSGleb Smirnoff* tests/libntp/msyslog.c fixed formatting. Tomasz Flendrich
19839034852cSGleb Smirnoff* tests/libntp/numtoa.c deleted unnecessary empty functions, fixed formatting.
19849034852cSGleb Smirnoff  Tomasz Flendrich
19859034852cSGleb Smirnoff* tests/libntp/numtohost.c added const, fixed formatting. Tomasz Flendrich
19869034852cSGleb Smirnoff* tests/libntp/refnumtoa.c fixed formatting. Tomasz Flendrich
19879034852cSGleb Smirnoff* tests/libntp/ssl_init.c fixed formatting. Tomasz Flendrich
19889034852cSGleb Smirnoff* tests/libntp/tvtots.c fixed a bug, fixed formatting. Tomasz Flendrich
19899034852cSGleb Smirnoff* tests/libntp/uglydate.c removed an unnecessary include. Tomasz Flendrich
19909034852cSGleb Smirnoff* tests/libntp/vi64ops.c removed an unnecessary comment, fixed formatting.
19919034852cSGleb Smirnoff* tests/libntp/ymd3yd.c removed an empty function and an unnecessary include,
19929034852cSGleb Smirnofffixed formatting. Tomasz Flendrich
19939034852cSGleb Smirnoff* tests/libntp/timespecops.c fixed formatting, fixed the order of includes,
19949034852cSGleb Smirnoff  removed unnecessary comments, cleanup. Tomasz Flendrich
19959034852cSGleb Smirnoff* tests/libntp/timevalops.c fixed the order of includes, deleted unnecessary
19969034852cSGleb Smirnoff  comments, cleanup. Tomasz Flendrich
19979034852cSGleb Smirnoff* tests/libntp/sockaddrtest.h making it agree to NTP's conventions of formatting.
19989034852cSGleb Smirnoff  Tomasz Flendrich
19999034852cSGleb Smirnoff* tests/libntp/lfptest.h cleanup. Tomasz Flendrich
20009034852cSGleb Smirnoff* tests/libntp/test-libntp.c fix formatting. Tomasz Flendrich
20019034852cSGleb Smirnoff* sntp/tests/crypto.c is now using proper Unity's assertions, fixed formatting.
20029034852cSGleb Smirnoff  Tomasz Flendrich
20039034852cSGleb Smirnoff* sntp/tests/kodDatabase.c added consts, deleted empty function,
20049034852cSGleb Smirnoff  fixed formatting. Tomasz Flendrich
20059034852cSGleb Smirnoff* sntp/tests/kodFile.c cleanup, fixed formatting. Tomasz Flendrich
20069034852cSGleb Smirnoff* sntp/tests/packetHandling.c is now using proper Unity's assertions,
20079034852cSGleb Smirnoff  fixed formatting, deleted unused variable. Tomasz Flendrich
20089034852cSGleb Smirnoff* sntp/tests/keyFile.c is now using proper Unity's assertions, fixed formatting.
20099034852cSGleb Smirnoff  Tomasz Flendrich
20109034852cSGleb Smirnoff* sntp/tests/packetProcessing.c changed from sprintf to snprintf,
20119034852cSGleb Smirnoff  fixed formatting. Tomasz Flendrich
20129034852cSGleb Smirnoff* sntp/tests/utilities.c is now using proper Unity's assertions, changed
20139034852cSGleb Smirnoff  the order of includes, fixed formatting, removed unnecessary comments.
20149034852cSGleb Smirnoff  Tomasz Flendrich
20159034852cSGleb Smirnoff* sntp/tests/sntptest.h fixed formatting. Tomasz Flendrich
20169034852cSGleb Smirnoff* sntp/tests/fileHandlingTest.h.in fixed a possible buffer overflow problem,
20179034852cSGleb Smirnoff  made one function do its job, deleted unnecessary prints, fixed formatting.
20189034852cSGleb Smirnoff  Tomasz Flendrich
20199034852cSGleb Smirnoff* sntp/unity/Makefile.am added a missing header. Tomasz Flendrich
20209034852cSGleb Smirnoff* sntp/unity/unity_config.h: Distribute it.  Harlan Stenn.
20219034852cSGleb Smirnoff* sntp/libevent/evconfig-private.h: remove generated filefrom SCM.  H.Stenn.
20229034852cSGleb Smirnoff* sntp/unity/Makefile.am: fix some broken paths.  Harlan Stenn.
20239034852cSGleb Smirnoff* sntp/unity/unity.c: Clean up a printf().  Harlan Stenn.
20249034852cSGleb Smirnoff* Phase 1 deprecation of google test in tests/libntp/.  Harlan Stenn.
20259034852cSGleb Smirnoff* Don't build sntp/libevent/sample/.  Harlan Stenn.
20269034852cSGleb Smirnoff* tests/libntp/test_caltontp needs -lpthread.  Harlan Stenn.
20279034852cSGleb Smirnoff* br-flock: --enable-local-libevent.  Harlan Stenn.
20289034852cSGleb Smirnoff* Wrote tests for ntpd/ntp_prio_q.c. Tomasz Flendrich
20299034852cSGleb Smirnoff* scripts/lib/NTP/Util.pm: stratum output is version-dependent.  Harlan Stenn.
20309034852cSGleb Smirnoff* Get rid of the NTP_ prefix on our assertion macros.  Harlan Stenn.
20319034852cSGleb Smirnoff* Code cleanup.  Harlan Stenn.
20329034852cSGleb Smirnoff* libntp/icom.c: Typo fix.  Harlan Stenn.
20339034852cSGleb Smirnoff* util/ntptime.c: initialization nit.  Harlan Stenn.
20349034852cSGleb Smirnoff* ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr).  Harlan Stenn.
20359034852cSGleb Smirnoff* Add std_unity_tests to various Makefile.am files.  Harlan Stenn.
20369034852cSGleb Smirnoff* ntpd/ntp_restrict.c: added a few assertions, created tests for this file.
20379034852cSGleb Smirnoff  Tomasz Flendrich
20389034852cSGleb Smirnoff* Changed progname to be const in many files - now it's consistent. Tomasz
20399034852cSGleb Smirnoff  Flendrich
20409034852cSGleb Smirnoff* Typo fix for GCC warning suppression.  Harlan Stenn.
20419034852cSGleb Smirnoff* Added tests/ntpd/ntp_scanner.c test. Damir Tomić.
20429034852cSGleb Smirnoff* Added declarations to all Unity tests, and did minor fixes to them.
20439034852cSGleb Smirnoff  Reduced the number of warnings by half. Damir Tomić.
20449034852cSGleb Smirnoff* Updated generate_test_runner.rb and updated the sntp/unity/auto directory
20459034852cSGleb Smirnoff  with the latest Unity updates from Mark. Damir Tomić.
20469034852cSGleb Smirnoff* Retire google test - phase I.  Harlan Stenn.
20479034852cSGleb Smirnoff* Unity test cleanup: move declaration of 'initializing'.  Harlan Stenn.
20489034852cSGleb Smirnoff* Update the NEWS file.  Harlan Stenn.
20499034852cSGleb Smirnoff* Autoconf cleanup.  Harlan Stenn.
20509034852cSGleb Smirnoff* Unit test dist cleanup. Harlan Stenn.
20519034852cSGleb Smirnoff* Cleanup various test Makefile.am files.  Harlan Stenn.
20529034852cSGleb Smirnoff* Pthread autoconf macro cleanup.  Harlan Stenn.
20539034852cSGleb Smirnoff* Fix progname definition in unity runner scripts.  Harlan Stenn.
20549034852cSGleb Smirnoff* Clean trailing whitespace in tests/ntpd/Makefile.am.  Harlan Stenn.
20559034852cSGleb Smirnoff* Update the patch for bug 2817.  Harlan Stenn.
20569034852cSGleb Smirnoff* More updates for bug 2817.  Harlan Stenn.
20579034852cSGleb Smirnoff* Fix bugs in tests/ntpd/ntp_prio_q.c.  Harlan Stenn.
20589034852cSGleb Smirnoff* gcc on older HPUX may need +allowdups.  Harlan Stenn.
20599034852cSGleb Smirnoff* Adding missing MCAST protection.  Harlan Stenn.
20609034852cSGleb Smirnoff* Disable certain test programs on certain platforms.  Harlan Stenn.
20619034852cSGleb Smirnoff* Implement --enable-problem-tests (on by default).  Harlan Stenn.
20629034852cSGleb Smirnoff* build system tweaks.  Harlan Stenn.
20639034852cSGleb Smirnoff
20649034852cSGleb Smirnoff---
2065276da39aSCy SchubertNTP 4.2.8p3 (Harlan Stenn <stenn@ntp.org>, 2015/06/29)
2066276da39aSCy Schubert
2067276da39aSCy SchubertFocus: 1 Security fix.  Bug fixes and enhancements.  Leap-second improvements.
2068276da39aSCy Schubert
2069276da39aSCy SchubertSeverity: MEDIUM
2070276da39aSCy Schubert
2071276da39aSCy SchubertSecurity Fix:
2072276da39aSCy Schubert
2073276da39aSCy Schubert* [Sec 2853] Crafted remote config packet can crash some versions of
2074276da39aSCy Schubert  ntpd.  Aleksis Kauppinen, Juergen Perlinger, Harlan Stenn.
2075276da39aSCy Schubert
2076276da39aSCy SchubertUnder specific circumstances an attacker can send a crafted packet to
2077276da39aSCy Schubertcause a vulnerable ntpd instance to crash. This requires each of the
2078276da39aSCy Schubertfollowing to be true:
2079276da39aSCy Schubert
2080276da39aSCy Schubert1) ntpd set up to allow remote configuration (not allowed by default), and
2081276da39aSCy Schubert2) knowledge of the configuration password, and
2082276da39aSCy Schubert3) access to a computer entrusted to perform remote configuration.
2083276da39aSCy Schubert
2084276da39aSCy SchubertThis vulnerability is considered low-risk.
2085276da39aSCy Schubert
2086276da39aSCy SchubertNew features in this release:
2087276da39aSCy Schubert
2088276da39aSCy SchubertOptional (disabled by default) support to have ntpd provide smeared
2089276da39aSCy Schubertleap second time.  A specially built and configured ntpd will only
2090276da39aSCy Schubertoffer smeared time in response to client packets.  These response
2091276da39aSCy Schubertpackets will also contain a "refid" of 254.a.b.c, where the 24 bits
2092276da39aSCy Schubertof a, b, and c encode the amount of smear in a 2:22 integer:fraction
2093276da39aSCy Schubertformat.  See README.leapsmear and http://bugs.ntp.org/2855 for more
2094276da39aSCy Schubertinformation.
2095276da39aSCy Schubert
2096276da39aSCy Schubert   *IF YOU CHOOSE TO CONFIGURE NTPD TO PROVIDE LEAP SMEAR TIME*
2097276da39aSCy Schubert   *BE SURE YOU DO NOT OFFER THAT TIME ON PUBLIC TIMESERVERS.*
2098276da39aSCy Schubert
2099276da39aSCy SchubertWe've imported the Unity test framework, and have begun converting
2100276da39aSCy Schubertthe existing google-test items to this new framework.  If you want
2101276da39aSCy Schubertto write new tests or change old ones, you'll need to have ruby
2102276da39aSCy Schubertinstalled.  You don't need ruby to run the test suite.
2103276da39aSCy Schubert
2104276da39aSCy SchubertBug Fixes and Improvements:
2105276da39aSCy Schubert
2106276da39aSCy Schubert* CID 739725: Fix a rare resource leak in libevent/listener.c.
2107276da39aSCy Schubert* CID 1295478: Quiet a pedantic potential error from the fix for Bug 2776.
2108276da39aSCy Schubert* CID 1296235: Fix refclock_jjy.c and correcting type of the driver40-ja.html
2109276da39aSCy Schubert* CID 1269537: Clean up a line of dead code in getShmTime().
2110276da39aSCy Schubert* [Bug 1060] Buffer overruns in libparse/clk_rawdcf.c.  Helge Oldach.
2111276da39aSCy Schubert* [Bug 2590] autogen-5.18.5.
2112276da39aSCy Schubert* [Bug 2612] restrict: Warn when 'monitor' can't be disabled because
2113276da39aSCy Schubert  of 'limited'.
2114276da39aSCy Schubert* [Bug 2650] fix includefile processing.
2115276da39aSCy Schubert* [Bug 2745] ntpd -x steps clock on leap second
2116276da39aSCy Schubert   Fixed an initial-value problem that caused misbehaviour in absence of
2117276da39aSCy Schubert   any leapsecond information.
2118276da39aSCy Schubert   Do leap second stepping only of the step adjustment is beyond the
2119276da39aSCy Schubert   proper jump distance limit and step correction is allowed at all.
2120276da39aSCy Schubert* [Bug 2750] build for Win64
2121276da39aSCy Schubert  Building for 32bit of loopback ppsapi needs def file
2122276da39aSCy Schubert* [Bug 2776] Improve ntpq's 'help keytype'.
2123276da39aSCy Schubert* [Bug 2778] Implement "apeers"  ntpq command to include associd.
2124276da39aSCy Schubert* [Bug 2782] Refactor refclock_shm.c, add memory barrier protection.
2125276da39aSCy Schubert* [Bug 2792] If the IFF_RUNNING interface flag is supported then an
2126276da39aSCy Schubert  interface is ignored as long as this flag is not set since the
2127276da39aSCy Schubert  interface is not usable (e.g., no link).
2128276da39aSCy Schubert* [Bug 2794] Clean up kernel clock status reports.
2129276da39aSCy Schubert* [Bug 2800] refclock_true.c true_debug() can't open debug log because
2130276da39aSCy Schubert  of incompatible open/fdopen parameters.
2131276da39aSCy Schubert* [Bug 2804] install-local-data assumes GNU 'find' semantics.
2132276da39aSCy Schubert* [Bug 2805] ntpd fails to join multicast group.
2133276da39aSCy Schubert* [Bug 2806] refclock_jjy.c supports the Telephone JJY.
2134276da39aSCy Schubert* [Bug 2808] GPSD_JSON driver enhancements, step 1.
2135276da39aSCy Schubert  Fix crash during cleanup if GPS device not present and char device.
2136276da39aSCy Schubert  Increase internal token buffer to parse all JSON data, even SKY.
2137276da39aSCy Schubert  Defer logging of errors during driver init until the first unit is
2138276da39aSCy Schubert  started, so the syslog is not cluttered when the driver is not used.
2139276da39aSCy Schubert  Various improvements, see http://bugs.ntp.org/2808 for details.
2140276da39aSCy Schubert  Changed libjsmn to a more recent version.
2141276da39aSCy Schubert* [Bug 2810] refclock_shm.c memory barrier code needs tweaks for QNX.
2142276da39aSCy Schubert* [Bug 2813] HP-UX needs -D__STDC_VERSION__=199901L and limits.h.
2143276da39aSCy Schubert* [Bug 2815] net-snmp before v5.4 has circular library dependencies.
2144276da39aSCy Schubert* [Bug 2821] Add a missing NTP_PRINTF and a missing const.
2145276da39aSCy Schubert* [Bug 2822] New leap column in sntp broke NTP::Util.pm.
2146276da39aSCy Schubert* [Bug 2824] Convert update-leap to perl. (also see 2769)
2147276da39aSCy Schubert* [Bug 2825] Quiet file installation in html/ .
2148276da39aSCy Schubert* [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey
2149276da39aSCy Schubert   NTPD transfers the current TAI (instead of an announcement) now.
2150276da39aSCy Schubert   This might still needed improvement.
2151276da39aSCy Schubert   Update autokey data ASAP when 'sys_tai' changes.
2152276da39aSCy Schubert   Fix unit test that was broken by changes for autokey update.
2153276da39aSCy Schubert   Avoid potential signature length issue and use DPRINTF where possible
2154276da39aSCy Schubert     in ntp_crypto.c.
2155276da39aSCy Schubert* [Bug 2832] refclock_jjy.c supports the TDC-300.
2156276da39aSCy Schubert* [Bug 2834] Correct a broken html tag in html/refclock.html
2157276da39aSCy Schubert* [Bug 2836] DFC77 patches from Frank Kardel to make decoding more
2158276da39aSCy Schubert  robust, and require 2 consecutive timestamps to be consistent.
2159276da39aSCy Schubert* [Bug 2837] Allow a configurable DSCP value.
2160276da39aSCy Schubert* [Bug 2837] add test for DSCP to ntpd/complete.conf.in
2161276da39aSCy Schubert* [Bug 2842] Glitch in ntp.conf.def documentation stanza.
2162276da39aSCy Schubert* [Bug 2842] Bug in mdoc2man.
2163276da39aSCy Schubert* [Bug 2843] make check fails on 4.3.36
2164276da39aSCy Schubert   Fixed compiler warnings about numeric range overflow
2165276da39aSCy Schubert   (The original topic was fixed in a byplay to bug#2830)
2166276da39aSCy Schubert* [Bug 2845] Harden memory allocation in ntpd.
2167276da39aSCy Schubert* [Bug 2852] 'make check' can't find unity.h.  Hal Murray.
2168276da39aSCy Schubert* [Bug 2854] Missing brace in libntp/strdup.c.  Masanari Iida.
2169276da39aSCy Schubert* [Bug 2855] Parser fix for conditional leap smear code.  Harlan Stenn.
2170276da39aSCy Schubert* [Bug 2855] Report leap smear in the REFID.  Harlan Stenn.
2171276da39aSCy Schubert* [Bug 2855] Implement conditional leap smear code.  Martin Burnicki.
2172276da39aSCy Schubert* [Bug 2856] ntpd should wait() on terminated child processes.  Paul Green.
2173276da39aSCy Schubert* [Bug 2857] Stratus VOS does not support SIGIO.  Paul Green.
2174276da39aSCy Schubert* [Bug 2859] Improve raw DCF77 robustness deconding.  Frank Kardel.
2175276da39aSCy Schubert* [Bug 2860] ntpq ifstats sanity check is too stringent.  Frank Kardel.
2176276da39aSCy Schubert* html/drivers/driver22.html: typo fix.  Harlan Stenn.
2177276da39aSCy Schubert* refidsmear test cleanup.  Tomasz Flendrich.
2178276da39aSCy Schubert* refidsmear function support and tests.  Harlan Stenn.
2179276da39aSCy Schubert* sntp/tests/Makefile.am: remove g_nameresolution.cpp as it tested
2180276da39aSCy Schubert  something that was only in the 4.2.6 sntp.  Harlan Stenn.
2181276da39aSCy Schubert* Modified tests/bug-2803/Makefile.am so it builds Unity framework tests.
2182276da39aSCy Schubert  Damir Tomić
2183276da39aSCy Schubert* Modified tests/libtnp/Makefile.am so it builds Unity framework tests.
2184276da39aSCy Schubert  Damir Tomić
2185276da39aSCy Schubert* Modified sntp/tests/Makefile.am so it builds Unity framework tests.
2186276da39aSCy Schubert  Damir Tomić
2187276da39aSCy Schubert* tests/sandbox/smeartest.c: Harlan Stenn, Damir Tomic, Juergen Perlinger.
2188276da39aSCy Schubert* Converted from gtest to Unity: tests/bug-2803/. Damir Tomić
2189276da39aSCy Schubert* Converted from gtest to Unity: tests/libntp/ a_md5encrypt, atoint.c,
2190276da39aSCy Schubert  atouint.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c,
2191276da39aSCy Schubert  calyearstart.c, clocktime.c, hextoint.c, lfpfunc.c, modetoa.c,
2192276da39aSCy Schubert  numtoa.c, numtohost.c, refnumtoa.c, ssl_init.c, statestr.c,
2193276da39aSCy Schubert  timespecops.c, timevalops.c, uglydate.c, vi64ops.c, ymd2yd.c.
2194276da39aSCy Schubert  Damir Tomić
2195276da39aSCy Schubert* Converted from gtest to Unity: sntp/tests/ kodDatabase.c, kodFile.c,
2196276da39aSCy Schubert  networking.c, keyFile.c, utilities.cpp, sntptest.h,
2197276da39aSCy Schubert  fileHandlingTest.h. Damir Tomić
2198276da39aSCy Schubert* Initial support for experimental leap smear code.  Harlan Stenn.
2199276da39aSCy Schubert* Fixes to sntp/tests/fileHandlingTest.h.in.  Harlan Stenn.
2200276da39aSCy Schubert* Report select() debug messages at debug level 3 now.
2201276da39aSCy Schubert* sntp/scripts/genLocInfo: treat raspbian as debian.
2202276da39aSCy Schubert* Unity test framework fixes.
2203276da39aSCy Schubert  ** Requires ruby for changes to tests.
2204276da39aSCy Schubert* Initial support for PACKAGE_VERSION tests.
2205276da39aSCy Schubert* sntp/libpkgver belongs in EXTRA_DIST, not DIST_SUBDIRS.
2206276da39aSCy Schubert* tests/bug-2803/Makefile.am must distribute bug-2803.h.
2207276da39aSCy Schubert* Add an assert to the ntpq ifstats code.
2208276da39aSCy Schubert* Clean up the RLIMIT_STACK code.
2209276da39aSCy Schubert* Improve the ntpq documentation around the controlkey keyid.
2210276da39aSCy Schubert* ntpq.c cleanup.
2211276da39aSCy Schubert* Windows port build cleanup.
2212276da39aSCy Schubert
2213276da39aSCy Schubert---
2214276da39aSCy SchubertNTP 4.2.8p2 (Harlan Stenn <stenn@ntp.org>, 2015/04/07)
2215a25439b6SCy Schubert
2216a25439b6SCy SchubertFocus: Security and Bug fixes, enhancements.
2217a25439b6SCy Schubert
2218a25439b6SCy SchubertSeverity: MEDIUM
2219a25439b6SCy Schubert
2220a25439b6SCy SchubertIn addition to bug fixes and enhancements, this release fixes the
2221a25439b6SCy Schubertfollowing medium-severity vulnerabilities involving private key
2222a25439b6SCy Schubertauthentication:
2223a25439b6SCy Schubert
2224a25439b6SCy Schubert* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
2225a25439b6SCy Schubert
2226a25439b6SCy Schubert    References: Sec 2779 / CVE-2015-1798 / VU#374268
2227a25439b6SCy Schubert    Affects: All NTP4 releases starting with ntp-4.2.5p99 up to but not
2228a25439b6SCy Schubert	including ntp-4.2.8p2 where the installation uses symmetric keys
2229a25439b6SCy Schubert	to authenticate remote associations.
2230a25439b6SCy Schubert    CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
2231a25439b6SCy Schubert    Date Resolved: Stable (4.2.8p2) 07 Apr 2015
2232a25439b6SCy Schubert    Summary: When ntpd is configured to use a symmetric key to authenticate
2233a25439b6SCy Schubert	a remote NTP server/peer, it checks if the NTP message
2234a25439b6SCy Schubert	authentication code (MAC) in received packets is valid, but not if
2235a25439b6SCy Schubert	there actually is any MAC included. Packets without a MAC are
2236a25439b6SCy Schubert	accepted as if they had a valid MAC. This allows a MITM attacker to
2237a25439b6SCy Schubert	send false packets that are accepted by the client/peer without
2238a25439b6SCy Schubert	having to know the symmetric key. The attacker needs to know the
2239a25439b6SCy Schubert	transmit timestamp of the client to match it in the forged reply
2240a25439b6SCy Schubert	and the false reply needs to reach the client before the genuine
2241a25439b6SCy Schubert	reply from the server. The attacker doesn't necessarily need to be
2242a25439b6SCy Schubert	relaying the packets between the client and the server.
2243a25439b6SCy Schubert
2244a25439b6SCy Schubert	Authentication using autokey doesn't have this problem as there is
2245a25439b6SCy Schubert	a check that requires the key ID to be larger than NTP_MAXKEY,
2246a25439b6SCy Schubert	which fails for packets without a MAC.
2247a25439b6SCy Schubert    Mitigation:
2248a25439b6SCy Schubert        Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
2249a25439b6SCy Schubert	or the NTP Public Services Project Download Page
2250a25439b6SCy Schubert        Configure ntpd with enough time sources and monitor it properly.
2251a25439b6SCy Schubert    Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
2252a25439b6SCy Schubert
2253a25439b6SCy Schubert* [Sec 2781] Authentication doesn't protect symmetric associations against
2254a25439b6SCy Schubert  DoS attacks.
2255a25439b6SCy Schubert
2256a25439b6SCy Schubert    References: Sec 2781 / CVE-2015-1799 / VU#374268
2257a25439b6SCy Schubert    Affects: All NTP releases starting with at least xntp3.3wy up to but
2258a25439b6SCy Schubert	not including ntp-4.2.8p2 where the installation uses symmetric
2259a25439b6SCy Schubert	key authentication.
2260a25439b6SCy Schubert    CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
2261a25439b6SCy Schubert    Note: the CVSS base Score for this issue could be 4.3 or lower, and
2262a25439b6SCy Schubert	it could be higher than 5.4.
2263a25439b6SCy Schubert    Date Resolved: Stable (4.2.8p2) 07 Apr 2015
2264a25439b6SCy Schubert    Summary: An attacker knowing that NTP hosts A and B are peering with
2265a25439b6SCy Schubert	each other (symmetric association) can send a packet to host A
2266a25439b6SCy Schubert	with source address of B which will set the NTP state variables
2267a25439b6SCy Schubert	on A to the values sent by the attacker. Host A will then send
2268a25439b6SCy Schubert	on its next poll to B a packet with originate timestamp that
2269a25439b6SCy Schubert	doesn't match the transmit timestamp of B and the packet will
2270a25439b6SCy Schubert	be dropped. If the attacker does this periodically for both
2271a25439b6SCy Schubert	hosts, they won't be able to synchronize to each other. This is
2272a25439b6SCy Schubert	a known denial-of-service attack, described at
2273a25439b6SCy Schubert	https://www.eecis.udel.edu/~mills/onwire.html .
2274a25439b6SCy Schubert
2275a25439b6SCy Schubert	According to the document the NTP authentication is supposed to
2276a25439b6SCy Schubert	protect symmetric associations against this attack, but that
2277a25439b6SCy Schubert	doesn't seem to be the case. The state variables are updated even
2278a25439b6SCy Schubert	when authentication fails and the peers are sending packets with
2279a25439b6SCy Schubert	originate timestamps that don't match the transmit timestamps on
2280a25439b6SCy Schubert	the receiving side.
2281a25439b6SCy Schubert
2282a25439b6SCy Schubert	This seems to be a very old problem, dating back to at least
2283a25439b6SCy Schubert	xntp3.3wy. It's also in the NTPv3 (RFC 1305) and NTPv4 (RFC 5905)
2284a25439b6SCy Schubert	specifications, so other NTP implementations with support for
2285a25439b6SCy Schubert	symmetric associations and authentication may be vulnerable too.
2286a25439b6SCy Schubert	An update to the NTP RFC to correct this error is in-process.
2287a25439b6SCy Schubert    Mitigation:
2288a25439b6SCy Schubert        Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
2289a25439b6SCy Schubert	or the NTP Public Services Project Download Page
2290a25439b6SCy Schubert        Note that for users of autokey, this specific style of MITM attack
2291a25439b6SCy Schubert	is simply a long-known potential problem.
2292a25439b6SCy Schubert        Configure ntpd with appropriate time sources and monitor ntpd.
2293a25439b6SCy Schubert	Alert your staff if problems are detected.
2294a25439b6SCy Schubert    Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
2295a25439b6SCy Schubert
2296a25439b6SCy Schubert* New script: update-leap
2297a25439b6SCy SchubertThe update-leap script will verify and if necessary, update the
2298a25439b6SCy Schubertleap-second definition file.
2299a25439b6SCy SchubertIt requires the following commands in order to work:
2300a25439b6SCy Schubert
2301a25439b6SCy Schubert	wget logger tr sed shasum
2302a25439b6SCy Schubert
2303a25439b6SCy SchubertSome may choose to run this from cron.  It needs more portability testing.
2304a25439b6SCy Schubert
2305a25439b6SCy SchubertBug Fixes and Improvements:
2306a25439b6SCy Schubert
2307a25439b6SCy Schubert* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
2308a25439b6SCy Schubert* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument.
2309a25439b6SCy Schubert* [Bug 2346] "graceful termination" signals do not do peer cleanup.
2310a25439b6SCy Schubert* [Bug 2728] See if C99-style structure initialization works.
2311a25439b6SCy Schubert* [Bug 2747] Upgrade libevent to 2.1.5-beta.
2312a25439b6SCy Schubert* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. .
2313a25439b6SCy Schubert* [Bug 2751] jitter.h has stale copies of l_fp macros.
2314a25439b6SCy Schubert* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM.
2315a25439b6SCy Schubert* [Bug 2757] Quiet compiler warnings.
2316a25439b6SCy Schubert* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq.
2317a25439b6SCy Schubert* [Bug 2763] Allow different thresholds for forward and backward steps.
2318a25439b6SCy Schubert* [Bug 2766] ntp-keygen output files should not be world-readable.
2319a25439b6SCy Schubert* [Bug 2767] ntp-keygen -M should symlink to ntp.keys.
2320a25439b6SCy Schubert* [Bug 2771] nonvolatile value is documented in wrong units.
2321a25439b6SCy Schubert* [Bug 2773] Early leap announcement from Palisade/Thunderbolt
2322a25439b6SCy Schubert* [Bug 2774] Unreasonably verbose printout - leap pending/warning
2323a25439b6SCy Schubert* [Bug 2775] ntp-keygen.c fails to compile under Windows.
2324a25439b6SCy Schubert* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info.
2325a25439b6SCy Schubert  Removed non-ASCII characters from some copyright comments.
2326a25439b6SCy Schubert  Removed trailing whitespace.
2327a25439b6SCy Schubert  Updated definitions for Meinberg clocks from current Meinberg header files.
2328a25439b6SCy Schubert  Now use C99 fixed-width types and avoid non-ASCII characters in comments.
2329a25439b6SCy Schubert  Account for updated definitions pulled from Meinberg header files.
2330a25439b6SCy Schubert  Updated comments on Meinberg GPS receivers which are not only called GPS16x.
2331a25439b6SCy Schubert  Replaced some constant numbers by defines from ntp_calendar.h
2332a25439b6SCy Schubert  Modified creation of parse-specific variables for Meinberg devices
2333a25439b6SCy Schubert  in gps16x_message().
2334a25439b6SCy Schubert  Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
2335a25439b6SCy Schubert  Modified mbg_tm_str() which now expexts an additional parameter controlling
2336a25439b6SCy Schubert  if the time status shall be printed.
2337a25439b6SCy Schubert* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
2338a25439b6SCy Schubert* [Sec 2781] Authentication doesn't protect symmetric associations against
2339a25439b6SCy Schubert  DoS attacks.
2340a25439b6SCy Schubert* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE.
2341a25439b6SCy Schubert* [Bug 2789] Quiet compiler warnings from libevent.
2342a25439b6SCy Schubert* [Bug 2790] If ntpd sets the Windows MM timer highest resolution
2343a25439b6SCy Schubert  pause briefly before measuring system clock precision to yield
2344a25439b6SCy Schubert  correct results.
2345a25439b6SCy Schubert* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer.
2346a25439b6SCy Schubert* Use predefined function types for parse driver functions
2347a25439b6SCy Schubert  used to set up function pointers.
2348a25439b6SCy Schubert  Account for changed prototype of parse_inp_fnc_t functions.
2349a25439b6SCy Schubert  Cast parse conversion results to appropriate types to avoid
2350a25439b6SCy Schubert  compiler warnings.
2351a25439b6SCy Schubert  Let ioctl() for Windows accept a (void *) to avoid compiler warnings
2352a25439b6SCy Schubert  when called with pointers to different types.
2353a25439b6SCy Schubert
2354a25439b6SCy Schubert---
23552b15cb3dSCy SchubertNTP 4.2.8p1 (Harlan Stenn <stenn@ntp.org>, 2015/02/04)
23562b15cb3dSCy Schubert
23572b15cb3dSCy SchubertFocus: Security and Bug fixes, enhancements.
23582b15cb3dSCy Schubert
23592b15cb3dSCy SchubertSeverity: HIGH
23602b15cb3dSCy Schubert
23612b15cb3dSCy SchubertIn addition to bug fixes and enhancements, this release fixes the
23622b15cb3dSCy Schubertfollowing high-severity vulnerabilities:
23632b15cb3dSCy Schubert
23642b15cb3dSCy Schubert* vallen is not validated in several places in ntp_crypto.c, leading
23652b15cb3dSCy Schubert  to a potential information leak or possibly a crash
23662b15cb3dSCy Schubert
23672b15cb3dSCy Schubert    References: Sec 2671 / CVE-2014-9297 / VU#852879
23682b15cb3dSCy Schubert    Affects: All NTP4 releases before 4.2.8p1 that are running autokey.
23692b15cb3dSCy Schubert    CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
23702b15cb3dSCy Schubert    Date Resolved: Stable (4.2.8p1) 04 Feb 2015
23712b15cb3dSCy Schubert    Summary: The vallen packet value is not validated in several code
23722b15cb3dSCy Schubert             paths in ntp_crypto.c which can lead to information leakage
23732b15cb3dSCy Schubert	     or perhaps a crash of the ntpd process.
23742b15cb3dSCy Schubert    Mitigation - any of:
23752b15cb3dSCy Schubert	Upgrade to 4.2.8p1, or later, from the NTP Project Download Page
23762b15cb3dSCy Schubert		or the NTP Public Services Project Download Page.
23772b15cb3dSCy Schubert	Disable Autokey Authentication by removing, or commenting out,
23782b15cb3dSCy Schubert		all configuration directives beginning with the "crypto"
23792b15cb3dSCy Schubert		keyword in your ntp.conf file.
23802b15cb3dSCy Schubert    Credit: This vulnerability was discovered by Stephen Roettger of the
23812b15cb3dSCy Schubert    	Google Security Team, with additional cases found by Sebastian
23822b15cb3dSCy Schubert	Krahmer of the SUSE Security Team and Harlan Stenn of Network
23832b15cb3dSCy Schubert	Time Foundation.
23842b15cb3dSCy Schubert
23852b15cb3dSCy Schubert* ::1 can be spoofed on some OSes, so ACLs based on IPv6 ::1 addresses
23862b15cb3dSCy Schubert  can be bypassed.
23872b15cb3dSCy Schubert
23882b15cb3dSCy Schubert    References: Sec 2672 / CVE-2014-9298 / VU#852879
23892b15cb3dSCy Schubert    Affects: All NTP4 releases before 4.2.8p1, under at least some
23902b15cb3dSCy Schubert	versions of MacOS and Linux. *BSD has not been seen to be vulnerable.
23912b15cb3dSCy Schubert    CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:C) Base Score: 9
23922b15cb3dSCy Schubert    Date Resolved: Stable (4.2.8p1) 04 Feb 2014
23932b15cb3dSCy Schubert    Summary: While available kernels will prevent 127.0.0.1 addresses
23942b15cb3dSCy Schubert	from "appearing" on non-localhost IPv4 interfaces, some kernels
23952b15cb3dSCy Schubert	do not offer the same protection for ::1 source addresses on
23962b15cb3dSCy Schubert	IPv6 interfaces. Since NTP's access control is based on source
23972b15cb3dSCy Schubert	address and localhost addresses generally have no restrictions,
23982b15cb3dSCy Schubert	an attacker can send malicious control and configuration packets
23992b15cb3dSCy Schubert	by spoofing ::1 addresses from the outside. Note Well: This is
24002b15cb3dSCy Schubert	not really a bug in NTP, it's a problem with some OSes. If you
24012b15cb3dSCy Schubert	have one of these OSes where ::1 can be spoofed, ALL ::1 -based
24022b15cb3dSCy Schubert	ACL restrictions on any application can be bypassed!
24032b15cb3dSCy Schubert    Mitigation:
24042b15cb3dSCy Schubert        Upgrade to 4.2.8p1, or later, from the NTP Project Download Page
24052b15cb3dSCy Schubert	or the NTP Public Services Project Download Page
24062b15cb3dSCy Schubert        Install firewall rules to block packets claiming to come from
24072b15cb3dSCy Schubert	::1 from inappropriate network interfaces.
24082b15cb3dSCy Schubert    Credit: This vulnerability was discovered by Stephen Roettger of
24092b15cb3dSCy Schubert	the Google Security Team.
24102b15cb3dSCy Schubert
24112b15cb3dSCy SchubertAdditionally, over 30 bugfixes and improvements were made to the codebase.
24122b15cb3dSCy SchubertSee the ChangeLog for more information.
24132b15cb3dSCy Schubert
24142b15cb3dSCy Schubert---
24152b15cb3dSCy SchubertNTP 4.2.8 (Harlan Stenn <stenn@ntp.org>, 2014/12/18)
24162b15cb3dSCy Schubert
24172b15cb3dSCy SchubertFocus: Security and Bug fixes, enhancements.
24182b15cb3dSCy Schubert
24192b15cb3dSCy SchubertSeverity: HIGH
24202b15cb3dSCy Schubert
24212b15cb3dSCy SchubertIn addition to bug fixes and enhancements, this release fixes the
24222b15cb3dSCy Schubertfollowing high-severity vulnerabilities:
24232b15cb3dSCy Schubert
24242b15cb3dSCy Schubert************************** vv NOTE WELL vv *****************************
24252b15cb3dSCy Schubert
24262b15cb3dSCy SchubertThe vulnerabilities listed below can be significantly mitigated by
24272b15cb3dSCy Schubertfollowing the BCP of putting
24282b15cb3dSCy Schubert
24292b15cb3dSCy Schubert restrict default ... noquery
24302b15cb3dSCy Schubert
24312b15cb3dSCy Schubertin the ntp.conf file.  With the exception of:
24322b15cb3dSCy Schubert
24332b15cb3dSCy Schubert   receive(): missing return on error
24342b15cb3dSCy Schubert   References: Sec 2670 / CVE-2014-9296 / VU#852879
24352b15cb3dSCy Schubert
24362b15cb3dSCy Schubertbelow (which is a limited-risk vulnerability), none of the recent
24372b15cb3dSCy Schubertvulnerabilities listed below can be exploited if the source IP is
24382b15cb3dSCy Schubertrestricted from sending a 'query'-class packet by your ntp.conf file.
24392b15cb3dSCy Schubert
24402b15cb3dSCy Schubert************************** ^^ NOTE WELL ^^ *****************************
24412b15cb3dSCy Schubert
24422b15cb3dSCy Schubert* Weak default key in config_auth().
24432b15cb3dSCy Schubert
24442b15cb3dSCy Schubert  References: [Sec 2665] / CVE-2014-9293 / VU#852879
24452b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
24462b15cb3dSCy Schubert  Vulnerable Versions: all releases prior to 4.2.7p11
24472b15cb3dSCy Schubert  Date Resolved: 28 Jan 2010
24482b15cb3dSCy Schubert
24492b15cb3dSCy Schubert  Summary: If no 'auth' key is set in the configuration file, ntpd
24502b15cb3dSCy Schubert	would generate a random key on the fly.  There were two
24512b15cb3dSCy Schubert	problems with this: 1) the generated key was 31 bits in size,
24522b15cb3dSCy Schubert	and 2) it used the (now weak) ntp_random() function, which was
24532b15cb3dSCy Schubert	seeded with a 32-bit value and could only provide 32 bits of
24542b15cb3dSCy Schubert	entropy.  This was sufficient back in the late 1990s when the
24552b15cb3dSCy Schubert	code was written.  Not today.
24562b15cb3dSCy Schubert
24572b15cb3dSCy Schubert  Mitigation - any of:
24582b15cb3dSCy Schubert	- Upgrade to 4.2.7p11 or later.
24592b15cb3dSCy Schubert	- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
24602b15cb3dSCy Schubert
24612b15cb3dSCy Schubert  Credit: This vulnerability was noticed in ntp-4.2.6 by Neel Mehta
24622b15cb3dSCy Schubert  	of the Google Security Team.
24632b15cb3dSCy Schubert
24642b15cb3dSCy Schubert* Non-cryptographic random number generator with weak seed used by
24652b15cb3dSCy Schubert  ntp-keygen to generate symmetric keys.
24662b15cb3dSCy Schubert
24672b15cb3dSCy Schubert  References: [Sec 2666] / CVE-2014-9294 / VU#852879
24682b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
24692b15cb3dSCy Schubert  Vulnerable Versions: All NTP4 releases before 4.2.7p230
24702b15cb3dSCy Schubert  Date Resolved: Dev (4.2.7p230) 01 Nov 2011
24712b15cb3dSCy Schubert
24722b15cb3dSCy Schubert  Summary: Prior to ntp-4.2.7p230 ntp-keygen used a weak seed to
24732b15cb3dSCy Schubert  	prepare a random number generator that was of good quality back
24742b15cb3dSCy Schubert	in the late 1990s. The random numbers produced was then used to
24752b15cb3dSCy Schubert	generate symmetric keys. In ntp-4.2.8 we use a current-technology
24762b15cb3dSCy Schubert	cryptographic random number generator, either RAND_bytes from
24772b15cb3dSCy Schubert	OpenSSL, or arc4random().
24782b15cb3dSCy Schubert
24792b15cb3dSCy Schubert  Mitigation - any of:
24802b15cb3dSCy Schubert  	- Upgrade to 4.2.7p230 or later.
24812b15cb3dSCy Schubert	- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
24822b15cb3dSCy Schubert
24832b15cb3dSCy Schubert  Credit:  This vulnerability was discovered in ntp-4.2.6 by
24842b15cb3dSCy Schubert  	Stephen Roettger of the Google Security Team.
24852b15cb3dSCy Schubert
24862b15cb3dSCy Schubert* Buffer overflow in crypto_recv()
24872b15cb3dSCy Schubert
24882b15cb3dSCy Schubert  References: Sec 2667 / CVE-2014-9295 / VU#852879
24892b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
24902b15cb3dSCy Schubert  Versions: All releases before 4.2.8
24912b15cb3dSCy Schubert  Date Resolved: Stable (4.2.8) 18 Dec 2014
24922b15cb3dSCy Schubert
24932b15cb3dSCy Schubert  Summary: When Autokey Authentication is enabled (i.e. the ntp.conf
24942b15cb3dSCy Schubert  	file contains a 'crypto pw ...' directive) a remote attacker
24952b15cb3dSCy Schubert	can send a carefully crafted packet that can overflow a stack
24962b15cb3dSCy Schubert	buffer and potentially allow malicious code to be executed
24972b15cb3dSCy Schubert	with the privilege level of the ntpd process.
24982b15cb3dSCy Schubert
24992b15cb3dSCy Schubert  Mitigation - any of:
25002b15cb3dSCy Schubert  	- Upgrade to 4.2.8, or later, or
25012b15cb3dSCy Schubert	- Disable Autokey Authentication by removing, or commenting out,
25022b15cb3dSCy Schubert	  all configuration directives beginning with the crypto keyword
25032b15cb3dSCy Schubert	  in your ntp.conf file.
25042b15cb3dSCy Schubert
25052b15cb3dSCy Schubert  Credit: This vulnerability was discovered by Stephen Roettger of the
25062b15cb3dSCy Schubert  	Google Security Team.
25072b15cb3dSCy Schubert
25082b15cb3dSCy Schubert* Buffer overflow in ctl_putdata()
25092b15cb3dSCy Schubert
25102b15cb3dSCy Schubert  References: Sec 2668 / CVE-2014-9295 / VU#852879
25112b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
25122b15cb3dSCy Schubert  Versions: All NTP4 releases before 4.2.8
25132b15cb3dSCy Schubert  Date Resolved: Stable (4.2.8) 18 Dec 2014
25142b15cb3dSCy Schubert
25152b15cb3dSCy Schubert  Summary: A remote attacker can send a carefully crafted packet that
25162b15cb3dSCy Schubert  	can overflow a stack buffer and potentially allow malicious
25172b15cb3dSCy Schubert	code to be executed with the privilege level of the ntpd process.
25182b15cb3dSCy Schubert
25192b15cb3dSCy Schubert  Mitigation - any of:
25202b15cb3dSCy Schubert  	- Upgrade to 4.2.8, or later.
25212b15cb3dSCy Schubert	- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
25222b15cb3dSCy Schubert
25232b15cb3dSCy Schubert  Credit: This vulnerability was discovered by Stephen Roettger of the
25242b15cb3dSCy Schubert  	Google Security Team.
25252b15cb3dSCy Schubert
25262b15cb3dSCy Schubert* Buffer overflow in configure()
25272b15cb3dSCy Schubert
25282b15cb3dSCy Schubert  References: Sec 2669 / CVE-2014-9295 / VU#852879
25292b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
25302b15cb3dSCy Schubert  Versions: All NTP4 releases before 4.2.8
25312b15cb3dSCy Schubert  Date Resolved: Stable (4.2.8) 18 Dec 2014
25322b15cb3dSCy Schubert
25332b15cb3dSCy Schubert  Summary: A remote attacker can send a carefully crafted packet that
25342b15cb3dSCy Schubert	can overflow a stack buffer and potentially allow malicious
25352b15cb3dSCy Schubert	code to be executed with the privilege level of the ntpd process.
25362b15cb3dSCy Schubert
25372b15cb3dSCy Schubert  Mitigation - any of:
25382b15cb3dSCy Schubert  	- Upgrade to 4.2.8, or later.
25392b15cb3dSCy Schubert	- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
25402b15cb3dSCy Schubert
25412b15cb3dSCy Schubert  Credit: This vulnerability was discovered by Stephen Roettger of the
25422b15cb3dSCy Schubert	Google Security Team.
25432b15cb3dSCy Schubert
25442b15cb3dSCy Schubert* receive(): missing return on error
25452b15cb3dSCy Schubert
25462b15cb3dSCy Schubert  References: Sec 2670 / CVE-2014-9296 / VU#852879
25472b15cb3dSCy Schubert  CVSS: (AV:N/AC:L/Au:N/C:N/I:N/A:P) Base Score: 5.0
25482b15cb3dSCy Schubert  Versions: All NTP4 releases before 4.2.8
25492b15cb3dSCy Schubert  Date Resolved: Stable (4.2.8) 18 Dec 2014
25502b15cb3dSCy Schubert
25512b15cb3dSCy Schubert  Summary: Code in ntp_proto.c:receive() was missing a 'return;' in
25522b15cb3dSCy Schubert  	the code path where an error was detected, which meant
25532b15cb3dSCy Schubert	processing did not stop when a specific rare error occurred.
25542b15cb3dSCy Schubert	We haven't found a way for this bug to affect system integrity.
25552b15cb3dSCy Schubert	If there is no way to affect system integrity the base CVSS
25562b15cb3dSCy Schubert	score for this bug is 0. If there is one avenue through which
25572b15cb3dSCy Schubert	system integrity can be partially affected, the base score
25582b15cb3dSCy Schubert	becomes a 5. If system integrity can be partially affected
25592b15cb3dSCy Schubert	via all three integrity metrics, the CVSS base score become 7.5.
25602b15cb3dSCy Schubert
25612b15cb3dSCy Schubert  Mitigation - any of:
25622b15cb3dSCy Schubert        - Upgrade to 4.2.8, or later,
25632b15cb3dSCy Schubert        - Remove or comment out all configuration directives
25642b15cb3dSCy Schubert	  beginning with the crypto keyword in your ntp.conf file.
25652b15cb3dSCy Schubert
25662b15cb3dSCy Schubert  Credit: This vulnerability was discovered by Stephen Roettger of the
25672b15cb3dSCy Schubert  	Google Security Team.
25682b15cb3dSCy Schubert
25692b15cb3dSCy SchubertSee http://support.ntp.org/security for more information.
25702b15cb3dSCy Schubert
25712b15cb3dSCy SchubertNew features / changes in this release:
25722b15cb3dSCy Schubert
25732b15cb3dSCy SchubertImportant Changes
25742b15cb3dSCy Schubert
25752b15cb3dSCy Schubert* Internal NTP Era counters
25762b15cb3dSCy Schubert
25772b15cb3dSCy SchubertThe internal counters that track the "era" (range of years) we are in
25782b15cb3dSCy Schubertrolls over every 136 years'.  The current "era" started at the stroke of
25792b15cb3dSCy Schubertmidnight on 1 Jan 1900, and ends just before the stroke of midnight on
25802b15cb3dSCy Schubert1 Jan 2036.
25812b15cb3dSCy SchubertIn the past, we have used the "midpoint" of the  range to decide which
25822b15cb3dSCy Schubertera we were in.  Given the longevity of some products, it became clear
25832b15cb3dSCy Schubertthat it would be more functional to "look back" less, and "look forward"
25842b15cb3dSCy Schubertmore.  We now compile a timestamp into the ntpd executable and when we
25852b15cb3dSCy Schubertget a timestamp we us the "built-on" to tell us what era we are in.
25862b15cb3dSCy SchubertThis check "looks back" 10 years, and "looks forward" 126 years.
25872b15cb3dSCy Schubert
25882b15cb3dSCy Schubert* ntpdc responses disabled by default
25892b15cb3dSCy Schubert
25902b15cb3dSCy SchubertDave Hart writes:
25912b15cb3dSCy Schubert
25922b15cb3dSCy SchubertFor a long time, ntpq and its mostly text-based mode 6 (control)
25932b15cb3dSCy Schubertprotocol have been preferred over ntpdc and its mode 7 (private
25942b15cb3dSCy Schubertrequest) protocol for runtime queries and configuration.  There has
25952b15cb3dSCy Schubertbeen a goal of deprecating ntpdc, previously held back by numerous
25962b15cb3dSCy Schubertcapabilities exposed by ntpdc with no ntpq equivalent.  I have been
25972b15cb3dSCy Schubertadding commands to ntpq to cover these cases, and I believe I've
25982b15cb3dSCy Schubertcovered them all, though I've not compared command-by-command
25992b15cb3dSCy Schubertrecently.
26002b15cb3dSCy Schubert
26012b15cb3dSCy SchubertAs I've said previously, the binary mode 7 protocol involves a lot of
26022b15cb3dSCy Schuberthand-rolled structure layout and byte-swapping code in both ntpd and
26032b15cb3dSCy Schubertntpdc which is hard to get right.  As ntpd grows and changes, the
26042b15cb3dSCy Schubertchanges are difficult to expose via ntpdc while maintaining forward
26052b15cb3dSCy Schubertand backward compatibility between ntpdc and ntpd.  In contrast,
26062b15cb3dSCy Schubertntpq's text-based, label=value approach involves more code reuse and
26072b15cb3dSCy Schubertallows compatible changes without extra work in most cases.
26082b15cb3dSCy Schubert
26092b15cb3dSCy SchubertMode 7 has always been defined as vendor/implementation-specific while
26102b15cb3dSCy Schubertmode 6 is described in RFC 1305 and intended to be open to interoperate
26112b15cb3dSCy Schubertwith other implementations.  There is an early draft of an updated
26122b15cb3dSCy Schubertmode 6 description that likely will join the other NTPv4 RFCs
26132b15cb3dSCy Schuberteventually. (http://tools.ietf.org/html/draft-odonoghue-ntpv4-control-01)
26142b15cb3dSCy Schubert
26152b15cb3dSCy SchubertFor these reasons, ntpd 4.2.7p230 by default disables processing of
26162b15cb3dSCy Schubertntpdc queries, reducing ntpd's attack surface and functionally
26172b15cb3dSCy Schubertdeprecating ntpdc.  If you are in the habit of using ntpdc for certain
26182b15cb3dSCy Schubertoperations, please try the ntpq equivalent.  If there's no equivalent,
26192b15cb3dSCy Schubertplease open a bug report at http://bugs.ntp.org./
26202b15cb3dSCy Schubert
26212b15cb3dSCy SchubertIn addition to the above, over 1100 issues have been resolved between
26222b15cb3dSCy Schubertthe 4.2.6 branch and 4.2.8.  The ChangeLog file in the distribution
26232b15cb3dSCy Schubertlists these.
26242b15cb3dSCy Schubert
26252b15cb3dSCy Schubert---
26262b15cb3dSCy SchubertNTP 4.2.6p5 (Harlan Stenn <stenn@ntp.org>, 2011/12/24)
26272b15cb3dSCy Schubert
26282b15cb3dSCy SchubertFocus: Bug fixes
26292b15cb3dSCy Schubert
26302b15cb3dSCy SchubertSeverity: Medium
26312b15cb3dSCy Schubert
26322b15cb3dSCy SchubertThis is a recommended upgrade.
26332b15cb3dSCy Schubert
26342b15cb3dSCy SchubertThis release updates sys_rootdisp and sys_jitter calculations to match the
26352b15cb3dSCy SchubertRFC specification, fixes a potential IPv6 address matching error for the
26362b15cb3dSCy Schubert"nic" and "interface" configuration directives, suppresses the creation of
26372b15cb3dSCy Schubertextraneous ephemeral associations for certain broadcastclient and
26382b15cb3dSCy Schubertmulticastclient configurations, cleans up some ntpq display issues, and
26392b15cb3dSCy Schubertincludes improvements to orphan mode, minor bugs fixes and code clean-ups.
26402b15cb3dSCy Schubert
26412b15cb3dSCy SchubertNew features / changes in this release:
26422b15cb3dSCy Schubert
26432b15cb3dSCy Schubertntpd
26442b15cb3dSCy Schubert
26452b15cb3dSCy Schubert * Updated "nic" and "interface" IPv6 address handling to prevent
26462b15cb3dSCy Schubert   mismatches with localhost [::1] and wildcard [::] which resulted from
26472b15cb3dSCy Schubert   using the address/prefix format (e.g. fe80::/64)
26482b15cb3dSCy Schubert * Fix orphan mode stratum incorrectly counting to infinity
26492b15cb3dSCy Schubert * Orphan parent selection metric updated to includes missing ntohl()
26502b15cb3dSCy Schubert * Non-printable stratum 16 refid no longer sent to ntp
26512b15cb3dSCy Schubert * Duplicate ephemeral associations suppressed for broadcastclient and
26522b15cb3dSCy Schubert   multicastclient without broadcastdelay
26532b15cb3dSCy Schubert * Exclude undetermined sys_refid from use in loopback TEST12
26542b15cb3dSCy Schubert * Exclude MODE_SERVER responses from KoD rate limiting
26552b15cb3dSCy Schubert * Include root delay in clock_update() sys_rootdisp calculations
26562b15cb3dSCy Schubert * get_systime() updated to exclude sys_residual offset (which only
26572b15cb3dSCy Schubert   affected bits "below" sys_tick, the precision threshold)
26582b15cb3dSCy Schubert * sys.peer jitter weighting corrected in sys_jitter calculation
26592b15cb3dSCy Schubert
26602b15cb3dSCy Schubertntpq
26612b15cb3dSCy Schubert
26622b15cb3dSCy Schubert * -n option extended to include the billboard "server" column
26632b15cb3dSCy Schubert * IPv6 addresses in the local column truncated to prevent overruns
26642b15cb3dSCy Schubert
26652b15cb3dSCy Schubert---
26662b15cb3dSCy SchubertNTP 4.2.6p4 (Harlan Stenn <stenn@ntp.org>, 2011/09/22)
26672b15cb3dSCy Schubert
26682b15cb3dSCy SchubertFocus: Bug fixes and portability improvements
26692b15cb3dSCy Schubert
26702b15cb3dSCy SchubertSeverity: Medium
26712b15cb3dSCy Schubert
26722b15cb3dSCy SchubertThis is a recommended upgrade.
26732b15cb3dSCy Schubert
26742b15cb3dSCy SchubertThis release includes build infrastructure updates, code
26752b15cb3dSCy Schubertclean-ups, minor bug fixes, fixes for a number of minor
26762b15cb3dSCy Schubertref-clock issues, and documentation revisions.
26772b15cb3dSCy Schubert
26782b15cb3dSCy SchubertPortability improvements affect AIX, HP-UX, Linux, OS X and 64-bit time_t.
26792b15cb3dSCy Schubert
26802b15cb3dSCy SchubertNew features / changes in this release:
26812b15cb3dSCy Schubert
26822b15cb3dSCy SchubertBuild system
26832b15cb3dSCy Schubert
26842b15cb3dSCy Schubert* Fix checking for struct rtattr
26852b15cb3dSCy Schubert* Update config.guess and config.sub for AIX
26862b15cb3dSCy Schubert* Upgrade required version of autogen and libopts for building
26872b15cb3dSCy Schubert  from our source code repository
26882b15cb3dSCy Schubert
26892b15cb3dSCy Schubertntpd
26902b15cb3dSCy Schubert
26912b15cb3dSCy Schubert* Back-ported several fixes for Coverity warnings from ntp-dev
26922b15cb3dSCy Schubert* Fix a rare boundary condition in UNLINK_EXPR_SLIST()
26932b15cb3dSCy Schubert* Allow "logconfig =allall" configuration directive
26942b15cb3dSCy Schubert* Bind tentative IPv6 addresses on Linux
26952b15cb3dSCy Schubert* Correct WWVB/Spectracom driver to timestamp CR instead of LF
26962b15cb3dSCy Schubert* Improved tally bit handling to prevent incorrect ntpq peer status reports
26972b15cb3dSCy Schubert* Exclude the Undisciplined Local Clock and ACTS drivers from the initial
26982b15cb3dSCy Schubert  candidate list unless they are designated a "prefer peer"
26992b15cb3dSCy Schubert* Prevent the consideration of Undisciplined Local Clock or ACTS drivers for
27002b15cb3dSCy Schubert  selection during the 'tos orphanwait' period
27012b15cb3dSCy Schubert* Prefer an Orphan Mode Parent over the Undisciplined Local Clock or ACTS
27022b15cb3dSCy Schubert  drivers
27032b15cb3dSCy Schubert* Improved support of the Parse Refclock trusttime flag in Meinberg mode
27042b15cb3dSCy Schubert* Back-port utility routines from ntp-dev: mprintf(), emalloc_zero()
27052b15cb3dSCy Schubert* Added the NTPD_TICKADJ_PPM environment variable for specifying baseline
27062b15cb3dSCy Schubert  clock slew on Microsoft Windows
27072b15cb3dSCy Schubert* Code cleanup in libntpq
27082b15cb3dSCy Schubert
27092b15cb3dSCy Schubertntpdc
27102b15cb3dSCy Schubert
27112b15cb3dSCy Schubert* Fix timerstats reporting
27122b15cb3dSCy Schubert
27132b15cb3dSCy Schubertntpdate
27142b15cb3dSCy Schubert
27152b15cb3dSCy Schubert* Reduce time required to set clock
27162b15cb3dSCy Schubert* Allow a timeout greater than 2 seconds
27172b15cb3dSCy Schubert
27182b15cb3dSCy Schubertsntp
27192b15cb3dSCy Schubert
27202b15cb3dSCy Schubert* Backward incompatible command-line option change:
27212b15cb3dSCy Schubert  -l/--filelog changed -l/--logfile (to be consistent with ntpd)
27222b15cb3dSCy Schubert
27232b15cb3dSCy SchubertDocumentation
27242b15cb3dSCy Schubert
27252b15cb3dSCy Schubert* Update html2man. Fix some tags in the .html files
27262b15cb3dSCy Schubert* Distribute ntp-wait.html
27272b15cb3dSCy Schubert
27282b15cb3dSCy Schubert---
27292b15cb3dSCy SchubertNTP 4.2.6p3 (Harlan Stenn <stenn@ntp.org>, 2011/01/03)
27302b15cb3dSCy Schubert
27312b15cb3dSCy SchubertFocus: Bug fixes and portability improvements
27322b15cb3dSCy Schubert
27332b15cb3dSCy SchubertSeverity: Medium
27342b15cb3dSCy Schubert
27352b15cb3dSCy SchubertThis is a recommended upgrade.
27362b15cb3dSCy Schubert
27372b15cb3dSCy SchubertThis release includes build infrastructure updates, code
27382b15cb3dSCy Schubertclean-ups, minor bug fixes, fixes for a number of minor
27392b15cb3dSCy Schubertref-clock issues, and documentation revisions.
27402b15cb3dSCy Schubert
27412b15cb3dSCy SchubertPortability improvements in this release affect AIX, Atari FreeMiNT,
27422b15cb3dSCy SchubertFreeBSD4, Linux and Microsoft Windows.
27432b15cb3dSCy Schubert
27442b15cb3dSCy SchubertNew features / changes in this release:
27452b15cb3dSCy Schubert
27462b15cb3dSCy SchubertBuild system
27472b15cb3dSCy Schubert* Use lsb_release to get information about Linux distributions.
27482b15cb3dSCy Schubert* 'test' is in /usr/bin (instead of /bin) on some systems.
27492b15cb3dSCy Schubert* Basic sanity checks for the ChangeLog file.
27502b15cb3dSCy Schubert* Source certain build files with ./filename for systems without . in PATH.
27512b15cb3dSCy Schubert* IRIX portability fix.
27522b15cb3dSCy Schubert* Use a single copy of the "libopts" code.
27532b15cb3dSCy Schubert* autogen/libopts upgrade.
27542b15cb3dSCy Schubert* configure.ac m4 quoting cleanup.
27552b15cb3dSCy Schubert
27562b15cb3dSCy Schubertntpd
27572b15cb3dSCy Schubert* Do not bind to IN6_IFF_ANYCAST addresses.
27582b15cb3dSCy Schubert* Log the reason for exiting under Windows.
27592b15cb3dSCy Schubert* Multicast fixes for Windows.
27602b15cb3dSCy Schubert* Interpolation fixes for Windows.
27612b15cb3dSCy Schubert* IPv4 and IPv6 Multicast fixes.
27622b15cb3dSCy Schubert* Manycast solicitation fixes and general repairs.
27632b15cb3dSCy Schubert* JJY refclock cleanup.
27642b15cb3dSCy Schubert* NMEA refclock improvements.
27652b15cb3dSCy Schubert* Oncore debug message cleanup.
27662b15cb3dSCy Schubert* Palisade refclock now builds under Linux.
27672b15cb3dSCy Schubert* Give RAWDCF more baud rates.
27682b15cb3dSCy Schubert* Support Truetime Satellite clocks under Windows.
27692b15cb3dSCy Schubert* Support Arbiter 1093C Satellite clocks under Windows.
27702b15cb3dSCy Schubert* Make sure that the "filegen" configuration command defaults to "enable".
27712b15cb3dSCy Schubert* Range-check the status codes (plus other cleanup) in the RIPE-NCC driver.
27722b15cb3dSCy Schubert* Prohibit 'includefile' directive in remote configuration command.
27732b15cb3dSCy Schubert* Fix 'nic' interface bindings.
27742b15cb3dSCy Schubert* Fix the way we link with openssl if openssl is installed in the base
27752b15cb3dSCy Schubert  system.
27762b15cb3dSCy Schubert
27772b15cb3dSCy Schubertntp-keygen
27782b15cb3dSCy Schubert* Fix -V coredump.
27792b15cb3dSCy Schubert* OpenSSL version display cleanup.
27802b15cb3dSCy Schubert
27812b15cb3dSCy Schubertntpdc
27822b15cb3dSCy Schubert* Many counters should be treated as unsigned.
27832b15cb3dSCy Schubert
27842b15cb3dSCy Schubertntpdate
27852b15cb3dSCy Schubert* Do not ignore replies with equal receive and transmit timestamps.
27862b15cb3dSCy Schubert
27872b15cb3dSCy Schubertntpq
27882b15cb3dSCy Schubert* libntpq warning cleanup.
27892b15cb3dSCy Schubert
27902b15cb3dSCy Schubertntpsnmpd
27912b15cb3dSCy Schubert* Correct SNMP type for "precision" and "resolution".
27922b15cb3dSCy Schubert* Update the MIB from the draft version to RFC-5907.
27932b15cb3dSCy Schubert
27942b15cb3dSCy Schubertsntp
27952b15cb3dSCy Schubert* Display timezone offset when showing time for sntp in the local
27962b15cb3dSCy Schubert  timezone.
27972b15cb3dSCy Schubert* Pay proper attention to RATE KoD packets.
27982b15cb3dSCy Schubert* Fix a miscalculation of the offset.
27992b15cb3dSCy Schubert* Properly parse empty lines in the key file.
28002b15cb3dSCy Schubert* Logging cleanup.
28012b15cb3dSCy Schubert* Use tv_usec correctly in set_time().
28022b15cb3dSCy Schubert* Documentation cleanup.
28032b15cb3dSCy Schubert
28042b15cb3dSCy Schubert---
28052b15cb3dSCy SchubertNTP 4.2.6p2 (Harlan Stenn <stenn@ntp.org>, 2010/07/08)
28062b15cb3dSCy Schubert
28072b15cb3dSCy SchubertFocus: Bug fixes and portability improvements
28082b15cb3dSCy Schubert
28092b15cb3dSCy SchubertSeverity: Medium
28102b15cb3dSCy Schubert
28112b15cb3dSCy SchubertThis is a recommended upgrade.
28122b15cb3dSCy Schubert
28132b15cb3dSCy SchubertThis release includes build infrastructure updates, code
28142b15cb3dSCy Schubertclean-ups, minor bug fixes, fixes for a number of minor
28152b15cb3dSCy Schubertref-clock issues, improved KOD handling, OpenSSL related
28162b15cb3dSCy Schubertupdates and documentation revisions.
28172b15cb3dSCy Schubert
28182b15cb3dSCy SchubertPortability improvements in this release affect Irix, Linux,
28192b15cb3dSCy SchubertMac OS, Microsoft Windows, OpenBSD and QNX6
28202b15cb3dSCy Schubert
28212b15cb3dSCy SchubertNew features / changes in this release:
28222b15cb3dSCy Schubert
28232b15cb3dSCy Schubertntpd
28242b15cb3dSCy Schubert* Range syntax for the trustedkey configuration directive
28252b15cb3dSCy Schubert* Unified IPv4 and IPv6 restrict lists
28262b15cb3dSCy Schubert
28272b15cb3dSCy Schubertntpdate
28282b15cb3dSCy Schubert* Rate limiting and KOD handling
28292b15cb3dSCy Schubert
28302b15cb3dSCy Schubertntpsnmpd
28312b15cb3dSCy Schubert* default connection to net-snmpd via a unix-domain socket
28322b15cb3dSCy Schubert* command-line 'socket name' option
28332b15cb3dSCy Schubert
28342b15cb3dSCy Schubertntpq / ntpdc
28352b15cb3dSCy Schubert* support for the "passwd ..." syntax
28362b15cb3dSCy Schubert* key-type specific password prompts
28372b15cb3dSCy Schubert
28382b15cb3dSCy Schubertsntp
28392b15cb3dSCy Schubert* MD5 authentication of an ntpd
28402b15cb3dSCy Schubert* Broadcast and crypto
28412b15cb3dSCy Schubert* OpenSSL support
28422b15cb3dSCy Schubert
28432b15cb3dSCy Schubert---
28442b15cb3dSCy SchubertNTP 4.2.6p1 (Harlan Stenn <stenn@ntp.org>, 2010/04/09)
28452b15cb3dSCy Schubert
28462b15cb3dSCy SchubertFocus: Bug fixes, portability fixes, and documentation improvements
28472b15cb3dSCy Schubert
28482b15cb3dSCy SchubertSeverity: Medium
28492b15cb3dSCy Schubert
28502b15cb3dSCy SchubertThis is a recommended upgrade.
28512b15cb3dSCy Schubert
28522b15cb3dSCy Schubert---
28532b15cb3dSCy SchubertNTP 4.2.6 (Harlan Stenn <stenn@ntp.org>, 2009/12/08)
28542b15cb3dSCy Schubert
28552b15cb3dSCy SchubertFocus: enhancements and bug fixes.
28562b15cb3dSCy Schubert
28572b15cb3dSCy Schubert---
2858eb6d21b4SOllivier RobertNTP 4.2.4p8 (Harlan Stenn <stenn@ntp.org>, 2009/12/08)
2859eb6d21b4SOllivier Robert
2860eb6d21b4SOllivier RobertFocus: Security Fixes
2861eb6d21b4SOllivier Robert
2862eb6d21b4SOllivier RobertSeverity: HIGH
2863eb6d21b4SOllivier Robert
2864eb6d21b4SOllivier RobertThis release fixes the following high-severity vulnerability:
2865eb6d21b4SOllivier Robert
2866eb6d21b4SOllivier Robert* [Sec 1331] DoS with mode 7 packets - CVE-2009-3563.
2867eb6d21b4SOllivier Robert
2868eb6d21b4SOllivier Robert  See http://support.ntp.org/security for more information.
2869eb6d21b4SOllivier Robert
2870eb6d21b4SOllivier Robert  NTP mode 7 (MODE_PRIVATE) is used by the ntpdc query and control utility.
2871eb6d21b4SOllivier Robert  In contrast, ntpq uses NTP mode 6 (MODE_CONTROL), while routine NTP time
2872eb6d21b4SOllivier Robert  transfers use modes 1 through 5.  Upon receipt of an incorrect mode 7
2873eb6d21b4SOllivier Robert  request or a mode 7 error response from an address which is not listed
2874eb6d21b4SOllivier Robert  in a "restrict ... noquery" or "restrict ... ignore" statement, ntpd will
2875eb6d21b4SOllivier Robert  reply with a mode 7 error response (and log a message).  In this case:
2876eb6d21b4SOllivier Robert
2877eb6d21b4SOllivier Robert	* If an attacker spoofs the source address of ntpd host A in a
2878eb6d21b4SOllivier Robert	  mode 7 response packet sent to ntpd host B, both A and B will
2879eb6d21b4SOllivier Robert	  continuously send each other error responses, for as long as
2880eb6d21b4SOllivier Robert	  those packets get through.
2881eb6d21b4SOllivier Robert
2882eb6d21b4SOllivier Robert	* If an attacker spoofs an address of ntpd host A in a mode 7
2883eb6d21b4SOllivier Robert	  response packet sent to ntpd host A, A will respond to itself
2884eb6d21b4SOllivier Robert	  endlessly, consuming CPU and logging excessively.
2885eb6d21b4SOllivier Robert
2886eb6d21b4SOllivier Robert  Credit for finding this vulnerability goes to Robin Park and Dmitri
2887eb6d21b4SOllivier Robert  Vinokurov of Alcatel-Lucent.
2888eb6d21b4SOllivier Robert
2889eb6d21b4SOllivier RobertTHIS IS A STRONGLY RECOMMENDED UPGRADE.
2890eb6d21b4SOllivier Robert
2891eb6d21b4SOllivier Robert---
28922b15cb3dSCy Schubertntpd now syncs to refclocks right away.
28932b15cb3dSCy Schubert
28942b15cb3dSCy SchubertBackward-Incompatible changes:
28952b15cb3dSCy Schubert
28962b15cb3dSCy Schubertntpd no longer accepts '-v name' or '-V name' to define internal variables.
28972b15cb3dSCy SchubertUse '--var name' or '--dvar name' instead. (Bug 817)
28982b15cb3dSCy Schubert
28992b15cb3dSCy Schubert---
2900eb6d21b4SOllivier RobertNTP 4.2.4p7 (Harlan Stenn <stenn@ntp.org>, 2009/05/04)
2901eb6d21b4SOllivier Robert
2902eb6d21b4SOllivier RobertFocus: Security and Bug Fixes
2903eb6d21b4SOllivier Robert
2904eb6d21b4SOllivier RobertSeverity: HIGH
2905eb6d21b4SOllivier Robert
2906eb6d21b4SOllivier RobertThis release fixes the following high-severity vulnerability:
2907eb6d21b4SOllivier Robert
2908eb6d21b4SOllivier Robert* [Sec 1151] Remote exploit if autokey is enabled.  CVE-2009-1252
2909eb6d21b4SOllivier Robert
2910eb6d21b4SOllivier Robert  See http://support.ntp.org/security for more information.
2911eb6d21b4SOllivier Robert
2912eb6d21b4SOllivier Robert  If autokey is enabled (if ntp.conf contains a "crypto pw whatever"
2913eb6d21b4SOllivier Robert  line) then a carefully crafted packet sent to the machine will cause
2914eb6d21b4SOllivier Robert  a buffer overflow and possible execution of injected code, running
2915eb6d21b4SOllivier Robert  with the privileges of the ntpd process (often root).
2916eb6d21b4SOllivier Robert
2917eb6d21b4SOllivier Robert  Credit for finding this vulnerability goes to Chris Ries of CMU.
2918eb6d21b4SOllivier Robert
2919eb6d21b4SOllivier RobertThis release fixes the following low-severity vulnerabilities:
2920eb6d21b4SOllivier Robert
2921eb6d21b4SOllivier Robert* [Sec 1144] limited (two byte) buffer overflow in ntpq.  CVE-2009-0159
2922eb6d21b4SOllivier Robert  Credit for finding this vulnerability goes to Geoff Keating of Apple.
2923eb6d21b4SOllivier Robert
2924eb6d21b4SOllivier Robert* [Sec 1149] use SO_EXCLUSIVEADDRUSE on Windows
2925eb6d21b4SOllivier Robert  Credit for finding this issue goes to Dave Hart.
2926eb6d21b4SOllivier Robert
2927eb6d21b4SOllivier RobertThis release fixes a number of bugs and adds some improvements:
2928eb6d21b4SOllivier Robert
2929eb6d21b4SOllivier Robert* Improved logging
2930eb6d21b4SOllivier Robert* Fix many compiler warnings
2931eb6d21b4SOllivier Robert* Many fixes and improvements for Windows
2932eb6d21b4SOllivier Robert* Adds support for AIX 6.1
2933eb6d21b4SOllivier Robert* Resolves some issues under MacOS X and Solaris
2934eb6d21b4SOllivier Robert
2935eb6d21b4SOllivier RobertTHIS IS A STRONGLY RECOMMENDED UPGRADE.
2936eb6d21b4SOllivier Robert
2937eb6d21b4SOllivier Robert---
2938eb6d21b4SOllivier RobertNTP 4.2.4p6 (Harlan Stenn <stenn@ntp.org>, 2009/01/07)
2939eb6d21b4SOllivier Robert
2940eb6d21b4SOllivier RobertFocus: Security Fix
2941eb6d21b4SOllivier Robert
2942eb6d21b4SOllivier RobertSeverity: Low
2943eb6d21b4SOllivier Robert
2944eb6d21b4SOllivier RobertThis release fixes oCERT.org's CVE-2009-0021, a vulnerability affecting
2945eb6d21b4SOllivier Robertthe OpenSSL library relating to the incorrect checking of the return
2946eb6d21b4SOllivier Robertvalue of EVP_VerifyFinal function.
2947eb6d21b4SOllivier Robert
2948eb6d21b4SOllivier RobertCredit for finding this issue goes to the Google Security Team for
2949eb6d21b4SOllivier Robertfinding the original issue with OpenSSL, and to ocert.org for finding
2950eb6d21b4SOllivier Robertthe problem in NTP and telling us about it.
2951eb6d21b4SOllivier Robert
2952eb6d21b4SOllivier RobertThis is a recommended upgrade.
2953eb6d21b4SOllivier Robert---
2954ea906c41SOllivier RobertNTP 4.2.4p5 (Harlan Stenn <stenn@ntp.org>, 2008/08/17)
2955ea906c41SOllivier Robert
2956ea906c41SOllivier RobertFocus: Minor Bugfixes
2957ea906c41SOllivier Robert
2958ea906c41SOllivier RobertThis release fixes a number of Windows-specific ntpd bugs and
2959ea906c41SOllivier Robertplatform-independent ntpdate bugs. A logging bugfix has been applied
2960ea906c41SOllivier Robertto the ONCORE driver.
2961ea906c41SOllivier Robert
2962ea906c41SOllivier RobertThe "dynamic" keyword and is now obsolete and deferred binding to local
2963ea906c41SOllivier Robertinterfaces is the new default. The minimum time restriction for the
2964ea906c41SOllivier Robertinterface update interval has been dropped.
2965ea906c41SOllivier Robert
2966ea906c41SOllivier RobertA number of minor build system and documentation fixes are included.
2967ea906c41SOllivier Robert
2968ea906c41SOllivier RobertThis is a recommended upgrade for Windows.
2969ea906c41SOllivier Robert
2970ea906c41SOllivier Robert---
2971ea906c41SOllivier RobertNTP 4.2.4p4 (Harlan Stenn <stenn@ntp.org>, 2007/09/10)
2972ea906c41SOllivier Robert
2973ea906c41SOllivier RobertFocus: Minor Bugfixes
2974ea906c41SOllivier Robert
2975ea906c41SOllivier RobertThis release updates certain copyright information, fixes several display
2976ea906c41SOllivier Robertbugs in ntpdc, avoids SIGIO interrupting malloc(), cleans up file descriptor
2977ea906c41SOllivier Robertshutdown in the parse refclock driver, removes some lint from the code,
2978ea906c41SOllivier Robertstops accessing certain buffers immediately after they were freed, fixes
2979ea906c41SOllivier Roberta problem with non-command-line specification of -6, and allows the loopback
2980ea906c41SOllivier Robertinterface to share addresses with other interfaces.
2981ea906c41SOllivier Robert
2982ea906c41SOllivier Robert---
2983ea906c41SOllivier RobertNTP 4.2.4p3 (Harlan Stenn <stenn@ntp.org>, 2007/06/29)
2984ea906c41SOllivier Robert
2985ea906c41SOllivier RobertFocus: Minor Bugfixes
2986ea906c41SOllivier Robert
2987ea906c41SOllivier RobertThis release fixes a bug in Windows that made it difficult to
2988ea906c41SOllivier Robertterminate ntpd under windows.
2989ea906c41SOllivier RobertThis is a recommended upgrade for Windows.
2990ea906c41SOllivier Robert
2991ea906c41SOllivier Robert---
2992ea906c41SOllivier RobertNTP 4.2.4p2 (Harlan Stenn <stenn@ntp.org>, 2007/06/19)
2993ea906c41SOllivier Robert
2994ea906c41SOllivier RobertFocus: Minor Bugfixes
2995ea906c41SOllivier Robert
2996ea906c41SOllivier RobertThis release fixes a multicast mode authentication problem,
2997ea906c41SOllivier Robertan error in NTP packet handling on Windows that could lead to
2998ea906c41SOllivier Robertntpd crashing, and several other minor bugs. Handling of
2999ea906c41SOllivier Robertmulticast interfaces and logging configuration were improved.
3000ea906c41SOllivier RobertThe required versions of autogen and libopts were incremented.
3001ea906c41SOllivier RobertThis is a recommended upgrade for Windows and multicast users.
3002ea906c41SOllivier Robert
3003ea906c41SOllivier Robert---
3004ea906c41SOllivier RobertNTP 4.2.4 (Harlan Stenn <stenn@ntp.org>, 2006/12/31)
3005ea906c41SOllivier Robert
3006ea906c41SOllivier RobertFocus: enhancements and bug fixes.
3007ea906c41SOllivier Robert
3008ea906c41SOllivier RobertDynamic interface rescanning was added to simplify the use of ntpd in
3009ea906c41SOllivier Robertconjunction with DHCP. GNU AutoGen is used for its command-line options
3010ea906c41SOllivier Robertprocessing. Separate PPS devices are supported for PARSE refclocks, MD5
3011ea906c41SOllivier Robertsignatures are now provided for the release files. Drivers have been
3012ea906c41SOllivier Robertadded for some new ref-clocks and have been removed for some older
3013ea906c41SOllivier Robertref-clocks. This release also includes other improvements, documentation
3014ea906c41SOllivier Robertand bug fixes.
3015ea906c41SOllivier Robert
3016ea906c41SOllivier RobertK&R C is no longer supported as of NTP-4.2.4. We are now aiming for ANSI
3017ea906c41SOllivier RobertC support.
3018ea906c41SOllivier Robert
3019ea906c41SOllivier Robert---
3020ea906c41SOllivier RobertNTP 4.2.0 (Harlan Stenn <stenn@ntp.org>, 2003/10/15)
3021ea906c41SOllivier Robert
3022ea906c41SOllivier RobertFocus: enhancements and bug fixes.
3023