Package: heimdal / 7.5.0+dfsg-3

Metadata

Package Version Patches format
heimdal 7.5.0+dfsg-3 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(-)

 nfs_des

=== modified file 'kdc/kerberos5.c'

021_debian | (download)

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

 debian

=== modified file 'doc/setup.texi'

022_openafs | (download)

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

 openafs

===================================================================

025_krb5 config paths | (download)

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

 krb5-config-paths

=== modified file 'a/tools/krb5-config.in'

025_pthreads | (download)

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

 pthreads

=== modified file 'cf/pthreads.m4'

030_pkg config paths | (download)

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

 pkg-config-paths

=== modified file 'tools/heimdal-gssapi.pc.in'

installsh | (download)

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

 installsh

===================================================================

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 !
kdc/kx509.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 !
13 files changed, 18 insertions(+), 18 deletions(-)

 hurd_maxhostnamelen


042_hurd_path_max | (download)

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

 hurd_path_max


046_hurd_sundevdata | (download)

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

 hurd sundevdata


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 gssapi

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

 no build string

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

 parallel build


disable_iprop | (download)

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

 disable iprop


canonical_host | (download)

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

 canonical host

Disable use of @CANONICAL_HOST@, which is not reproducible.

https://github.com/heimdal/heimdal/issues/237

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

fix missing headers | (download)

lib/hcrypto/Makefile.am | 5 5 + 0 - 0 !
lib/hx509/Makefile.am | 4 2 + 2 - 0 !
2 files changed, 7 insertions(+), 2 deletions(-)

---
0017 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
0018 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)

0020 Fixes https github.com heimdal heimdal issues 533.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 | 5 2 + 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 | 18 14 + 4 - 0 !
lib/hx509/data/ocsp-resp1-keyhash.der | 14 9 + 5 - 0 !
lib/hx509/data/ocsp-resp1-ocsp-no-cert.der | 6 3 + 3 - 0 !
lib/hx509/data/ocsp-resp1-ocsp.der | 11 6 + 5 - 0 !
lib/hx509/data/ocsp-resp2.der | 10 6 + 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 | 42 29 + 13 - 0 !
lib/hx509/data/proxy10-child-child-test.key | 64 50 + 14 - 0 !
lib/hx509/data/proxy10-child-test.crt | 42 29 + 13 - 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/secp256r1TestCA.cert.pem | 20 10 + 10 - 0 !
lib/hx509/data/secp256r1TestCA.pem | 20 10 + 10 - 0 !
lib/hx509/data/secp256r2TestClient.cert.pem | 20 10 + 10 - 0 !
lib/hx509/data/secp256r2TestClient.pem | 20 10 + 10 - 0 !
lib/hx509/data/secp256r2TestServer.cert.pem | 20 10 + 10 - 0 !
lib/hx509/data/secp256r2TestServer.pem | 20 10 + 10 - 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 | 53 40 + 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 | 32 19 + 13 - 0 !
lib/hx509/data/test-enveloped-aes-256 | 31 13 + 18 - 0 !
lib/hx509/data/test-enveloped-des | 28 17 + 11 - 0 !
lib/hx509/data/test-enveloped-des-ede3 | 24 11 + 13 - 0 !
lib/hx509/data/test-enveloped-rc2-128 | 23 17 + 6 - 0 !
lib/hx509/data/test-enveloped-rc2-40 | 24 10 + 14 - 0 !
lib/hx509/data/test-enveloped-rc2-64 | 28 15 + 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 | 31 22 + 9 - 0 !
lib/hx509/data/test-pw.key | 64 50 + 14 - 0 !
lib/hx509/data/test-signed-data | 12 9 + 3 - 0 !
lib/hx509/data/test-signed-data-noattr | 12 10 + 2 - 0 !
lib/hx509/data/test-signed-data-noattr-nocerts | 8 6 + 2 - 0 !
lib/hx509/data/test-signed-sha-1 | 11 8 + 3 - 0 !
lib/hx509/data/test-signed-sha-256 | 13 9 + 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 | 28 18 + 10 - 0 !
73 files changed, 2882 insertions(+), 1074 deletions(-)

 fixes https://github.com/heimdal/heimdal/issues/533

Update certs to no longer be expired, last 500 years.

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

