Package: heimdal / 7.1.0+dfsg-13+deb9u3

Metadata

Package Version Patches format
heimdal 7.1.0+dfsg-13+deb9u3 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
nfs_des | (download)

kdc/kerberos5.c | 3 2 + 1 - 0 !
1 file changed, 2 insertions(+), 1 deletion(-)

---
021_debian | (download)

doc/setup.texi | 2 1 + 1 - 0 !
kdc/kdc.8 | 2 1 + 1 - 0 !
2 files changed, 2 insertions(+), 2 deletions(-)

---
022_openafs | (download)

lib/krb5/keytab_keyfile.c | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

---
025_krb5 config paths | (download)

tools/krb5-config.in | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

---
025_pthreads | (download)

cf/pthreads.m4 | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

---
030_pkg config paths | (download)

tools/heimdal-gssapi.pc.in | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

---
installsh | (download)

po/Makefile.am | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

---
041_hurd_maxhostnamelen | (download)

appl/gssmask/gssmask.c | 4 2 + 2 - 0 !
appl/kf/kfd.c | 2 1 + 1 - 0 !
appl/test/tcp_server.c | 2 1 + 1 - 0 !
lib/gssapi/spnego/accept_sec_context.c | 2 1 + 1 - 0 !
lib/krb5/get_addrs.c | 2 1 + 1 - 0 !
lib/krb5/get_host_realm.c | 4 2 + 2 - 0 !
lib/krb5/krbhst-test.c | 2 1 + 1 - 0 !
lib/krb5/krbhst.c | 2 1 + 1 - 0 !
lib/krb5/principal.c | 8 4 + 4 - 0 !
lib/krb5/test_plugin.c | 2 1 + 1 - 0 !
lib/krb5/verify_init.c | 2 1 + 1 - 0 !
lib/roken/getaddrinfo_hostspec.c | 2 1 + 1 - 0 !
12 files changed, 17 insertions(+), 17 deletions(-)

---
042_hurd_path_max | (download)

lib/sl/slc-gram.y | 28 19 + 9 - 0 !
1 file changed, 19 insertions(+), 9 deletions(-)

---
046_hurd_sundevdata | (download)

lib/kafs/afssys.c | 6 6 + 0 - 0 !
1 file changed, 6 insertions(+)

---
047_link_gssapi | (download)

kadmin/Makefile.am | 1 1 + 0 - 0 !
kdc/Makefile.am | 4 4 + 0 - 0 !
kpasswd/Makefile.am | 1 1 + 0 - 0 !
lib/hdb/Makefile.am | 1 1 + 0 - 0 !
lib/kadm5/Makefile.am | 2 2 + 0 - 0 !
5 files changed, 9 insertions(+)

 link against just build gssapi, instead of the system one
 this resolves FTBFS when gssapi adds new symbols.
060_no_build_string | (download)

configure.ac | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 remove hostname and build time from version as they make the build unreproducible
parallel build | (download)

lib/kadm5/Makefile.am | 3 1 + 2 - 0 !
1 file changed, 1 insertion(+), 2 deletions(-)

---
check_iprop_races | (download)

lib/kadm5/ipropd_slave.c | 12 9 + 3 - 0 !
tests/kdc/check-iprop.in | 124 95 + 29 - 0 !
2 files changed, 104 insertions(+), 32 deletions(-)

---
disable_iprop | (download)

tests/kdc/Makefile.am | 1 0 + 1 - 0 !
1 file changed, 1 deletion(-)

---
canonical_host | (download)

tools/krb5-config.in | 17 1 + 16 - 0 !
1 file changed, 1 insertion(+), 16 deletions(-)

 disable use of @canonical_host@, which is not reproducible.
Status: not forwarded upstream (not applicable)
Bug: https://github.com/heimdal/heimdal/issues/237

CVE 2017 6594 | (download)

kdc/krb5tgs.c | 12 10 + 2 - 0 !
tests/kdc/check-kdc.in | 17 17 + 0 - 0 !
tests/kdc/krb5.conf.in | 4 4 + 0 - 0 !
3 files changed, 31 insertions(+), 2 deletions(-)

---
0018 Add back in base64_encode and base64_decode.patch | (download)

lib/roken/base64.c | 12 12 + 0 - 0 !
lib/roken/base64.h | 6 6 + 0 - 0 !
lib/roken/version-script.map | 2 2 + 0 - 0 !
3 files changed, 20 insertions(+)

 add back in base64_encode and base64_decode

These functions were removed upstream. See
https://github.com/heimdal/heimdal/issues/107

Unfortunately the SONAME was not incremented for libroken.  This could
cause breakage. This change reintroduces the old names until the SONAME
can be incremented.

CVE 2017 11103 Orpheus Lyre KDC REP service name val.patch | (download)

lib/krb5/ticket.c | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 [patch] cve-2017-11103: orpheus' lyre kdc-rep service name validation

In _krb5_extract_ticket() the KDC-REP service name must be obtained from
encrypted version stored in 'enc_part' instead of the unencrypted version
stored in 'ticket'.  Use of the unecrypted version provides an
opportunity for successful server impersonation and other attacks.

