NTP BUG 2917: Infinite loop if extended logging enabled and the logfile and keyfile are the same
Last update: April 22, 2024 18:49 UTC (7e7bd5857)
Summary
Description
If ntpd is configured to allow remote configuration, and if the (possibly spoofed) source IP address is allowed to send remote configuration requests, and if the attacker knows the remote configuration password or if ntpd was configured to disable authentication, then an attacker can send a set of packets to ntpd that will cause it to crash and/or create a potentially huge log file. Specifically, the attacker could enable extended logging, point the key file at the log file, and cause what amounts to an infinite loop.
Mitigation
- Implement BCP-38.
- Upgrade to 4.2.8p4 or later.
- If you are unable to upgrade, remote configuration of NTF’s
ntpd requires:
- an explicitly configured “trusted” key. Only configure this if you need it.
- access from permitted IP addresses. You choose the IPs.
- authentication. Don’t disable it. Practice key security safety.
- If you use
ntpq in scripts, make sure ntpq does what you expect in your scripts.
Credit
This weakness was discovered by Yves Younan of Cisco Talos.
Timeline