pkgsrc/net/ntp4/patches/patch-ntpd_refclock__neoclock4x.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

35 lines
1.3 KiB
C

$NetBSD: patch-ntpd_refclock__neoclock4x.c,v 1.1 2020/06/21 15:10:47 taca Exp $
* Changes from NetBSD base.
--- ntpd/refclock_neoclock4x.c.orig 2014-12-29 06:26:52.000000000 +0000
+++ ntpd/refclock_neoclock4x.c
@@ -725,7 +725,8 @@ neoclock4x_control(int unit,
if(NULL != out)
{
char *tt;
- char tmpbuf[80];
+ /* the 199 here is almost 2x the max string */
+ char tmpbuf[199];
out->kv_list = (struct ctl_var *)0;
out->type = REFCLK_NEOCLOCK4X;
@@ -765,14 +766,15 @@ neoclock4x_control(int unit,
snprintf(tt, 39, "dststatus=\"winter\"");
else
snprintf(tt, 39, "dststatus=\"unknown\"");
+ /* the 99 below is greater than 80 the max string */
tt = add_var(&out->kv_list, 80, RO|DEF);
- snprintf(tt, 79, "firmware=\"%s\"", up->firmware);
+ snprintf(tt, 99, "firmware=\"%s\"", up->firmware);
tt = add_var(&out->kv_list, 40, RO|DEF);
snprintf(tt, 39, "firmwaretag=\"%c\"", up->firmwaretag);
tt = add_var(&out->kv_list, 80, RO|DEF);
- snprintf(tt, 79, "driver version=\"%s\"", NEOCLOCK4X_DRIVER_VERSION);
+ snprintf(tt, 99, "driver version=\"%s\"", NEOCLOCK4X_DRIVER_VERSION);
tt = add_var(&out->kv_list, 80, RO|DEF);
- snprintf(tt, 79, "serialnumber=\"%s\"", up->serial);
+ snprintf(tt, 99, "serialnumber=\"%s\"", up->serial);
}
}