Network Time Protocol Origin Timestamp Check Denial of Service Vulnerability
A flaw in ntpd's origin timestamp check allows an unauthenticated attacker to reset the expected origin timestamp for a peer by sending a spoofed packet with a zero origin timestamp. This causes legitimate replies from that peer to be dropped, creating a denial of service condition.
Originally disclosed on Cisco Talos
An exploitable denial of service vulnerability exists in the origin timestamp check functionality of ntpd 4.2.8p9. A specially crafted unauthenticated network packet can be used to reset the expected origin timestamp for target peers.
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 code clears the expected origin timestamp (peer->aorg) before rejecting a packet with a zero origin timestamp, which resets the nonce and causes subsequent legitimate replies to fail the origin timestamp check.
Impact
An attacker could cause a denial of service by preventing legitimate peer replies from being accepted, though the attack is more effective against symmetric associations and more difficult for client-server associations where the request-response window is short.
What the attacker needed
Attacker can spoof source addresses; attacker knows a peer address of the victim; victim runs ntpd 4.2.8p9
The fix
The call to L_CLR(&peer->aorg) when a zero-origin timestamp packet is received should be removed.
How it was found
- Learn the address of a peer of the victim ntpd process, for example by sending a client mode request and reading the refid field.
- Send a spoofed packet to the victim with the source address of that peer and a zero origin timestamp, which resets peer->aorg.
- The next legitimate packet from the peer fails the origin timestamp check and is dropped.
- Repeat this each poll period for all known peers to maintain the denial of service.
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.
NTP is the protocol computers use to keep their clocks accurate. To prevent fake time updates, a computer checks that a reply matches the request it sent, using a timestamp as a kind of ticket. This bug lets an attacker trick the computer into throwing away the ticket, so when the real reply arrives it is rejected, and the clock may drift.
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.