|
|
Log in / Subscribe / Register

Code cleanups don't solve NTP's security issues

Code cleanups don't solve NTP's security issues

Posted Feb 16, 2017 6:03 UTC (Thu) by gdt (guest, #6284)
In reply to: Code cleanups don't solve NTP's security issues by biergaizi
Parent article: A rift in the NTP world

In contrast, NTPd has proper rate-limit mechanism built-in, such as KoD and good pooling interval, blocking NTP does NOT causes more user traffic.

We had issues in 2003 with SMC routers, and blocking that traffic lead to a multiplication of incoming traffic. The KoD option didn't arrive in servers until later, and then not in clients for years after that. So we had to specially engineer the network for ntpd until most of the purchasers of those routers retired them.

It would be very useful if issuing a ICMP Administratively Denied prevented retries. The ACL is unlikely to suddenly disappear, so it would be safe to disable the association entirely. It's much easier for a network to issue a ICMP than to deploy an anycast edge of ntpd servers to issue KoD replies.

Please note that "we've fixed it now" is desirable but not immediately useful for operating a network. We'll probably have to run special queuing for ntpd UDP control plane traffic for the next decade. So there might be only a few years where the network hasn't been running without a special fix for some ntpd issue. As you can see, the timescales in network operations are much longer than the timescales in development: you are at the leading edge of deployment, we have to deal with the trailing edge of deployments.

That's why I say that the total security picture is important, human factors and all. It's better to avoid issues than to fix them.

We not adverse to change. It would be useful if the major NTP authors formed a small cabal and had an approximate date where they all make a new release which moves the control channel to TCP (or even to TLS if you think that is wise).


to post comments

Code cleanups don't solve NTP's security issues

Posted Feb 16, 2017 7:15 UTC (Thu) by akkornel (subscriber, #75292) [Link] (1 responses)

The issue I see with relying on DNS is, if DNSSEC becomes more used, then having NTP require DNS won't work well, as DNS would require NTP to verify signatures. You could bypass DNSSEC verification just for the NTP IP lookup, but that seems dangerous to me. Similarly, using TLS would also be problematic, as you need to already have good time in order to verify TLS certificate dates.

So much of security today relies on each party in the exchange having the same, or similar, time.

If changes are being proposed, I would suggest relying on capabilities that already exist within DHCP:

1: ISPs which provide DHCP service should run at least three NTP server, and must include those NTP server IPs in all DHCP offers. Smaller ISPs may make arrangements with a higher-tier ISP, or other entity, if they're unable to run their own NTP servers. ISPs which do not provide DHCP service are exempt, although they may wish to provide NTP service for their customer ISPs.

2a: Router vendors must each obtain a vendor zone from the NTP Pool project, and configure that as their NTP servers for their router software. For example, 0.linksys.pool.ntp.org, 1.linksys.pool.ntp.org, and 2.linksys.pool.ntp.org would be the default NTP servers for a Linksys router.

2b: When the router receives one or more NTP server IP addresses in a DHCP offer, if the router accepts the DHCP offer, then the router must replace its existing NTP server entries with the NTP server IP addresses received in the DHCP offer: For each IP received in the DHCP offer, replace one of the pre-configured NTP servers.

2c: If the router provides DHCP (for example, to its local network), and the router received NTP server IP addresses from upstream, then the router must provide those NTP server IP addresses in all DHCP offers that the router makes to local machines.

Item 1 would be agreed upon and implemented by the ISPs. Those ISPs would then lean on their router suppliers, to ensure that the routers sold/rented/leased/whatever by the ISPs met all of the requirements of point 2. From there things could slowly flow to the remaining consumer router market. Some OSes are able to support getting NTP servers from DHCP; as more routers begin to provide them, OSes will begin to use them.

This would allow devices to get NTP servers from a "trusted" source (the same source giving them their IP address), and helps to localize NTP traffic to within an ISP (or an ISP's ISP). It also eliminates the reliance on things like DNS and TLS, with one exception: As DNS embraces DNSSEC more and more, point 2a will stop working. Point 2a is only a stopgap, so that router vendors will have something to put in default configs.

Code cleanups don't solve NTP's security issues

Posted Feb 16, 2017 8:06 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

There has been an idea to add a timestamp to DHCP replies. That would easily allow ~1s precision - more than enough to bootstrap DNSSEC and then acquire reliable NTP.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds