[ntp:questions] ntpdate.c unsafe buffer write
serge.bets at NOSPAM.laposte.invalid
Sun Feb 10 23:05:06 UTC 2008
On Sunday, February 10, 2008 at 10:55:29 +0000, David Woolley wrote:
> However, if it wasn't stepped, because it was already within 128ms, it
> will be slewing at maximum rate. Allowing 100ppm for motherboard
> tolerances, that means that it can take up to a further 320 seconds to
> reach the low milliseconds.
Only 256 seconds maximum, because the kind of slew (singleshot)
initiated by ntpd -q comes *above* the usual frequency correction
already annihiliating the motherboard error.
> I don't believe it would be safe to start ntpd in normal mode within
> that period.
Indeed: the daemon then behaves strangely, not sane at all. Last year
I published here an awk script calling ntpd -gq and then sleeping
until an eventual slew is finished. After that, normal mode ntpd can be
started safely. And of course the daemon really appreciates to startup
with a near-zero initial phase offset.
Serge point Bets arobase laposte point net
More information about the questions