It was found that ntpd did not correctly implement the threshold limitation for the '-g' option, which is used to set the time without any restrictions. A man-in-the-middle attacker able to intercept NTP traffic between a connecting client and an NTP server could use this flaw to force that client to make multiple steps larger than the panic threshold, effectively changing the time to an arbitrary value at any time.
It was found that ntpd did not correctly implement the -g option:
-g Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the thresh‐ old is exceeded after that, ntpd will exit with a message to the system log. This option can be used with the -q and -x options. See the tinker command for other options.
ntpd could actually step the clock multiple times by more than the panic threshold if its clock discipline doesn't have enough time to reach the sync state and stay there for at least one update. If a man-in-the-middle attacker can control the NTP traffic since ntpd was started (or maybe up to 15-30 minutes after that), they can prevent the client from reaching the sync state and force it to step its clock by any amount any number of times, which can be used by attackers to expire certificates, etc.
This is contrary to what the documentation says. Normally, the assumption is that an MITM attacker can step the clock more than the panic threshold only once when ntpd starts and to make a larger adjustment the attacker has to divide it into multiple smaller steps, each taking 15 minutes, which is slow.
Created attachment 1082271 [details]
Red Hat would like to thank Aanchal Malhotra, Isaac E. Cohen, and Sharon Goldberg of Boston University for reporting this issue.
Created ntp tracking bugs for this issue:
Affects: fedora-all [bug 1274166]
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
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.
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.
Red Hat Enterprise Linux 5 is now in Production 3 Phase of the support and maintenance life cycle. This has been rated as having Moderate security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/
This CVE-2015-5300 patch is applicable for 4.2.6.
but there is no fix available for 4.2.8.
Even 4.2.8p4's change log doesn't mention about this issue.
So what it is fix for NTP 4.2.8 version.
(In reply to ashu.cs178 from comment #17)
> This CVE-2015-5300 patch is applicable for 4.2.6.
> but there is no fix available for 4.2.8.
> Even 4.2.8p4's change log doesn't mention about this issue.
> So what it is fix for NTP 4.2.8 version.
You will need to contact ntp.org upstream and ask them, I checked http://support.ntp.org/bin/view/Main/SecurityNotice#October_2015_NTP_Security_Vulner and it doesn't mention CVE-2015-5300 unfortunately.
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.