Bug 1274265 (CVE-2015-7871)

Summary: CVE-2015-7871 ntp: crypto-NAK symmetric association authentication bypass vulnerability
Product: [Other] Security Response Reporter: Martin Prpič <mprpic>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: jrusnack, mlichvar, sardella
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ntp 4.2.8p4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-23 06:26:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1274351, 1274477, 1274478, 1274479, 1274480    
Bug Blocks: 1260670    

Description Martin Prpič 2015-10-22 11:32:58 UTC
The following flaw was found in ntpd:

An error handling logic error exists within ntpd that manifests due to improper error condition handling associated with certain crypto-NAK packets. An unauthenticated, off­-path attacker can force ntpd processes on targeted servers to peer with time sources of the attacker's choosing by transmitting symmetric active crypto­-NAK packets to ntpd. This attack bypasses the authentication typically required to establish a peer association and allows an attacker to make arbitrary changes to system time.

External References:

http://talosintel.com/reports/TALOS-2015-0069/
http://support.ntp.org/bin/view/Main/SecurityNotice#October_2015_NTP_Security_Vulner

Comment 1 Martin Prpič 2015-10-22 14:33:56 UTC
Created ntp tracking bugs for this issue:

Affects: fedora-all [bug 1274351]

Comment 5 Martin Prpič 2015-10-23 06:26:06 UTC
Statement:

This issue did not affect the versions of ntp as shipped with Red Hat Enterprise Linux 5, 6, and 7.

Comment 7 Martin Prpič 2015-10-23 09:18:07 UTC
The 4.2.6 version of NTP is not vulnerable because while the ephemeral association can be created, it's immediately removed in the following code by the unpeer() call:

       /*
         * If this is a crypto_NAK, the server cannot authenticate a
         * client packet. The server might have just changed keys. Clear
         * the association and restart the protocol.
         */
        if (is_authentic == AUTH_CRYPTO) {
                report_event(PEVNT_AUTH, peer, "crypto_NAK");
                peer->flash |= TEST5;           /* bad auth */
                peer->badauth++;
                if (peer->flags & FLAG_PREEMPT) {
                        unpeer(peer);
                        return;
                }

While the ephemeral association can be temporarily established, it does not allow for exploitation in any way.

Comment 8 Fedora Update System 2015-11-02 18:53:03 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 9 Fedora Update System 2015-11-04 22:49:39 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 10 Fedora Update System 2016-02-21 02:25:24 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.