CVE-2022-32744 s4:kdc: Don't allow HDB keytab iteration
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 24 May 2022 05:52:05 +0000 (17:52 +1200)
committerJule Anger <janger@samba.org>
Wed, 27 Jul 2022 10:52:36 +0000 (10:52 +0000)
commitbbad8f1de43d643e20f1a71c3466f08ed7c9d480
tree95cd2dd4236e258aefeb65cf3148d7f57b6b1c6f
parentffb599050ae2c1b9d0746addfdac1e41866aa819
CVE-2022-32744 s4:kdc: Don't allow HDB keytab iteration

A fallback in krb5_rd_req_ctx() means that Samba's kpasswd service will
try many inappropriate keys to decrypt the ticket supplied to it. For
example, it will accept a ticket encrypted with the Administrator's key,
when it should rather accept only tickets encrypted with the krbtgt's
key (and not an RODC krbtgt). To fix this, declare the HDB keytab using
the HDBGET ops, which do not support iteration.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
selftest/knownfail_heimdal_kdc
source4/kdc/kdc-heimdal.c