Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 795321 (CVE-2021-22212)

Summary: <net-misc/ntpsec-1.2.1: ntpkeygen insufficent key generation (CVE-2021-22212)
Product: Gentoo Security Reporter: Sam James <sam>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Status: IN_PROGRESS ---    
Severity: minor CC: blueness, nerdboy
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: ?? [glsa? cleanup]
Package list:
net-misc/ntpsec-1.2.1
Runtime testing required: ---

Description Sam James archtester gentoo-dev Security 2021-06-11 06:36:37 UTC
"Update ntpkeygen/keygone to properly filter # characters. (CVE-2021-22212)"
Comment 1 Larry the Git Cow gentoo-dev 2021-06-11 06:39:16 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e448a0c3088ea0088b62f9b16debaccbba4d3334

commit e448a0c3088ea0088b62f9b16debaccbba4d3334
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-06-11 06:38:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-06-11 06:38:52 +0000

    net-misc/ntpsec: add 1.2.1
    
    Bug: https://bugs.gentoo.org/795321
    Signed-off-by: Sam James <sam@gentoo.org>

 net-misc/ntpsec/Manifest            |   1 +
 net-misc/ntpsec/ntpsec-1.2.1.ebuild | 169 ++++++++++++++++++++++++++++++++++++
 2 files changed, 170 insertions(+)
Comment 2 Sam James archtester gentoo-dev Security 2021-06-21 19:04:02 UTC
arm64 done
Comment 3 Sam James archtester gentoo-dev Security 2021-06-21 19:04:13 UTC
amd64 done
Comment 4 Sam James archtester gentoo-dev Security 2021-06-22 19:37:57 UTC
arm done

all arches done
Comment 5 John Helmert III gentoo-dev Security 2021-06-22 23:03:06 UTC
Please cleanup
Comment 6 John Helmert III gentoo-dev Security 2021-06-23 03:08:31 UTC
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.