Identified by Jeffrey Altman, Viktor Duchovni and Nico Williams.

CVE 2017 17439 KDC remote DoS.patch | (download)

kdc/kerberos5.c | 8 5 + 3 - 0 !
1 file changed, 5 insertions(+), 3 deletions(-)

 security: avoid null structure pointer member dereference
0021 CVE 2018 16860 Heimdal KDC Reject PA S4U2Self with u.patch | (download)

kdc/krb5tgs.c | 7 7 + 0 - 0 !
1 file changed, 7 insertions(+)

 cve-2018-16860 heimdal kdc: reject pa-s4u2self with unkeyed checksum

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).

==================
CVSSv3 calculation
==================

CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H (7.5)

=========================
Workaround and Mitigation
=========================

If server does not take privileged actions based on Kerberos tickets
obtained by S4U2Self nor obtains Kerberos tickets via further
S4U2Proxy requests then this issue cannot be exploited.

Note that the path to an exploit is not generic, the KDC is not harmed
by the malicious checksum, it is the client service requesting the
ticket being mislead, because it trusted the KDC to return the correct
ticket and PAC.

It is out of scope for Samba to describe all of the possible tool
chains that might be vulnerable. Here are two examples of possible
exploits in order to explain the issue more clearly.

1). SFU2Self might be used by a web service authenticating an end user
via OAuth, Shibboleth, or other protocols to obtain a S4U2Self
Kerberos service ticket for use by any Kerberos service principal the
web service has a keytab for.  One example is acquiring an AFS token
by requesting an afs/cell@REALM service ticket for a client via
SFU2Self.  With this exploit an organization that deploys a KDC built
from Heimdal (be it Heimdal directly or vendor versions such as found
in Samba) is vulnerable to privilege escalation attacks.

2). If a server authenticates users using X509 certificates, and then
uses S4U2Self to obtain a Kerberos service ticket on behalf of the
user (principal) in order to authorize access to local resources, a
man-in-the-middle attacker could allow a non-privileged user to access
privileged resources being protected by the server, or privileged
resources being protected by a second server, if the first server uses
the S4U2Proxy extension in order to get a new Kerberos service ticket
to obtain access to the second server.

In both these scenarios under conditions allowing man-in-the-middle
active network protocol manipulation, a malicious user could
authenticate using the non-Kerborized credentials of an unprivileged
user, and then elevate its privileges by intercepting the packet from
the server to the KDC and changing the requested user name (principal).

The only Samba clients that use S4U2Self are:

- the "net ads kerberos pac dump" (debugging) tool.

- the CIFS proxy in the deprecated/developer-only NTVFS file
server. Note this code is not compiled or enabled by default.

In particular, winbindd does *not* use S4U2Self.

Finally, MIT Kerberos and so therefore the experimental MIT KDC backend
for Samba AD is understood not to be impacted.

===============
Further Reading
===============

There is more detail on and a description of the protocols in

[MS-SFU]: Kerberos Protocol Extensions: Service for User and Constrained
Delegation Protocol
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-sfu/

=======
Credits
=======

Originally reported by Isaac Boukris and Andrew Bartlett of the Samba
Team and Catalyst.

Patches provided by Isaac Boukris.

Advisory written by Andrew Bartlett of the Samba Team and Catalyst,
with contributions from Isaac Boukris, Jeffrey Altman and Jeremy
Allison.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13685
0022 CVE 2019 12098 krb5 always confirm PA PKINIT KX for .patch | (download)

lib/krb5/init_creds_pw.c | 20 20 + 0 - 0 !
lib/krb5/krb5_locl.h | 1 1 + 0 - 0 !
lib/krb5/pkinit.c | 92 92 + 0 - 0 !
3 files changed, 113 insertions(+)

 cve-2019-12098: krb5: always confirm pa-pkinit-kx for anon pkinit

RFC8062 Section 7 requires verification of the PA-PKINIT-KX key excahnge
when anonymous PKINIT is used.  Failure to do so can permit an active
attacker to become a man-in-the-middle.

Introduced by a1ef548600c5bb51cf52a9a9ea12676506ede19f.  First tagged
release Heimdal 1.4.0.

CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N (4.8)

0023 Regenerate certs so that they expire before the 2038.patch | (download)

