Network Time Protocol ntpq and ntpdc Infinite Loop Vulnerability
The ntpq and ntpdc client tools process incoming packets in a loop that only exits on a correct response or specific error conditions. An attacker who can send crafted packets (e.g., with NTP version 5) can cause the loop to continue indefinitely, leading to a denial of service.
Originally disclosed on Cisco Talos
ntpq processes incoming packets in a loop in getresponse(). The loop’s only stopping conditions are receiving a complete and correct response or hitting a small number of error conditions.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the packet-processing loop lacks a fallback termination condition that does not depend on the content of incoming packets.
Impact
An attacker could cause a denial of service against ntpq or ntpdc clients, but only if they can own a malicious server, block legitimate responses, or perform a man-in-the-middle attack.
What the attacker needed
Attacker controls or spoofs NTP server; or blocks legitimate server responses; or performs MITM on ntpq traffic
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
ntpq and ntpdc are command-line tools used to query NTP servers for time information. They read replies in a loop that only stops when a valid reply arrives or a specific error occurs. If an attacker sends replies that are invalid but don't trigger those errors, the loop never ends, so the tool hangs and becomes unusable.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.