Bug 1703341 (CVE-2019-11331)

Summary: CVE-2019-11331 ntp: Using port 123 for modes where a fixed port number is not required facilitates off-path attacks.
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: akjain, linville, mlichvar, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-10 10:54:46 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: 1703342, 1705488    
Bug Blocks: 1703344    

Description Marian Rehak 2019-04-26 07:26:06 UTC
Network Time Protocol (NTP), as specified in RFC 5905, uses port 123 even for modes where a fixed port number is not required, which makes it easier for remote attackers to conduct off-path attacks.

Comment 1 Marian Rehak 2019-04-26 07:26:16 UTC
Created ntp tracking bugs for this issue:

Affects: fedora-all [bug 1703342]

Comment 7 Stefan Cornelius 2019-05-02 12:01:10 UTC
This is a weakness in the protocol.

Comment 19 Doran Moppert 2020-02-14 00:54:52 UTC
Mitigation:

On Red Hat Enterprise Linux 6 and later, switching from ntp to chrony is recommended. Among other design improvements, chrony uses a randomised source port by default.

If using ntp, the source port can be randomised by iptables masquerading rules, effectively mitigating this vulnerability:

    iptables -t nat -I POSTROUTING -p udp -m udp --sport 123 -j MASQUERADE --to-ports 60000-61000