lib/hx509/data/ca.crt | 43 30 + 13 - 0 !
lib/hx509/data/ca.key | 64 50 + 14 - 0 !
lib/hx509/data/crl1.crl | 20 14 + 6 - 0 !
lib/hx509/data/crl1.der | 7 4 + 3 - 0 !
lib/hx509/data/https.crt | 129 96 + 33 - 0 !
lib/hx509/data/https.key | 64 50 + 14 - 0 !
lib/hx509/data/kdc.crt | 135 99 + 36 - 0 !
lib/hx509/data/kdc.key | 64 50 + 14 - 0 !
lib/hx509/data/no-proxy-test.crt | 39 28 + 11 - 0 !
lib/hx509/data/no-proxy-test.key | 64 50 + 14 - 0 !
lib/hx509/data/ocsp-req1.der | 2 1 + 1 - 0 !
lib/hx509/data/ocsp-req2.der | 2 1 + 1 - 0 !
lib/hx509/data/ocsp-resp1-ca.der | 12 8 + 4 - 0 !
lib/hx509/data/ocsp-resp1-keyhash.der | 16 11 + 5 - 0 !
lib/hx509/data/ocsp-resp1-ocsp-no-cert.der | 7 4 + 3 - 0 !
lib/hx509/data/ocsp-resp1-ocsp.der | 12 7 + 5 - 0 !
lib/hx509/data/ocsp-resp2.der | 14 10 + 4 - 0 !
lib/hx509/data/ocsp-responder.crt | 131 97 + 34 - 0 !
lib/hx509/data/ocsp-responder.key | 64 50 + 14 - 0 !
lib/hx509/data/pkinit-ec.crt | 88 59 + 29 - 0 !
lib/hx509/data/pkinit-ec.key | 6 3 + 3 - 0 !
lib/hx509/data/pkinit-proxy-chain.crt | 171 125 + 46 - 0 !
lib/hx509/data/pkinit-proxy.crt | 40 28 + 12 - 0 !
lib/hx509/data/pkinit-proxy.key | 64 50 + 14 - 0 !
lib/hx509/data/pkinit-pw.key | 64 50 + 14 - 0 !
lib/hx509/data/pkinit.crt | 131 97 + 34 - 0 !
lib/hx509/data/pkinit.key | 64 50 + 14 - 0 !
lib/hx509/data/proxy-level-test.crt | 42 29 + 13 - 0 !
lib/hx509/data/proxy-level-test.key | 64 50 + 14 - 0 !
lib/hx509/data/proxy-test.crt | 40 28 + 12 - 0 !
lib/hx509/data/proxy-test.key | 64 50 + 14 - 0 !
lib/hx509/data/proxy10-child-child-test.crt | 40 28 + 12 - 0 !
lib/hx509/data/proxy10-child-child-test.key | 64 50 + 14 - 0 !
lib/hx509/data/proxy10-child-test.crt | 38 27 + 11 - 0 !
lib/hx509/data/proxy10-child-test.key | 64 50 + 14 - 0 !
lib/hx509/data/proxy10-test.crt | 40 28 + 12 - 0 !
lib/hx509/data/proxy10-test.key | 64 50 + 14 - 0 !
lib/hx509/data/revoke.crt | 129 96 + 33 - 0 !
lib/hx509/data/revoke.key | 64 50 + 14 - 0 !
lib/hx509/data/sub-ca.crt | 137 100 + 37 - 0 !
lib/hx509/data/sub-ca.key | 64 50 + 14 - 0 !
lib/hx509/data/sub-cert.crt | 129 96 + 33 - 0 !
lib/hx509/data/sub-cert.key | 64 50 + 14 - 0 !
lib/hx509/data/sub-cert.p12 | 43 30 + 13 - 0 !
lib/hx509/data/test-ds-only.crt | 130 97 + 33 - 0 !
lib/hx509/data/test-ds-only.key | 64 50 + 14 - 0 !
lib/hx509/data/test-enveloped-aes-128 | 30 17 + 13 - 0 !
lib/hx509/data/test-enveloped-aes-256 | 29 11 + 18 - 0 !
lib/hx509/data/test-enveloped-des | 30 19 + 11 - 0 !
lib/hx509/data/test-enveloped-des-ede3 | 25 12 + 13 - 0 !
lib/hx509/data/test-enveloped-rc2-128 | 17 11 + 6 - 0 !
lib/hx509/data/test-enveloped-rc2-40 | 31 17 + 14 - 0 !
lib/hx509/data/test-enveloped-rc2-64 | 36 23 + 13 - 0 !
lib/hx509/data/test-ke-only.crt | 130 97 + 33 - 0 !
lib/hx509/data/test-ke-only.key | 64 50 + 14 - 0 !
lib/hx509/data/test-nopw.p12 | 32 23 + 9 - 0 !
lib/hx509/data/test-pw.key | 64 50 + 14 - 0 !
lib/hx509/data/test-signed-data | 14 11 + 3 - 0 !
lib/hx509/data/test-signed-data-noattr | 11 9 + 2 - 0 !
lib/hx509/data/test-signed-data-noattr-nocerts | 5 3 + 2 - 0 !
lib/hx509/data/test-signed-sha-1 | 13 10 + 3 - 0 !
lib/hx509/data/test-signed-sha-256 | 15 11 + 4 - 0 !
lib/hx509/data/test-signed-sha-512 | 14 9 + 5 - 0 !
lib/hx509/data/test.combined.crt | 193 146 + 47 - 0 !
lib/hx509/data/test.crt | 129 96 + 33 - 0 !
lib/hx509/data/test.key | 64 50 + 14 - 0 !
lib/hx509/data/test.p12 | 33 23 + 10 - 0 !
67 files changed, 2829 insertions(+), 1011 deletions(-)

 regenerate certs so that they expire before the 2038 armageddon