Bug 1271070 (CVE-2015-7704)

Summary: CVE-2015-7704 ntp: disabling synchronization via crafted KoD packet
Product: [Other] Security Response Reporter: Martin Prpič <mprpic>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: bpowers, dconsoli, jaeshin, mlichvar, moshiro, osoukup, sardella, security-response-team, yhuang, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ntp 4.2.8p4 Doc Type: Bug Fix
Doc Text:
It was discovered that ntpd as a client did not correctly check timestamps in Kiss-of-Death packets. A remote attacker could use this flaw to send a crafted Kiss-of-Death packet to an ntpd client that would increase the client's polling interval value, and effectively disable synchronization with the server.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-26 14:27:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1272152, 1272153, 1272154, 1272155, 1274165, 1283095, 1283096, 1283536    
Bug Blocks: 1260670    
Attachments:
Description Flags
CVE-2015-7704 patch none

Description Martin Prpič 2015-10-13 06:28:38 UTC
When ntpd as an NTP client receives a Kiss-of-Death (KoD) packet from the server to reduce its polling rate, it doesn't check if the originate timestamp in the reply matches the transmit timestamp from its request. An off-path attacker can send a crafted KoD packet to the client, which will increase the client's polling interval to a large value and effectively disable synchronization with the server.

This issue affects ntp versions 4.2.6 and 4.2.8 up to 4.2.8p3.

The attacker can find out to what server the client is currently synchronized by sending it a regular client mode packet and checking the refid field in the reply (the refid is IPv4 address or first four bytes of MD5 sum of IPv6 address).

Upstream bug:

http://bugs.ntp.org/show_bug.cgi?id=2901

Comment 1 Martin Prpič 2015-10-13 06:30:08 UTC
Created attachment 1082270 [details]
CVE-2015-7704 patch

Comment 3 Tomas Hoger 2015-10-15 14:50:10 UTC
Statement:

This issue did not affect the versions of ntp as shipped with Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6.4, as they do not include support for KoD packets.

Comment 6 Martin Prpič 2015-10-22 07:36:57 UTC
External References:

https://www.cs.bu.edu/~goldbe/NTPattack.html

Comment 7 Martin Prpič 2015-10-22 07:38:45 UTC
Created ntp tracking bugs for this issue:

Affects: fedora-all [bug 1274165]

Comment 9 Martin Prpič 2015-10-22 09:52:30 UTC
The upstream patch for this issue (included in upstream version 4.2.8p4) is incomplete, as described in:

https://lists.ntp.org/pipermail/pool/2015-October/007631.html

Comment 10 errata-xmlrpc 2015-10-26 21:23:37 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7
  Red Hat Enterprise Linux 6

Via RHSA-2015:1930 https://rhn.redhat.com/errata/RHSA-2015-1930.html

Comment 11 Fedora Update System 2015-11-02 18:53:08 UTC
ntp-4.2.6p5-34.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2015-11-04 22:49:43 UTC
ntp-4.2.6p5-34.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 errata-xmlrpc 2015-11-26 08:46:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.5 EUS - Server and Compute Node Only
  Red Hat Enterprise Linux 6.6 EUS - Server and Compute Node Only

Via RHSA-2015:2520 https://rhn.redhat.com/errata/RHSA-2015-2520.html

Comment 16 Fedora Update System 2016-02-21 02:25:28 UTC
ntp-4.2.6p5-36.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.