NTP crypto-NAK DoS
ntpd is an implementation of Network Time Protocol which sets and maintains the system time of day synchronized with Internet standard time servers or any local references. Many major servers and devices come with inbuilt ntpd.
NTP works with different variants like client/server, symmetric, and broadcast. Symmetric mode is used for time synchronization between the servers with authentication. It operates with two modes active and passive. Active mode packets are used when connection is already set. If connection is not set, passive mode packets are used to set up short passive connection for authentication. If packet which fails to authenticate is received, it responds with crypto-NAK packet.
While processing incoming packets findpeer() function is called to see if packet is from existing peer. It returns pointer to peer structure or NULL depending upon whether peer is found or not. To check whether packet is crypto-NAK, valid_NAK() function is called. One of the parameters for the function is pointer from findpeer() function. Without checking the pointer for NULL, valid_NAK() tries to access keyid and flags field of peer structure. Which causes NULL pointer dereference.
Remote attacker can send undesired crypto-NAK packet to exploit this vulnerability which can lead to Denial of Service.
Dell SonicWALL has researched this vulnerability. The following signature has been created to protect their customers.
- IPS: 11240 NTP Daemon Crypto-NAK Authentication Bypass 1