Tue Apr 21 21:44:22 2015 UTC ()
Pullup ticket #4678 - requested by taca
net/ntp4: security update

Revisions pulled up:
- net/ntp4/Makefile                                             1.85
- net/ntp4/PLIST                                                1.18
- net/ntp4/distinfo                                             1.21

---
   Module Name:	pkgsrc
   Committed By:	taca
   Date:		Wed Apr  8 03:31:34 UTC 2015

   Modified Files:
   	pkgsrc/net/ntp4: Makefile PLIST distinfo

   Log Message:
   Update ntp4 package to 4.2.8p2.

   NTP 4.2.8p2 (Harlan Stenn <stenn@ntp.org>, 2015/04/xx)

   Focus: Security and Bug fixes, enhancements.

   Severity: MEDIUM

   In addition to bug fixes and enhancements, this release fixes the
   following medium-severity vulnerabilities involving private key
   authentication:

   * [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.

       References: Sec 2779 / CVE-2015-1798 / VU#374268
       Affects: All NTP4 releases starting with ntp-4.2.5p99 up to but not
   	including ntp-4.2.8p2 where the installation uses symmetric keys
   	to authenticate remote associations.
       CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
       Date Resolved: Stable (4.2.8p2) 07 Apr 2015
       Summary: When ntpd is configured to use a symmetric key to authenticate
   	a remote NTP server/peer, it checks if the NTP message
   	authentication code (MAC) in received packets is valid, but not if
   	there actually is any MAC included. Packets without a MAC are
   	accepted as if they had a valid MAC. This allows a MITM attacker to
   	send false packets that are accepted by the client/peer without
   	having to know the symmetric key. The attacker needs to know the
   	transmit timestamp of the client to match it in the forged reply
   	and the false reply needs to reach the client before the genuine
   	reply from the server. The attacker doesn't necessarily need to be
   	relaying the packets between the client and the server.

   	Authentication using autokey doesn't have this problem as there is
   	a check that requires the key ID to be larger than NTP_MAXKEY,
   	which fails for packets without a MAC.
       Mitigation:
           Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
   	or the NTP Public Services Project Download Page
           Configure ntpd with enough time sources and monitor it properly.
       Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.

   * [Sec 2781] Authentication doesn't protect symmetric associations against
     DoS attacks.

       References: Sec 2781 / CVE-2015-1799 / VU#374268
       Affects: All NTP releases starting with at least xntp3.3wy up to but
   	not including ntp-4.2.8p2 where the installation uses symmetric
   	key authentication.
       CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
       Note: the CVSS base Score for this issue could be 4.3 or lower, and
   	it could be higher than 5.4.
       Date Resolved: Stable (4.2.8p2) 07 Apr 2015
       Summary: An attacker knowing that NTP hosts A and B are peering with
   	each other (symmetric association) can send a packet to host A
   	with source address of B which will set the NTP state variables
   	on A to the values sent by the attacker. Host A will then send
   	on its next poll to B a packet with originate timestamp that
   	doesn't match the transmit timestamp of B and the packet will
   	be dropped. If the attacker does this periodically for both
   	hosts, they won't be able to synchronize to each other. This is
   	a known denial-of-service attack, described at
   	https://www.eecis.udel.edu/~mills/onwire.html .

   	According to the document the NTP authentication is supposed to
   	protect symmetric associations against this attack, but that
   	doesn't seem to be the case. The state variables are updated even
   	when authentication fails and the peers are sending packets with
   	originate timestamps that don't match the transmit timestamps on
   	the receiving side.

   	This seems to be a very old problem, dating back to at least
   	xntp3.3wy. It's also in the NTPv3 (RFC 1305) and NTPv4 (RFC 5905)
   	specifications, so other NTP implementations with support for
   	symmetric associations and authentication may be vulnerable too.
   	An update to the NTP RFC to correct this error is in-process.
       Mitigation:
           Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
   	or the NTP Public Services Project Download Page
           Note that for users of autokey, this specific style of MITM attack
   	is simply a long-known potential problem.
           Configure ntpd with appropriate time sources and monitor ntpd.
   	Alert your staff if problems are detected.
       Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.

   * New script: update-leap
   The update-leap script will verify and if necessary, update the
   leap-second definition file.
   It requires the following commands in order to work:

   	wget logger tr sed shasum

   Some may choose to run this from cron.  It needs more portability testing.


(tron)
diff -r1.84 -r1.84.2.1 pkgsrc/net/ntp4/Makefile
diff -r1.17 -r1.17.2.1 pkgsrc/net/ntp4/PLIST
diff -r1.20 -r1.20.2.1 pkgsrc/net/ntp4/distinfo

cvs diff -r1.84 -r1.84.2.1 pkgsrc/net/ntp4/Makefile (expand / switch to unified diff)

--- pkgsrc/net/ntp4/Makefile 2015/03/21 20:49:28 1.84
+++ pkgsrc/net/ntp4/Makefile 2015/04/21 21:44:22 1.84.2.1
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.84 2015/03/21 20:49:28 bsiegert Exp $ 1# $NetBSD: Makefile,v 1.84.2.1 2015/04/21 21:44:22 tron Exp $
2# 2#
3 3
4DISTNAME= ntp-4.2.8p1 4DISTNAME= ntp-4.2.8p2
5PKGNAME= ${DISTNAME:S/-dev-/-/} 5PKGNAME= ${DISTNAME:S/-dev-/-/}
6CATEGORIES= net time 6CATEGORIES= net time
7MASTER_SITES= http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ 7MASTER_SITES= http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://www.ntp.org/ 10HOMEPAGE= http://www.ntp.org/
11COMMENT= Network Time Protocol Version 4 11COMMENT= Network Time Protocol Version 4
12 12
13CONFLICTS+= openntpd-[0-9]* 13CONFLICTS+= openntpd-[0-9]*
14 14
15GNU_CONFIGURE= YES 15GNU_CONFIGURE= YES
16USE_LIBTOOL= YES 16USE_LIBTOOL= YES
17USE_TOOLS+= pax perl:run 17USE_TOOLS+= pax perl:run

cvs diff -r1.17 -r1.17.2.1 pkgsrc/net/ntp4/PLIST (expand / switch to unified diff)

--- pkgsrc/net/ntp4/PLIST 2015/03/21 20:49:28 1.17
+++ pkgsrc/net/ntp4/PLIST 2015/04/21 21:44:22 1.17.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST,v 1.17 2015/03/21 20:49:28 bsiegert Exp $ 1@comment $NetBSD: PLIST,v 1.17.2.1 2015/04/21 21:44:22 tron Exp $
2bin/sntp 2bin/sntp
3man/man1/sntp.1 3man/man1/sntp.1
4man/man5/ntp.conf.5 4man/man5/ntp.conf.5
5man/man5/ntp.keys.5 5man/man5/ntp.keys.5
6${PLIST.tickadj}man/man8/calc_tickadj.8 6${PLIST.tickadj}man/man8/calc_tickadj.8
7man/man8/ntp-keygen.8 7man/man8/ntp-keygen.8
8man/man8/ntp-wait.8 8man/man8/ntp-wait.8
9man/man8/ntpd.8 9man/man8/ntpd.8
10man/man8/ntpdc.8 10man/man8/ntpdc.8
11man/man8/ntpq.8 11man/man8/ntpq.8
12man/man8/ntptrace.8 12man/man8/ntptrace.8
13${PLIST.tickadj}sbin/calc_tickadj 13${PLIST.tickadj}sbin/calc_tickadj
14sbin/ntp-keygen 14sbin/ntp-keygen
@@ -476,25 +476,26 @@ share/doc/ntp/scripts/hand.txt @@ -476,25 +476,26 @@ share/doc/ntp/scripts/hand.txt
476share/doc/ntp/scripts/install.txt 476share/doc/ntp/scripts/install.txt
477share/doc/ntp/scripts/manual.txt 477share/doc/ntp/scripts/manual.txt
478share/doc/ntp/scripts/misc.txt 478share/doc/ntp/scripts/misc.txt
479share/doc/ntp/scripts/miscopt.txt 479share/doc/ntp/scripts/miscopt.txt
480share/doc/ntp/scripts/monopt.txt 480share/doc/ntp/scripts/monopt.txt
481share/doc/ntp/scripts/refclock.txt 481share/doc/ntp/scripts/refclock.txt
482share/doc/ntp/scripts/special.txt 482share/doc/ntp/scripts/special.txt
483share/doc/ntp/scripts/style.css 483share/doc/ntp/scripts/style.css
484share/doc/ntp/select.html 484share/doc/ntp/select.html
485share/doc/ntp/sitemap.html 485share/doc/ntp/sitemap.html
486share/doc/ntp/sntp.html 486share/doc/ntp/sntp.html
487share/doc/ntp/stats.html 487share/doc/ntp/stats.html
488share/doc/ntp/tickadj.html 488share/doc/ntp/tickadj.html
 489share/doc/ntp/update-leap.html
489share/doc/ntp/warp.html 490share/doc/ntp/warp.html
490share/doc/ntp/xleave.html 491share/doc/ntp/xleave.html
491share/doc/sntp/sntp.html 492share/doc/sntp/sntp.html
492share/examples/ntp4/README 493share/examples/ntp4/README
493share/examples/ntp4/baldwin.conf 494share/examples/ntp4/baldwin.conf
494share/examples/ntp4/beauregard.conf 495share/examples/ntp4/beauregard.conf
495share/examples/ntp4/grundoon.conf 496share/examples/ntp4/grundoon.conf
496share/examples/ntp4/malarky.conf 497share/examples/ntp4/malarky.conf
497share/examples/ntp4/pogo.conf 498share/examples/ntp4/pogo.conf
498share/examples/ntp4/rackety.conf 499share/examples/ntp4/rackety.conf
499share/ntp/lib/NTP/Util.pm 500share/ntp/lib/NTP/Util.pm
500@pkgdir include/event2 501@pkgdir include/event2

cvs diff -r1.20 -r1.20.2.1 pkgsrc/net/ntp4/distinfo (expand / switch to unified diff)

--- pkgsrc/net/ntp4/distinfo 2015/03/21 20:49:28 1.20
+++ pkgsrc/net/ntp4/distinfo 2015/04/21 21:44:22 1.20.2.1
@@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
1$NetBSD: distinfo,v 1.20 2015/03/21 20:49:28 bsiegert Exp $ 1$NetBSD: distinfo,v 1.20.2.1 2015/04/21 21:44:22 tron Exp $
2 2
3SHA1 (ntp-4.2.8p1.tar.gz) = 1e6d8894bbd3456bd71aa890b02f802f2e611e86 3SHA1 (ntp-4.2.8p2.tar.gz) = 51d014c4a38383692d0895f5b8247004942e3b38
4RMD160 (ntp-4.2.8p1.tar.gz) = f61569230e876faf9271607aff9dcbd242ea4f69 4RMD160 (ntp-4.2.8p2.tar.gz) = 5e2bec1f296f6d1528694167da2229cae13ebf47
5Size (ntp-4.2.8p1.tar.gz) = 6791852 bytes 5Size (ntp-4.2.8p2.tar.gz) = 6820869 bytes
6SHA1 (patch-aa) = b247569339d09a88f2e143e355033ce7635ffe92 6SHA1 (patch-aa) = b247569339d09a88f2e143e355033ce7635ffe92
7SHA1 (patch-configure) = 21466ffa5d0334957a1a93b2a99087e7edaaa4d5 7SHA1 (patch-configure) = 21466ffa5d0334957a1a93b2a99087e7edaaa4d5
8SHA1 (patch-sntp_configure) = 38357046af0f0c1aeb8b57bb9c653e330d3feadd 8SHA1 (patch-sntp_configure) = 38357046af0f0c1aeb8b57bb9c653e330d3feadd
9SHA1 (patch-sntp_loc_pkgsrc) = 6e46ffc0cc2afcfdc1d01297cbe04cb80d103575 9SHA1 (patch-sntp_loc_pkgsrc) = 6e46ffc0cc2afcfdc1d01297cbe04cb80d103575