CVE-2021-22212

ntpkeygen can generate keys that ntpd fails to parse. NTPsec 1.2.0 allows ntpkeygen to generate keys with ‘#’ characters. ntpd then either pads, shortens the key, or fails to load these keys entirely, depending on the key type and the placement of the ‘#’. This results in the administrator not being able to use the keys as expected or the keys are shorter than expected and easier to brute-force, possibly resulting in MITM attacks between ntp clients and ntp servers. For short AES128 keys, ntpd generates a warning that it is padding them.

Summary:

ntpkeygen can generate keys that ntpd fails to parse. NTPsec 1.2.0 allows ntpkeygen to generate keys with ‘#’ characters. ntpd then either pads, shortens the key, or fails to load these keys entirely, depending on the key type and the placement of the ‘#’. This results in the administrator not being able to use the keys as expected or the keys are shorter than expected and easier to brute-force, possibly resulting in MITM attacks between ntp clients and ntp servers. For short AES128 keys, ntpd generates a warning that it is padding them.

Reference Links(if available):

  • https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-22212.json
  • https://gitlab.com/NTPsec/ntpsec/-/issues/699
  • https://bugzilla.redhat.com/show_bug.cgi?id=1955859
  • CVSS Score (if available)

    v2: / MEDIUMAV:N/AC:M/Au:N/C:P/I:P/A:N

    v3: / HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

    Links to Exploits(if available)