Skip to content

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,...

HighCVSS 7.4 EPSS 0.52%
Published
Updated
Exploit status
No public exploit known
Technology
UbuntuDebian

Description

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.

Upgrade path

18 packages: 14 fixed, 2 with no fix yet.

PackageAffectedFixed inStatus
ubuntu/ntpsec(Ubuntu 20.04) = 1.1.3+dfsg1-2; = 1.1.7+dfsg1-1; = 1.1.7+dfsg1-2; = 1.1.8+dfsg1-1 +4 more No fix listed No fix yet
ubuntu/ntpsec(Ubuntu Pro 18.04) = 1.0.0+dfsg1-1; = 1.0.0+dfsg1-3; = 1.1.0+dfsg1-1; = 1.1.0+dfsg1-1ubuntu0.1 +2 more No fix listed No fix yet
alpine/ntpsec(Alpine v3.14) < 1.2.1-r0 1.2.1-r0 Fixed
alpine/ntpsec(Alpine v3.15) < 1.2.1-r0 1.2.1-r0 Fixed
alpine/ntpsec(Alpine v3.16) < 1.2.1-r0 1.2.1-r0 Fixed
alpine/ntpsec(Alpine v3.17) < 1.2.1-r0 1.2.1-r0 Fixed
alpine/ntpsec(Alpine v3.18) < 1.2.1-r0 1.2.1-r0 Fixed
alpine/ntpsec(Alpine v3.19) < 1.2.1-r0 1.2.1-r0 Fixed
alpine/ntpsec(Alpine v3.20) < 1.2.1-r0 1.2.1-r0 Fixed
alpine/ntpsec(Alpine v3.21) < 1.2.1-r0 1.2.1-r0 Fixed
alpine/ntpsec(Alpine v3.22) < 1.2.1-r0 1.2.1-r0 Fixed
alpine/ntpsec(Alpine v3.23) < 1.2.1-r0 1.2.1-r0 Fixed
alpine/ntpsec(Alpine v3.24) < 1.2.1-r0 1.2.1-r0 Fixed
debian/ntpsec(Debian 12) < 1.2.0+dfsg1-4 1.2.0+dfsg1-4 Fixed
debian/ntpsec(Debian 13) < 1.2.0+dfsg1-4 1.2.0+dfsg1-4 Fixed
debian/ntpsec(Debian 14) < 1.2.0+dfsg1-4 1.2.0+dfsg1-4 Fixed
fedoraproject fedora = 34 No fix listed Versions listed
ntpsec = 1.2.0; = =1.2.0 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
debian/ntpsec(Debian:12) < 1.2.0+dfsg1-4 1.2.0+dfsg1-4
debian/ntpsec(Debian:13) < 1.2.0+dfsg1-4 1.2.0+dfsg1-4
debian/ntpsec(Debian:14) < 1.2.0+dfsg1-4 1.2.0+dfsg1-4
ntpsec = 1.2.0 No fix listed
fedoraproject fedora = 34 No fix listed
alpine/ntpsec(Alpine:v3.14) < 1.2.1-r0 1.2.1-r0
alpine/ntpsec(Alpine:v3.15) < 1.2.1-r0 1.2.1-r0
alpine/ntpsec(Alpine:v3.16) < 1.2.1-r0 1.2.1-r0
alpine/ntpsec(Alpine:v3.17) < 1.2.1-r0 1.2.1-r0
alpine/ntpsec(Alpine:v3.18) < 1.2.1-r0 1.2.1-r0
alpine/ntpsec(Alpine:v3.19) < 1.2.1-r0 1.2.1-r0
alpine/ntpsec(Alpine:v3.20) < 1.2.1-r0 1.2.1-r0
alpine/ntpsec(Alpine:v3.21) < 1.2.1-r0 1.2.1-r0
alpine/ntpsec(Alpine:v3.22) < 1.2.1-r0 1.2.1-r0
alpine/ntpsec(Alpine:v3.23) < 1.2.1-r0 1.2.1-r0
alpine/ntpsec(Alpine:v3.24) < 1.2.1-r0 1.2.1-r0
ntpsec = =1.2.0 No fix listed
ubuntu/ntpsec(Ubuntu:Pro:18.04) All versions No fix listed
ubuntu/ntpsec(Ubuntu:Pro:18.04) = 1.0.0+dfsg1-1 No fix listed
ubuntu/ntpsec(Ubuntu:Pro:18.04) = 1.0.0+dfsg1-3 No fix listed
ubuntu/ntpsec(Ubuntu:Pro:18.04) = 1.1.0+dfsg1-1 No fix listed
ubuntu/ntpsec(Ubuntu:Pro:18.04) = 1.1.0+dfsg1-1ubuntu0.1 No fix listed
ubuntu/ntpsec(Ubuntu:Pro:18.04) = 1.1.0+dfsg1-1ubuntu0.2 No fix listed
ubuntu/ntpsec(Ubuntu:20.04) All versions No fix listed
ubuntu/ntpsec(Ubuntu:20.04) = 1.1.3+dfsg1-2 No fix listed
Show 6 more
ProductAffected versionsFixed in
ubuntu/ntpsec(Ubuntu:20.04) = 1.1.7+dfsg1-1 No fix listed
ubuntu/ntpsec(Ubuntu:20.04) = 1.1.7+dfsg1-2 No fix listed
ubuntu/ntpsec(Ubuntu:20.04) = 1.1.8+dfsg1-1 No fix listed
ubuntu/ntpsec(Ubuntu:20.04) = 1.1.8+dfsg1-3 No fix listed
ubuntu/ntpsec(Ubuntu:20.04) = 1.1.8+dfsg1-4 No fix listed
ubuntu/ntpsec(Ubuntu:20.04) = 1.1.8+dfsg1-4build1 No fix listed

References