aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-09-25Update for krb5-1.15.2-postreleaseGreg Hudson1-2/+2
2017-09-25Update for krb5-1.15.2krb5-1.15.2-finalGreg Hudson28-30/+81
2017-09-25make update-poGreg Hudson1-5/+5
2017-09-25Update man pagesGreg Hudson3-19/+21
2017-09-22Bump cmocka version in Travis buildGreg Hudson1-3/+3
(cherry picked from commit d7cea23604b95e790bcc581c0e8e8f77090f7718)
2017-09-22Prevent null dereference with keyboard master keyGreg Hudson1-3/+4
If krb5_db_fetch_mkey() prompts for a master key and needs to determine the kvno, check that the master entry contains any key data before dereferencing the first element. Reported by Joshua Schaeffer. (cherry picked from commit 29c504504f0c56c861d968ba2498590bf34714cd) ticket: 8600 version_fixed: 1.15.2
2017-09-22Prevent KDC unset status assertion failuresGreg Hudson3-5/+12
Assign status values if S4U2Self padata fails to decode, if an S4U2Proxy request uses invalid KDC options, or if an S4U2Proxy request uses an evidence ticket which does not match the canonicalized request server principal name. Reported by Samuel Cabrero. If a status value is not assigned during KDC processing, default to "UNKNOWN_REASON" rather than failing an assertion. This change will prevent future denial of service bugs due to similar mistakes, and will allow us to omit assigning status values for unlikely errors such as small memory allocation failures. CVE-2017-11368: In MIT krb5 1.7 and later, an authenticated attacker can cause an assertion failure in krb5kdc by sending an invalid S4U2Self or S4U2Proxy request. CVSSv3 Vector: AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:C (cherry picked from commit ffb35baac6981f9e8914f8f3bffd37f284b85970) ticket: 8599 version_fixed: 1.15.2
2017-09-22Preserve GSS context on init/accept failureGreg Hudson17-21/+72
After gss_init_sec_context() or gss_accept_sec_context() has created a context, don't delete the mechglue context on failures from subsequent calls, even if the mechanism deletes the mech-specific context (which is allowed by RFC 2744 but not preferred). Check for union contexts with no mechanism context in each GSS function which accepts a gss_ctx_id_t. CVE-2017-11462: RFC 2744 permits a GSS-API implementation to delete an existing security context on a second or subsequent call to gss_init_sec_context() or gss_accept_sec_context() if the call results in an error. This API behavior has been found to be dangerous, leading to the possibility of memory errors in some callers. For safety, GSS-API implementations should instead preserve existing security contexts on error until the caller deletes them. All versions of MIT krb5 prior to this change may delete acceptor contexts on error. Versions 1.13.4 through 1.13.7, 1.14.1 through 1.14.5, and 1.15 through 1.15.1 may also delete initiator contexts on error. (cherry picked from commit 56f7b1bc95a2a3eeb420e069e7655fb181ade5cf) ticket: 8598 version_fixed: 1.15.2
2017-07-17Clarify "all privileges" in kadm5.acl docsGreg Hudson1-13/+14
In the kadm5.acl example, be more careful about saying "all privileges", as the recently added extract privilege is not covered by "*" or "x". (cherry picked from commit 72a4b0af1a6cd07eee178cf3ff1df0e0857f5312) ticket: 8594 version_fixed: 1.15.2
2017-07-17Add aes-sha2 to default enctypes in docsGreg Hudson1-1/+1
Commit d1ec317288278d10ae34fde9b2414e4fca5c52dd added aes-sha2 to the default permitted enctype lists and the aes family, but didn't update the documentation. Commit 33a500ea14286b0d42c3ad63df8b88b3849b33a3 updated the documentation for the aes family, but not for the default enctype lists. Reported by Weijun Wang. (cherry picked from commit 4c234d8754c063177bc627c6298b85020d91c223) ticket: 8593 version_fixed: 1.15.2
2017-07-17Fix kadm5 setkey operation with LDAP KDBGreg Hudson1-0/+6
Add mask assignments to kadm5_setv4key_principal() and kadm5_setkey_principal_4() so that their changes to the principal are properly written to KDB modules which use the mask flag, such as the LDAP KDB module. Reported by Frank Lonigro. (cherry picked from commit f8ed1bde848a16dfda5c6558ffe4326acc37bc95) ticket: 8589 version_fixed: 1.15.2
2017-07-17Fix kadm5.acl error reportingGreg Hudson1-3/+3
In kadm5int_acl_get_line(), increment *lnp after skipping a blank or comment line, so that kadm5int_acl_load_acl_file() correctly reports the line number if it fails to parse a line. In acl_syn_err_msg, use %.10s to limit the amount of the line included in the error message, not %10s to left-pad it with spaces if it is shorter than ten characters. (cherry picked from commit 3efb19294012ad38ac3a95d407e739313838c68a) ticket: 8588 version_fixed: 1.15.2
2017-07-17Add aes-sha2 enctypes to aes family documentationRobbie Harwood1-1/+1
The functional portion of this change was made in commit d1ec317288278d10ae34fde9b2414e4fca5c52dd. (cherry picked from commit 33a500ea14286b0d42c3ad63df8b88b3849b33a3) ticket: 8585 version_fixed: 1.15.2
2017-07-17Free GSS checksum data deterministicallyTomas Kuthan1-3/+1
In the normal course of execution, md5.contents allocated by kg_checksum_channel_bindings() in make_ap_req_v1() is freed in make_gss_checksum(). But when there is a failure in krb5_mk_req_extended() or in make_gss_checksum() before free is called, the memory leaks. This patch frees the memory unconditionally in make_ap_req_v1(). (cherry picked from commit 29337e7c7b796685fb6a03466d32147e17aa2d16) ticket: 8584 version_fixed: 1.15.2
2017-07-17Allow clock skew in krb5 gss_context_time()Greg Hudson1-1/+4
Commit b496ce4095133536e0ace36b74130e4b9ecb5e11 (ticket #8268) adds the clock skew to krb5 acceptor context lifetimes for gss_accept_sec_context() and gss_inquire_context(), but not for gss_context_time(). Add the clock skew in gss_context_time() as well. (cherry picked from commit b0a072e6431261734e7350996a363801f180e8ea) ticket: 8581 version_fixed: 1.15.2
2017-07-17Apply TCP timeouts to HTTPS (KKDCP) transportGreg Hudson1-2/+1
We apply (as of ticket #7604) a ten-second minimum delay after a TCP connection is accepted before creating new connections or sending UDP packets. Apply this timeout to HTTPS connections as well, by removing the transport check in get_endtime(). As the endtime field is only set by service_tcp_connect(), it will always have the value 0 for UDP connection state objects, so there is no need to check the transport type. (cherry picked from commit aace82e17ed0185faa3e9cda5437a3c6a7a40b10) ticket: 8580 version_fixed: 1.15.2
2017-07-17Make RC4 string-to-key more robustGreg Hudson1-2/+6
krb5int_utf8cs_to_ucs2les() can read slightly beyond the end of the input buffer if the buffer ends with an invalid UTF-8 sequence. When computing the RC4 string-to-key result, make a zero-terminated copy of the input string and use krb5int_utf8s_to_ucs2les() instead. (cherry picked from commit b8814745049b5f401e3ae39a81dc1e14598ae48c) ticket: 8576 version_fixed: 1.15.2
2017-07-17Check for FAST in encrypted challenge clientGreg Hudson1-0/+2
If we reach the encrypted challenge clpreauth process method without an armor key, error out instead of crashing. This can happen if (a) the KDC offers encrypted challenge even though the request doesn't use FAST (the Heimdal KDC apparently does this), and (b) we fall back to that preauth method before generating a preauthenticated request, typically because of a prompter failure in encrypted timestamp. Reported by Nico Williams. (cherry picked from commit ff6aac3e018e80fa32df2e14446c6ed9595dfc3c) ticket: 8573 version_fixed: 1.15.2
2017-07-17Fix uninitialized flags in MSLSA ccache typeAlexander Karaivanov1-0/+1
The flags field in krb5_lcc_data is not initialized in krb5_lcc_resolve(), so krb5_lcc_next_cred() can sometimes fail to include a ticket when retrieving a ccache entry. This results in a "Request did not supply a ticket" error from k5_make_tgs_req() when trying to use the credential. [ghudson@mit.edu: condensed commit message] (cherry picked from commit e5a78d4c90d9d6968c94b0c07f2cd3835f02aa5d) ticket: 8567 version_fixed: 1.15.2
2017-07-17Fix krb5int_open_plugin_dirs() error handlingMartin Kittel1-2/+3
In krb5int_open_plugin_dirs(), if constructing filepath fails, filepath is set to null but accessed a few lines later. Add an error check before calling krb5int_open_plugin(). (cherry picked from commit ec56309e95e37cb3c91bad2a696b9bd094620876) ticket: 8565 version_fixed: 1.15.2
2017-07-17Ignore dotfiles in profile includedirGreg Hudson2-4/+9
Editors and filesystems may create artifacts related to .conf files which don't change the file suffix; these artifacts generally begin with "." so that they don't appear in normal directory listings (e.g. ".#filename" for emacs interlock files). Make sure to ignore any such artifacts when processing a profile includedir directive. (cherry picked from commit e8e1d841f8e43e4f441b451d91333a01e43c1b6f) ticket: 8563 version_fixed: 1.15.2
2017-07-17Force autoconf rebuild in maintainer rulesGreg Hudson1-1/+1
autoconf normally avoids recreating files that it does not consider obsolete. Since it knows nothing about patchlevel.h (which we read at autoconf time using m4's esyscmd()), changes to patchlevel.h won't be reflected in configure unless another input to configure has changed, and the maintainer rule will re-run autoconf over and over again. Fix this issue by passing the force flag to autoconf when we invoke it from the maintainer rule. (cherry picked from commit 7027788ae6adbd06d5a16de6ee62e489a4dca68b) ticket: 8560 version_fixed: 1.15.2
2017-07-17Fix leaks in gss_inquire_cred_by_oid()Greg Hudson1-5/+0
In the mechglue gss_inquire_cred_by_oid(), remove an unnecessary allocation of ret_set which is overwritten by the first mechanism's result. (cherry picked from commit 0d39d46852587d36fcc5024d5766586faba9044a) ticket: 8559 version_fixed: 1.15.2
2017-07-17Allow null outputs to gss_get_name_attribute()Isaac Boukris1-10/+9
In krb5_gss_get_name_attribute(), always ask for kvalue and kdisplay_value when calling krb5_authdata_get_attribute(), as it currently expect non-null arguments. This change allows applications to pass GSS_C_NO_BUFFER for the value and display_value output parameters. (Passing NULL for the authenticated and complete output parameters already works.) [ghudson@mit.edu: initialized kvalue and kdisplay_value for safety] (cherry picked from commit 0cff20bd02c7e9b0bc88c425b58fa2d379da51b3) ticket: 8557 version_fixed: 1.15.2
2017-03-03Update for krb5-1.15.1-postreleaseGreg Hudson1-2/+2
2017-03-02Update for krb5-1.15.1krb5-1.15.1-finalGreg Hudson28-30/+66
2017-03-02make update-poGreg Hudson1-64/+64
2017-03-02Update man pagesGreg Hudson25-25/+25
2017-03-02Update copyright years to 2017Michael Mattioli8-8/+8
(cherry picked from commit 35cd8db0f6627324b3b3a31f29b34774f649263b)
2017-02-28Fix udp_preference_limit with SRV recordsGreg Hudson1-4/+8
In sendto_kdc:resolve_server() when resolving a server entry with a specified transport, defer the resulting addresses if the strategy dictates that the specified transport is not preferred. Reported by Jochen Hein. (cherry picked from commit bc7594058011c2f9711f24af4fa15a421a8d5b62) ticket: 8554 version_fixed: 1.15.1
2017-02-27Fix PKINIT two-component matching rule parsingGreg Hudson1-1/+1
In pkinit_matching.c:parse_rule_set(), apply the default relation when parsing the second component of a rule, not the third. Otherwise we apply no default relation to two-component matching rules, effectively reducing such rules to their second components. Reported by Sumit Bose. (cherry picked from commit 67ae7bbe1ea7032d1cb79682be3a14e7e13ec64f) ticket: 8553 version_fixed: 1.15.1
2017-02-23Document multi-component PKINIT client certsGreg Hudson1-3/+18
In pkinit.rst, note that the extensions.client file only works for single-component client principals, and describe how to modify it for multi-component principals. (cherry picked from commit 8abbb9b805e457849e9e414bd2ef610ad9fc4f06) ticket: 7940 version_fixed: 1.15.1
2017-02-23Add free_principal_e_data KDB methodAndreas Schneider2-1/+24
Add an optional method to kdb_vftabl to free e_data pointer in a principal entry, in case it was populated by a module using a more complex structure than a single memory region. [ghudson@mit.edu: handled minor version bump; simplified code; rewrote commit message] (cherry picked from commit 87d8d1c6da227ff9410413de39ee64e4566429e5) ticket: 8538 version_fixed: 1.15.1
2017-02-23Explicitly copy KDB vtable fieldsGreg Hudson1-22/+59
In preparation for bumping the kdb_vftabl minor version, use explicit field assignments when copying the module vtable to the internal copy, so that we can conditionalize assignments for minor versions greater than 0. (cherry picked from commit 50605efa5058583667227223a75ca44a512f4796) ticket: 8538 version_fixed: 1.15.1
2017-02-23Document default realm and login authorizationGreg Hudson1-0/+113
Add documentation to host_config.rst describing what the default realm does. Also add documentation discussing login authorization configuration, and give an example showing how to give login access to principals from a realm other than the default realm. (cherry picked from commit 16550e85a2c317c5404fa336c084381d83b90740) ticket: 8540 version_fixed: 1.15.1
2017-02-23Add GSSAPI S4U documentationGreg Hudson1-5/+79
Describe how a GSS application can perform S4U2Self and S4U2Proxy requests using the MIT krb5 GSS library. Also add a reference to RFC 7546 at the top, and fix a reference to gssapi_krb5.h. (cherry picked from commit 31fcadd6bef5e3fbcc986220b860a1af8c7030a1) ticket: 8552 version_fixed: 1.15.1
2017-01-09Fix GSSAPI authind attribute name in docsMatt Rogers2-2/+2
The correct attribute name is "auth-indicators". (cherry picked from commit e3f666fe61e94e96d3c4d449e2fa8bd69cd2ecec) ticket: 8532 version_fixed: 1.15.1
2017-01-09Use pktinfo for explicit UDP wildcard listenersGreg Hudson1-1/+12
In net-server.c, use pktinfo on UDP server sockets if they are bound to wildcard addresses, whether that is explicit or implicit in the address specification. (cherry picked from commit d005beaa72c70bc28b2b0b49b9d83eff160ca8f1) ticket: 8530 version_fixed: 1.15.1
2017-01-09Fix KDC/kadmind startup on some IPv4-only systemsGreg Hudson1-3/+13
getaddrinfo(NULL, ...) may yield an IPv6 wildcard address on IPv4-only systems, and creating a socket for that address may result in an EAFNOSUPPORT error. Tolerate that error as long as we can bind at least one socket for the address. (cherry picked from commit 04c2bb56f5203b296b24314810eca02f5dc7e491) ticket: 8531 version_fixed: 1.15.1
2017-01-09Fix error handling in PKINIT decode_data()Greg Hudson1-10/+7
decode_data() mixes errno values with OpenSSL return codes. Change its return type to int, and return 1 on success or 0 on failure. (cherry picked from commit cc9035a7d25008bdcd9c7beb01670aa57b51d829) ticket: 8525 version_fixed: 1.15.1
2017-01-09Add caveats to krbtgt change documentationGreg Hudson1-0/+18
In database.rst, describe a couple of krbtgt rollover issues and how to avoid them. (cherry picked from commit 56d05e87858b672591c1e6b7869cb08e8b1e0d59) ticket: 8524 version_fixed: 1.15.1
2017-01-09Add krbPwdPolicy attributes to kerberos.ldifTomas Kuthan1-1/+1
When LDAP backend support for policy extensions was added by 5edafa0532 (ticket 7223), the kerberos.ldif change neglected to add the new attributes to krbPwdPolicy. (cherry picked from commit 823e3088d835661fd718a941f602bb2972db96c8) ticket: 8523 version_fixed: 1.15.1
2017-01-06Add some omitted things to READMETom Yu1-0/+8
[ci skip]
2016-12-02Update for krb5-1.15-postreleaseTom Yu1-2/+2
2016-12-01Updates for krb5-1.15krb5-1.15-finalTom Yu3-6/+8
2016-11-30Relicense ccapi/common/win/OldCC/autolock.hxxGreg Hudson3-22/+92
With permission from Danilo Almeida, change the license on autolock.hxx to the 2-clause BSD license used by MIT krb5. (cherry picked from commit 90bfe396781c3b2a427c95dd2e58a234027ff269) ticket: 8520 version_fixed: 1.15
2016-11-30Allow slapd path configuration in t_kdb.pyGreg Hudson1-7/+10
The upstream OpenLDAP installs slapd in libexec, which is not typically in the path. Also, copying the binary can sometimes cause it to fail; for instance, in the OpenCSW package, /opt/csw/libexec/slapd is a script which chooses a binary based on the system architecture and the path to the script. Allow the test runner to set the SLAPD environment variable to specify the slapd location and avoid the copy. (cherry picked from commit 9290e52b7f206dcbfd9dd5d873cf9379cb9de760) ticket: 8521 (new) tags: pullup target_version: 1.15-next target_version: 1.14-next version_fixed: 1.15
2016-11-16Update for krb5-1.15-beta2-postreleaseTom Yu1-2/+2
2016-11-15Update for krb5-1.15-beta2krb5-1.15-beta2Tom Yu3-4/+24
2016-11-14make update-poTom Yu1-39/+39