Saturday, December 20. 2014Don't update NTP – stop using itComments
Display comments as
(Linear | Threaded)
I disagree.
The possibly circular nature of syncing you mentioned is only part of the problem. If this becomes widespread (and somehow avoids circularity), server admins _will_ send bad time stamps to people, just for the lulz. What's worse: tlsdate has no sense of strata, which makes it impossible to know what quality a given time source has. On top of that, NTP-the-protocol has measures to mathematically address lag in the connection to the server. Sorry, tlsdate may be a quick and dirty tool, but it is _not_ a replacement for NTP. If anything, NTP needs a TCP-and-TLS layer. Yes, this introduces the same CA problem as for all other TLS protocols, but tlsdate has the same problem.
Also, NTP clients are able to use several sources (and they usually do) and determine the best one which makes difficult to just provide a flawed NTP server.
They also keep the clock correctly synchronized by measuring the drift (so it is kept correctly synchronized even without network access for an extended period of time). At least, they are able to skew the clock instead of just jumping randomly to the correct time. This is important to many programs that are not able to deal correctly with the time going backward or with the time going forward too fast (for example, it could miss a timer).
So I tried it here at a amd64-hardened Gentoo and got (1st message ois harmless, but then ....) :
Dec 20 16:27:50 t44 kernel: grsec: time set by /usr/bin/tlsdate-helper[tlsdate-helper:4227] uid/euid:0/0 gid/egid:0/0, parent /lib64/rc/sh/runscript.sh[runscript.sh:4214] uid/euid:0/0 gid/egid:0/0 Dec 20 18:10:43 t44 tlsdated[4290]: [dbus] failed to get name: Connection ":1.40" is not allowed to own the service "org.torproject.tlsdate" due to security policies in the configuration file Dec 20 18:10:43 t44 tlsdated[4290]: Failed to initialize DBus Dec 20 18:10:43 t44 tlsdated[4290]: tlsdated clean up finished; exiting!
Haven't seen an error like this before, but can you please submit this to the Gentoo bug tracker? I think this is not the right place to discuss potential issues in the Gentoo package (but it fails for me, too - another bug, already in the tracker).
Your suggestion is based on the idea that previou solution is insecure, yet the proposed solution is an abuse of other protocols that relays trust without a control mechanism to prove or disprove the values served.
This suggestion would act as a reason not to build something that actually work and would serve only to make people lazy. Yes, do let NTP die. No, don't replace it with a hack.
how to replace ntpd with tlsdated on ubuntu? only install tlsdate? also uninstall ntpdate? will then system update automaticcally?
apt-get remove ntp; apt-get install tlsdate
tlsdated will automatically be started on system boot.
It seens the author doesn't know how to configure NTP and misses some very basic concepts about its working.
It would help a lot of you could provide any evidence for your claims. What concept am I missing?
Well, as others already said, the lack of strata, the fact that usually one relies on significantly more than 1 ntp timesource and compensation for roundtrip make tlsdate AT BEST a simple, approximative replacement for client-type endnodes. On top of that, promoting a program that in its default config indiscriminately abuses (ab-use, as in hitting a system repeatedly for other purposes than its intended use) can only end with trouble. NTP has over the years also seen its share of abuse, there's even a wikipedia page dedicated to the most notable cases. http://en.wikipedia.org/wiki/NTP_server_misuse_and_abuse I understand your concerns, but this article and its indiscriminate promotion of tlsdate doesn't really help.
Ntpdate needs fixing and a TLS layer, no doubt.
But you suggest to just throw it and replace it with a quick and dirty hack, which must be a joke. Let's build upon what's existing and reasonably solid instead of always bashing the past, throwing it all and restarting from scratch. It is a loss of time and energy. On top of that, tlsdate functionalities are obviously not even remotely on par with those of NTP. Starting with the architecture (no stratum). It is simply a quick and dirty hack that may work for a single server, but in no way will have a chance to show up in a datacenter (unless the administrator is a fool).
Of course, the PTB uses NTP to sync the servers that connect directly to those atomic clocks. And so does NASA. And the US Navy. And the US Air Force -- who incidentally controls the constellation of GPS satellites that also need good time service. You didn't think that they would be stupid enough to connect an atomic clock to the unfiltered Internet, did you?
So, you wouldn't be eliminating NTP, you would just add an additional dependency on top of it, and the above discussion isn't even the tip of the iceberg on the problems in it. Maybe we need to let tlsdate age for another 30 years before we can allow it to be considered sufficiently well-tested? ;) Seriously, I believe that the biggest problem with NTP is much more of an implementation/operational issue. People set up insecure configurations all the time, and they set up configurations that are easily abused. And this isn't restricted to individual people, groups like Red Hat, Debian, D-Link, Netgear, etc... have done the same. Let's fix the configuration problem before we declare the protocol itself to be heinous and in desperate need of replacement. Don't get me wrong, there are plenty of areas that can be improved in NTP-the-protocol. But there is a reason why it has lasted for decades. And the weaknesses in the Reference Implementation from ntp.org are not necessarily weaknesses in the protocol. And the configuration weaknesses are not necessarily weaknesses in the Reference Implementation from ntp.org. There are efforts underway to better integrate with IEEE 1588 PTP, Poul Henning-Kamp has been working on an independent re-implementation from the ground up, and many others. If you want to make your time service secure, I would suggest that maybe you want to get involved in some of these efforts. Otherwise, well, how much did you pay for your time service? Oh, and maybe you might want to look at making it so that people who run browser configurations where Javascript is turned off by default can still get good use out of this site?
"The TLS timestamp is in seconds, adding some network latency you'll get a worst case inaccuracy of around 1 second, certainly less than two seconds."
I could see a hybrid approach. Use TLS to set time to within one second and NTP to get it the rest of the way. If NTP comes in outside of the time that TLS reports it is rejected.
This hybrid approach is what OpenNTPD now does:
https://marc.info/?l=openbsd-tech&m=142356166731390&w=2 Problem is: it depends on LibreSSS's libtls API, so it's not available on many systems. |
About meYou can find my web page with links to my work as a journalist at https://hboeck.de/.
You may also find my newsletter about climate change and decarbonization technologies interesting. Hanno Böck mail: hanno@hboeck.de Hanno on Mastodon Impressum Show tagged entries |
Tracked: Dec 22, 18:10
On Tuesday details about the security vulnerability GHOST in Glibc were published by the company Qualys. When severe security vulnerabilities hit the news I always like to take this as a chance to learn what can be improved and how to avoid similar incide
Tracked: Jan 30, 00:52
All our computers and smartphones have an internal clock and need to know the current time. As configuring the time manually is annoying it's common to set the time via Internet services. What tends to get forgotten is that a reasonably accurate clock is
Tracked: Sep 07, 17:08