Skip to content
Business logic Advisory Advanced CVE-2015-8138

Network Time Protocol Origin Timestamp Check Impersonation Vulnerability

A logic error in NTP's origin timestamp check allows an attacker to spoof a server and send time updates with a zero origin timestamp, which the client accepts even when it has no outstanding request. This lets the attacker force the client's clock to change and maintain the spoofed time.

Matthew Van Gundy Follow

Originally disclosed on Cisco Talos

To distinguish legitimate peer responses from forgeries, a client attempts to verify a response packet by ensuring that the origin timestamp in an incoming packet matches the transmit timestamp it transmitted in its last request. A logic error exists that allows packets with an origin timestamp of zero to bypass this…

Matthew Van Gundy and Jonathan Gardner, on Cisco Talos

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 client zeroes the stored origin timestamp after a successful match and then accepts any packet with a zero origin timestamp, even without an outstanding request.

Impact

An attacker could force a client to change its time and maintain the spoofed time, and could also make a client ignore real time updates in some instances.

What the attacker needed

Client configured in basic mode; no authentication required; attacker can spoof server packets

The fix

The client should not process any packet from a peer if it did not have an active request out.

How it was found

  1. Spoof the peer server and send a time update with a zero origin timestamp.
  2. Set the receive timestamp to the desired offset and the transmit timestamp to current time plus that offset.
  3. Set the precision to -128 to minimise dispersion.
  4. Send regular updates every 5 seconds to maintain the spoofed time.

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 set their clocks. Normally, a client checks that a reply matches the request it sent, but a bug lets an attacker send a fake reply with a special zero value that passes the check even when no request was made. The attacker can then change the victim's clock to a wrong time.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.