]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Heimdal: CVE-2018-16860 Heimdal KDC: Reject PA-S4U2Self with unkeyed checksum
authorCy Schubert <cy@FreeBSD.org>
Wed, 14 Feb 2024 20:04:30 +0000 (12:04 -0800)
committerCy Schubert <cy@FreeBSD.org>
Wed, 21 Feb 2024 14:01:48 +0000 (06:01 -0800)
commit776fe3ce57994f404a12a7b74e27fb50d6d530af
tree83f987af44fd0805f473b01192dc4eb3be5f28fd
parentaac9dda7f8446c2c3badecb9fa3473ab008ee59b
Heimdal: CVE-2018-16860 Heimdal KDC: Reject PA-S4U2Self with unkeyed checksum

Upstream's explanation of the problem:

    S4U2Self is an extension to Kerberos used in Active Directory to allow
    a service to request a kerberos ticket to itself from the Kerberos Key
    Distribution Center (KDC) for a non-Kerberos authenticated user
    (principal in Kerboros parlance). This is useful to allow internal
    code paths to be standardized around Kerberos.

    S4U2Proxy (constrained-delegation) is an extension of this mechanism
    allowing this impersonation to a second service over the network. It
    allows a privileged server that obtained a S4U2Self ticket to itself
    to then assert the identity of that principal to a second service and
    present itself as that principal to get services from the second
    service.

    There is a flaw in Samba's AD DC in the Heimdal KDC. When the Heimdal
    KDC checks the checksum that is placed on the S4U2Self packet by the
    server to protect the requested principal against modification, it
    does not confirm that the checksum algorithm that protects the user
    name (principal) in the request is keyed.  This allows a
    man-in-the-middle attacker who can intercept the request to the KDC to
    modify the packet by replacing the user name (principal) in the
    request with any desired user name (principal) that exists in the KDC
    and replace the checksum protecting that name with a CRC32 checksum
    (which requires no prior knowledge to compute).

    This would allow a S4U2Self ticket requested on behalf of user name
    (principal) user@EXAMPLE.COM to any service to be changed to a
    S4U2Self ticket with a user name (principal) of
    Administrator@EXAMPLE.COM. This ticket would then contain the PAC of
    the modified user name (principal).

Reported by: emaste
Security: CVE-2018-16860
Obtained from: Upstream c6257cc2c
MFS requested by: re (cperciva)
Approved by: re (cperciva)

(cherry picked from commit 24339377490f9e362d040712b534d2963decd2d7)
(cherry picked from commit 143a962d0e871c60b91589aa1045afdeca13742b)
crypto/heimdal/kdc/krb5tgs.c