]> 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)
committerCy Schubert <cy@FreeBSD.org>
Tue, 15 Nov 2022 21:12:37 +0000 (13:12 -0800)
commited549cb0c53f8438c52593ce811f6fcc812248e9
tree33275fbab69f00fe7e090ec5f5ee145810d11687
parent1ffab636dac8e52d4b3d5a2cb40c93a229404ffd
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
MFC after: immediately
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