pkgsrc/net/ntp4/patches/patch-util_ntptime.c
taca 0078f33824 net/ntp4: update to 4.2.8p14
Updaet ntp4 to 4.2.8p14.

pkgsrc changes:
* Incorporate several changes from NetBSD base.
* few pkglint fixes.


Quote from release announce:

NTP 4.2.8p14 (Harlan Stenn <stenn@ntp.org>, 2020 Mar 03)

Focus: Security, Bug fixes, enhancements.

Severity: MEDIUM

This release fixes three vulnerabilities: a bug that causes causes an ntpd
instance that is explicitly configured to override the default and allow
ntpdc (mode 7) connections to be made to a server to read some uninitialized
memory; fixes the case where an unmonitored ntpd using an unauthenticated
association to its servers may be susceptible to a forged packet DoS attack;
and fixes an attack against a client instance that uses a single
unauthenticated time source.  It also fixes 46 other bugs and addresses
4 other issues.
2020-06-21 15:10:47 +00:00

15 lines
545 B
C

$NetBSD: patch-util_ntptime.c,v 1.1 2020/06/21 15:10:47 taca Exp $
* Changes from NetBSD base.
--- util/ntptime.c.orig 2020-03-03 23:41:29.000000000 +0000
+++ util/ntptime.c
@@ -98,7 +98,7 @@ main(
struct timex ntx, _ntx;
int times[20] = { 0 };
double ftemp, gtemp, htemp;
- double nscale = 1.0; /* assume usec scale for now */
+ volatile double nscale = 1.0; /* assume usec scale for now */
long time_frac; /* ntv.time.tv_frac_sec (us/ns) */
l_fp ts;
volatile unsigned ts_mask = TS_MASK_US; /* defaults to 20 bits (us) */