]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
heimdal: Fix multiple security vulnerabilities
authorCy Schubert <cy@FreeBSD.org>
Tue, 8 Nov 2022 08:53:29 +0000 (00:53 -0800)
committerEd Maste <emaste@FreeBSD.org>
Wed, 16 Nov 2022 01:36:02 +0000 (20:36 -0500)
commitdf7ca95146d4e3a0d7a75330f9fd4eff099849a3
tree111096af8e804afe3e32beb3451819e8230c41c5
parent458f3d1c51a439453fb25c8b2ee21970b948a02a
heimdal: Fix multiple security vulnerabilities

The following issues are patched:

 - CVE-2022-42898 PAC parse integer overflows
 - CVE-2022-3437 Overflows and non-constant time leaks in DES{,3} and arcfour
 - CVE-2021-44758 NULL dereference DoS in SPNEGO acceptors
 - CVE-2022-44640 Heimdal KDC: invalid free in ASN.1 codec

    Note that CVE-2022-44640 is a severe vulnerability, possibly a 10.0
    on the Common Vulnerability Scoring System (CVSS) v3, as we believe
    it should be possible to get an RCE on a KDC, which means that
    credentials can be compromised that can be used to impersonate
    anyone in a realm or forest of realms.

    Heimdal's ASN.1 compiler generates code that allows specially
    crafted DER encodings of CHOICEs to invoke the wrong free function
    on the decoded structure upon decode error.  This is known to impact
    the Heimdal KDC, leading to an invalid free() of an address partly
    or wholly under the control of the attacker, in turn leading to a
    potential remote code execution (RCE) vulnerability.

    This error affects the DER codec for all extensible CHOICE types
    used in Heimdal, though not all cases will be exploitable.  We have
    not completed a thorough analysis of all the Heimdal components
    affected, thus the Kerberos client, the X.509 library, and other
    parts, may be affected as well.

    This bug has been in Heimdal's ASN.1 compiler since 2005, but it may
    only affect Heimdal 1.6 and up.  It was first reported by Douglas
    Bagnall, though it had been found independently by the Heimdal
    maintainers via fuzzing a few weeks earlier.

    While no zero-day exploit is known, such an exploit will likely be
    available soon after public disclosure.

 - CVE-2019-14870: Validate client attributes in protocol-transition
 - CVE-2019-14870: Apply forwardable policy in protocol-transition
 - CVE-2019-14870: Always lookup impersonate client in DB

Sponsored by: so (philip)
Obtained from: so (philip)
Tested by: philip, cy

(cherry picked from commit ed549cb0c53f8438c52593ce811f6fcc812248e9)
(cherry picked from commit f8a825bde75cb5164a896c9234979e9c18e97361)

Approved by: so
Security: FreeBSD-SA-22:14.heimdal
53 files changed:
crypto/heimdal/admin/change.c
crypto/heimdal/appl/gssmask/gssmask.c
crypto/heimdal/kadmin/kadmind.c
crypto/heimdal/kadmin/mod.c
crypto/heimdal/kadmin/stash.c
crypto/heimdal/kcm/protocol.c
crypto/heimdal/kdc/digest.c
crypto/heimdal/kdc/hpropd.c
crypto/heimdal/kdc/kdc-replay.c
crypto/heimdal/kdc/krb5tgs.c
crypto/heimdal/kdc/kstash.c
crypto/heimdal/kdc/pkinit.c
crypto/heimdal/kuser/kdestroy.c
crypto/heimdal/kuser/kswitch.c
crypto/heimdal/lib/asn1/der_copy.c
crypto/heimdal/lib/asn1/gen_decode.c
crypto/heimdal/lib/asn1/gen_free.c
crypto/heimdal/lib/gssapi/krb5/accept_sec_context.c
crypto/heimdal/lib/gssapi/krb5/arcfour.c
crypto/heimdal/lib/gssapi/krb5/decapsulate.c
crypto/heimdal/lib/gssapi/krb5/unwrap.c
crypto/heimdal/lib/gssapi/mech/gss_display_status.c
crypto/heimdal/lib/gssapi/mech/gss_import_name.c
crypto/heimdal/lib/gssapi/mech/gss_mech_switch.c
crypto/heimdal/lib/gssapi/mech/mech_locl.h
crypto/heimdal/lib/gssapi/ntlm/init_sec_context.c
crypto/heimdal/lib/gssapi/spnego/accept_sec_context.c
crypto/heimdal/lib/hdb/hdb-mitdb.c
crypto/heimdal/lib/hx509/hxtool.c
crypto/heimdal/lib/hx509/ks_file.c
crypto/heimdal/lib/hx509/name.c
crypto/heimdal/lib/hx509/softp11.c
crypto/heimdal/lib/ipc/client.c
crypto/heimdal/lib/kadm5/get_s.c
crypto/heimdal/lib/kadm5/init_c.c
crypto/heimdal/lib/kadm5/ipropd_master.c
crypto/heimdal/lib/kafs/afskrb5.c
crypto/heimdal/lib/krb5/acl.c
crypto/heimdal/lib/krb5/addr_families.c
crypto/heimdal/lib/krb5/context.c
crypto/heimdal/lib/krb5/deprecated.c
crypto/heimdal/lib/krb5/init_creds_pw.c
crypto/heimdal/lib/krb5/keytab.c
crypto/heimdal/lib/krb5/krb5.h
crypto/heimdal/lib/krb5/krb5_ccapi.h
crypto/heimdal/lib/krb5/krbhst.c
crypto/heimdal/lib/krb5/pac.c
crypto/heimdal/lib/krb5/rd_req.c
crypto/heimdal/lib/krb5/test_store.c
crypto/heimdal/lib/krb5/transited.c
crypto/heimdal/lib/roken/getaddrinfo.c
crypto/heimdal/lib/wind/idn-lookup.c
crypto/heimdal/lib/wind/normalize.c