Network Time Protocol libntp Message Digest Disclosure Vulnerability
The MD5 authentication check in libntp compares message digests using a non-constant-time memory comparison function, which may leak timing information. An attacker could send crafted packets and measure response times to gradually guess the message digest key.
Originally disclosed on Cisco Talos
An exploitable vulnerability exists in the message authentication functionality of Network Time Protocol libntp. An attacker can send a series of crafted messages to attempt to recover the message digest key.
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 use of a non-constant-time memory comparison function (memcmp or bcmp) that returns early on the first mismatched byte, leaking timing information.
Impact
An attacker could potentially recover the message digest key, but the attack is difficult and may be limited by network timing noise.
What the attacker needed
Network access to NTP service; ability to measure response times
The fix
The comparison should be replaced with a constant-time memory comparison function such as OpenSSL's CRYPTO_memcmp().
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.
When a computer checks a password or key, it often compares characters one by one and stops at the first wrong one. If an attacker can measure how long the check takes, they can guess the correct characters step by step. This report says the NTP software does exactly that, so an attacker might recover the secret key by timing many guesses.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.