lib/hx509/data/ca.crt | 60 30 + 30 - 0 !
lib/hx509/data/ca.key | 100 50 + 50 - 0 !
lib/hx509/data/crl1.crl | 26 13 + 13 - 0 !
lib/hx509/data/crl1.der | 6 4 + 2 - 0 !
lib/hx509/data/https.crt | 188 94 + 94 - 0 !
lib/hx509/data/https.key | 100 50 + 50 - 0 !
lib/hx509/data/kdc.crt | 192 96 + 96 - 0 !
lib/hx509/data/kdc.key | 100 50 + 50 - 0 !
lib/hx509/data/no-proxy-test.crt | 56 28 + 28 - 0 !
lib/hx509/data/no-proxy-test.key | 100 50 + 50 - 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 | 22 8 + 14 - 0 !
lib/hx509/data/ocsp-resp1-keyhash.der | 20 11 + 9 - 0 !
lib/hx509/data/ocsp-resp1-ocsp-no-cert.der | 5 3 + 2 - 0 !
lib/hx509/data/ocsp-resp1-ocsp.der | 13 7 + 6 - 0 !
lib/hx509/data/ocsp-resp2.der | 16 10 + 6 - 0 !
lib/hx509/data/ocsp-responder.crt | 190 95 + 95 - 0 !
lib/hx509/data/ocsp-responder.key | 100 50 + 50 - 0 !
lib/hx509/data/pkinit-ec.crt | 112 56 + 56 - 0 !
lib/hx509/data/pkinit-ec.key | 6 3 + 3 - 0 !
lib/hx509/data/pkinit-proxy-chain.crt | 246 123 + 123 - 0 !
lib/hx509/data/pkinit-proxy.crt | 56 28 + 28 - 0 !
lib/hx509/data/pkinit-proxy.key | 100 50 + 50 - 0 !
lib/hx509/data/pkinit-pw.key | 100 50 + 50 - 0 !
lib/hx509/data/pkinit.crt | 190 95 + 95 - 0 !
lib/hx509/data/pkinit.key | 100 50 + 50 - 0 !
lib/hx509/data/proxy-level-test.crt | 58 29 + 29 - 0 !
lib/hx509/data/proxy-level-test.key | 100 50 + 50 - 0 !
lib/hx509/data/proxy-test.crt | 56 28 + 28 - 0 !
lib/hx509/data/proxy-test.key | 100 50 + 50 - 0 !
lib/hx509/data/proxy10-child-child-test.crt | 58 29 + 29 - 0 !
lib/hx509/data/proxy10-child-child-test.key | 100 50 + 50 - 0 !
lib/hx509/data/proxy10-child-test.crt | 58 29 + 29 - 0 !
lib/hx509/data/proxy10-child-test.key | 100 50 + 50 - 0 !
lib/hx509/data/proxy10-test.crt | 56 28 + 28 - 0 !
lib/hx509/data/proxy10-test.key | 100 50 + 50 - 0 !
lib/hx509/data/revoke.crt | 188 94 + 94 - 0 !
lib/hx509/data/revoke.key | 100 50 + 50 - 0 !
lib/hx509/data/sub-ca.crt | 196 98 + 98 - 0 !
lib/hx509/data/sub-ca.key | 100 50 + 50 - 0 !
lib/hx509/data/sub-cert.crt | 188 94 + 94 - 0 !
lib/hx509/data/sub-cert.key | 100 50 + 50 - 0 !
lib/hx509/data/sub-cert.p12 | 68 29 + 39 - 0 !
lib/hx509/data/test-ds-only.crt | 190 95 + 95 - 0 !
lib/hx509/data/test-ds-only.key | 100 50 + 50 - 0 !
lib/hx509/data/test-enveloped-aes-128 | 36 17 + 19 - 0 !
lib/hx509/data/test-enveloped-aes-256 | 24 11 + 13 - 0 !
lib/hx509/data/test-enveloped-des | 36 19 + 17 - 0 !
lib/hx509/data/test-enveloped-des-ede3 | 23 12 + 11 - 0 !
lib/hx509/data/test-enveloped-rc2-128 | 28 11 + 17 - 0 !
lib/hx509/data/test-enveloped-rc2-40 | 27 17 + 10 - 0 !
lib/hx509/data/test-enveloped-rc2-64 | 38 23 + 15 - 0 !
lib/hx509/data/test-ke-only.crt | 190 95 + 95 - 0 !
lib/hx509/data/test-ke-only.key | 100 50 + 50 - 0 !
lib/hx509/data/test-nopw.p12 | 45 23 + 22 - 0 !
lib/hx509/data/test-pw.key | 100 50 + 50 - 0 !
lib/hx509/data/test-signed-data | 20 11 + 9 - 0 !
lib/hx509/data/test-signed-data-noattr | 19 9 + 10 - 0 !
lib/hx509/data/test-signed-data-noattr-nocerts | 7 2 + 5 - 0 !
lib/hx509/data/test-signed-sha-1 | 18 10 + 8 - 0 !
lib/hx509/data/test-signed-sha-256 | 20 11 + 9 - 0 !
lib/hx509/data/test-signed-sha-512 | 18 9 + 9 - 0 !
lib/hx509/data/test.combined.crt | 288 144 + 144 - 0 !
lib/hx509/data/test.crt | 188 94 + 94 - 0 !
lib/hx509/data/test.key | 100 50 + 50 - 0 !
lib/hx509/data/test.p12 | 39 22 + 17 - 0 !
67 files changed, 2799 insertions(+), 2789 deletions(-)

 regenerate certs so that they expire before the 2038 armageddon so
 the test suite will pass on 32-bit operating systems until the underlying
 issues can be resolved.