NTP BUG 3072: Attack on interface selection
Last update: February 15, 2022 20:59 UTC (43fbd379b)
ntpd receives a server response on a socket that corresponds to a different interface than was used for the request, the peer structure is updated to use the interface for new requests. If
ntpd is running on a host with multiple interfaces in separate networks and the operating system doesn’t check source address in received packets (e.g.
rp_filter on Linux is set to 0), an attacker that knows the address of the source can send a packet with spoofed source address which will cause
ntpd to select wrong interface for the source and prevent it from sending new requests until the list of interfaces is refreshed, which happens on routing changes or every 5 minutes by default. If the attack is repeated often enough (once per second),
ntpd will not be able to synchronize with the source.
- Implement BCP-38.
- Upgrade to 4.2.8p9 or later.
- If you are going to configure your OS to disable source address checks, also configure your firewall configuration to control what interfaces can receive packets from what networks.
- Properly monitor your
ntpd instances, and auto-restart
-g) if it stops running.
This weakness was discovered by Miroslav Lichvar of Red Hat.