]> git.ipfire.org Git - thirdparty/samba.git/commit
CVE-2022-37966 s4:kdc: announce PA-SUPPORTED-ETYPES like windows.
authorStefan Metzmacher <metze@samba.org>
Thu, 24 Mar 2022 14:44:40 +0000 (15:44 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 14 Dec 2022 10:28:17 +0000 (10:28 +0000)
commit906dbd0a4bdc89d14c971c1bd4e6c3059eefb2c6
tree5675c5982ed551caf19f0e0a5167d3a3e6891e2d
parentc8afae7869a8aa53da90bf1748eb8ce2e8d763aa
CVE-2022-37966 s4:kdc: announce PA-SUPPORTED-ETYPES like windows.

We need to take the value from the msDS-SupportedEncryptionTypes
attribute and only take the default if there's no value or
if the value is 0.

For krbtgt and DC accounts we need to force support for
ARCFOUR-HMAC-MD5 and AES encryption types and add the related bits
in addtition. (Note for krbtgt msDS-SupportedEncryptionTypes is
completely ignored the hardcoded value is the default, so there's
no AES256-SK for krbtgt).

For UF_USE_DES_KEY_ONLY on the account we reset
the value to 0, these accounts are in fact disabled completely,
as they always result in KRB5KDC_ERR_ETYPE_NOSUPP.

Then we try to get all encryption keys marked in
supported_enctypes, and the available_enctypes
is a reduced set depending on what keys are
actually stored in the database.

We select the supported session key enctypes by the available
keys and in addition based on AES256-SK as well as the
"kdc force enable rc4 weak session keys" option.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13135
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15237

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit fde745ec3491a4fd7b23e053a67093a2ccaf0905)

[jsutton@samba.org Adapted to older KDC code]
selftest/knownfail.d/kdc-enctypes [deleted file]
selftest/knownfail_mit_kdc
source4/kdc/db-glue.c
source4/kdc/sdb.c
source4/kdc/sdb.h