Vulnerability · Published Jun 8, 2021 · Assigned by GitLab
CVE-2021-22212
Medium 4.0
In plain English
A medium-severity security flaw in ntpsec from NTPsec. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 44% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | ntpsec | 1.2.1-r0 | ALPINE-CVE-2021-22212 |
| Alpine:v3.21 | ntpsec | 1.2.1-r0 | ALPINE-CVE-2021-22212 |
| Alpine:v3.22 | ntpsec | 1.2.1-r0 | ALPINE-CVE-2021-22212 |
| Alpine:v3.23 | ntpsec | 1.2.1-r0 | ALPINE-CVE-2021-22212 |
| Alpine:v3.24 | ntpsec | 1.2.1-r0 | ALPINE-CVE-2021-22212 |
| Debian:12 | ntpsec | 1.2.0+dfsg1-4 | DEBIAN-CVE-2021-22212 |
| Debian:13 | ntpsec | 1.2.0+dfsg1-4 | DEBIAN-CVE-2021-22212 |
| Debian:14 | ntpsec | 1.2.0+dfsg1-4 | DEBIAN-CVE-2021-22212 |
Affected products (as reported)
References
- https://gitlab.com/NTPsec/ntpsec/-/issues/699 x_refsource_MISC
- https://bugzilla.redhat.com/show_bug.cgi?id=1955859 x_refsource_MISC
- https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-22212.json x_refsource_CONFIRM
- FEDORA-2021-3ffc890685 vendor-advisory, x_refsource_FEDORA