]> git.ipfire.org Git - thirdparty/krb5.git/log
thirdparty/krb5.git
10 years agoAdd missing profile functions to libkrb5 exports
Greg Hudson [Wed, 4 Jun 2014 20:18:21 +0000 (16:18 -0400)] 
Add missing profile functions to libkrb5 exports

profile_flush_to_buffer, profile_flush_to_file, profile_free_buffer,
profile_init_flags, and profile_init_vtable are all public profile
functions, but are inaccessible to libkrb5 applications on some
platforms because they were never added to the export list.  Add them
now.

(libprofile functions have never been part of the Windows DLL export
list, so do not change krb5_32.def at this time.)

(cherry picked from commit dc1a76ccc5d3a6972d0f21d38389ff39e54f283a)

ticket: 8103 (new)
version_fixed: 1.11.6
status: resolved

10 years agoTreat LDAP KrbKey salt field as optional
Greg Hudson [Fri, 23 May 2014 23:58:41 +0000 (19:58 -0400)] 
Treat LDAP KrbKey salt field as optional

Per the ASN.1 definition, the KrbKey salt field is optional.  Since
1.7, we have been treating it as mandatory in the encoder; since 1.11,
we have been treating it as mandatory in the decoder.  Mostly by luck,
we have been encoding a salt type of 0 when key_data_ver is 1, but we
really should not be looking at key_data_type[1] or key_data_length[1]
in this situation.  Treat the salt field as optional in the encoder
and decoder.  Although the previous commit ensures that we continue to
always encode a salt (without any dangerous assumptions about
krb5_key_data constructors), this change will allow us to decode key
data encoded by 1.6 without salt fields.

This also fixes issue #7918, by properly setting key_data_ver to 2 if
a salt type but no salt value is present.  It is difficult to get the
decoder to actually assign 2 to key_data_ver just because the salt
field is there, so take care of that in asn1_decode_sequence_of_keys.

Adjust kdbtest.c to match the new behavior by setting key_data_ver to
2 in both test keys.

(back ported from commit fb5cd8df0dbd04dac4f610e68cba5b80a3cb8d48)

ticket: 8102
version_fixed: 1.11.6
status: resolved

10 years agoAlways include salt in LDAP KrbKey encoding
Greg Hudson [Sun, 25 May 2014 02:58:26 +0000 (22:58 -0400)] 
Always include salt in LDAP KrbKey encoding

In the LDAP KDB module, ensure that every krb5_key_data we pass to
asn1_encode_sequence_of_keys includes a salt type, for compatibility
with the decoder in unpatched krb5 1.11 and 1.12.

This is not a behavior change by itself; since 1.7 the encoder has
always included a KrbKey salt field because it erroneously treats that
field as non-optional.  (Luckily, the encoded salt always happens to
have salt type 0 because krb5_key_data constructors start with zeroed
memory.)  The next commit will fix the encoder and decoder to properly
treat the KrbKey salt field as optional, so we need this change to
ensure that our encodings remain compatible.

Also fix the ASN.1 tests to set key_data_ver correctly for the sample
test key data.

(cherry picked from commit 1825455ede7e61ab934b16262fb5b12b78a52f1a)

ticket: 8102 (new)
version_fixed: 1.11.6
status: resolved

10 years agoDo not document pkinit_mapping_file
Greg Hudson [Sun, 1 Jun 2014 14:41:27 +0000 (10:41 -0400)] 
Do not document pkinit_mapping_file

This feature was never implemented in the PKINIT code as it was
contributed; there was only stub support for reading the filename.

(cherry picked from commit 8da21b0ec18cf9306a8c1b3410d5c6ab36acdd21)

ticket: 8101 (new)
version_fixed: 1.11.6
status: resolved

10 years agoDon't blindly use PKCS11 slot IDs in PKINIT
Greg Hudson [Thu, 22 May 2014 23:18:34 +0000 (19:18 -0400)] 
Don't blindly use PKCS11 slot IDs in PKINIT

Passing invalid slot IDs to C_OpenSession can cause some PKCS #11
implementations (such as the Solaris one) to crash.  If a PKINIT
identity specifies a slotid, use it to filter the result of
C_GetSlotList, but don't try it if it does not appear in the list.

(cherry picked from commit ac406bac3d73a7e4efcc74adbb90c722457da969)

ticket: 8100 (new)
version_fixed: 1.11.6
status: resolved

10 years agoAdd tests for krb5int_c_combine_keys
Greg Hudson [Tue, 20 May 2014 18:52:44 +0000 (14:52 -0400)] 
Add tests for krb5int_c_combine_keys

krb5int_c_combine_keys is used only by SAM-2 preauth with neither the
send-encrypted-sad nor use-sad-as-key flags, so it isn't covered by
any automated function tests.  Add some unit tests to make sure that
it works and returns the expected results for two randomly generated
test vectors.

(back ported from commit 6e8b2fba84df2ef74ce071330b4c3f843f4b7541)

ticket: 8099 (new)
version_fixed: 1.11.6
status: resolved

10 years agoFix krb5int_c_combine_keys
Ken Hornstein [Tue, 20 May 2014 18:50:22 +0000 (14:50 -0400)] 
Fix krb5int_c_combine_keys

When krb5int_c_combine_keys was updated to use the new crypto
interface, a small bug was introduced.  It turns out the temporary
keyblock created needs to have its enctype set; otherwise, when
krb5int_derive_keyblock() is called later, it will fail with
KRB5_BAD_ENCTYPE.

(cherry picked from commit 89803a5a781107365d5a4534eebf48dbaf010f96)

ticket: 8098 (new)
version_fixed: 1.11.6
status: resolved

10 years agoCheck for asprintf failure in kdb5_util create
Tomas Kuthan [Thu, 10 Apr 2014 13:16:06 +0000 (15:16 +0200)] 
Check for asprintf failure in kdb5_util create

In add_admin_princ, remove build_name_with_realm and call asprintf
directly instead.  Check for asprintf failure to avoid passing an
undefined pointer to krb5_parse_name.

[ghudson@mit.edu: rewrite commit message]

(cherry picked from commit f5645d30cf83398640c386a612eb6f07c543286f)

ticket: 8097 (new)
version_fixed: 1.11.6
status: resolved

10 years agoFix leak in kadm5_flush with LDAP KDB
Tomas Kuthan [Wed, 2 Apr 2014 15:48:04 +0000 (17:48 +0200)] 
Fix leak in kadm5_flush with LDAP KDB

Due to an inverted test in adb_policy_init, kadm5_flush calls
krb5_db_open twice.  With the DB2 KDB module, the second open is a
no-op, but with the LDAP module, a new DB handle is allocated and the
old one is leaked.

[ghudson@mit.edu: rewrote commit message]

(cherry picked from commit 372e4cb6f5d4a603e6e3157c7b5d354953836136)

ticket: 8096 (new)
version_fixed: 1.11.6
status: resolved

10 years agoGet getopt from unistd.h (not getopt.h) in tests
Greg Hudson [Fri, 28 Mar 2014 16:33:43 +0000 (12:33 -0400)] 
Get getopt from unistd.h (not getopt.h) in tests

POSIX defines getopt to be declared in unistd.h, and HP-UX (as of
version 11.31) does not appear to have getopt.h.  In test programs
which currently include getopt.h and aren't currently built on
Windows, include unistd.h or just assume we will get it via k5-int.h.

(back ported from commit 613c62d689c31a325d51be88657dedd17af3cf81)

ticket: 8095 (new)
version_fixed: 1.11.6
status: resolved

10 years agoFix GSS krb5 initial sequence number gap handling
Tomas Kuthan [Thu, 6 Mar 2014 12:05:24 +0000 (13:05 +0100)] 
Fix GSS krb5 initial sequence number gap handling

Since #2040, the dummy queue element inserted by g_order_init no
longer compares less than the initial sequence number, so we fail when
the first few sequence numbers are received out of order.  Properly
detect when a sequence number fits between the dummy element and the
first real queue element.

[ghudson@mit.edu: rewrote commit message]

(cherry picked from commit 13a9cb721194c8aa4ccf6ed6ef23e3ac8dd24037)

ticket: 8094 (new)
version_fixed: 1.11.6
status: resolved

10 years agoUpdate example kadmin getprinc enctype display
Greg Hudson [Wed, 26 Mar 2014 19:57:08 +0000 (15:57 -0400)] 
Update example kadmin getprinc enctype display

In kadmin_local.rst, update the example to reflect the new way we
display enctypes after #5014.

(cherry picked from commit 3890d1dff87a839efec38a77dcc88574ed65f4a9)

ticket: 8093 (new)
version_fixed: 1.11.6
status: resolved

10 years agoFix returning KDB_NOENTRY in find_alternate_tgs()
Nalin Dahyabhai [Thu, 20 Feb 2014 21:01:49 +0000 (16:01 -0500)] 
Fix returning KDB_NOENTRY in find_alternate_tgs()

After searching for a cross-realm TGS entry to provide to a client as a
referral, if we're all set to return a success code but aren't actually
returning an entry, we should be returning an error.  We might not do so
because we don't compare the right value against NULL.

This corrects an error in a redundant check in the patch for
CVE-2013-1417.  The error in the check cannot occur in practice
because the other part of the patch for CVE-2013-1417 prevents it, but
static analyzers can flag the erroneous check.

[tlyu@mit.edu: edit commit message]

(cherry picked from commit 90cbf4eb60d8ec3c083195ba4a050a31ea36be0b)

ticket: 8092 (new)
version_fixed: 1.11.6
status: resolved

10 years agoFix unlikely double free in PKINIT client code
Greg Hudson [Thu, 13 Mar 2014 22:34:22 +0000 (18:34 -0400)] 
Fix unlikely double free in PKINIT client code

In pa_pkinit_gen_req, if the cleanup handler is reached with non-zero
retval and non-null out_data, out_data is freed, then dereferenced,
then freed again.  This can only happen if one of the small fixed-size
malloc requests fails after pkinit_as_req_create succeeds, so it is
unlikely to occur in practice.

(cherry picked from commit cc002d6c1ccfc08356d01ba83e72a46855d0302c)

ticket: 8091 (new)
version_fixed: 1.11.6
status: resolved

10 years agoMention k5login_authoritative in k5login docs
Ben Kaduk [Thu, 13 Mar 2014 19:11:49 +0000 (15:11 -0400)] 
Mention k5login_authoritative in k5login docs

In particular, it is set by default.  This can lead to confusing
behavior wherein adding a k5login file removes a user's remote
access.

Make an example more concrete to account for this case.

(cherry picked from commit 8cdc21ef051f43ea8dcabf42540d5cff13b5adeb)

ticket: 8090 (new)
version_fixed: 1.11.6
status: resolved

10 years agoFix memory leak in krb5_verify_init_creds
Nalin Dahyabhai [Mon, 17 Feb 2014 22:14:20 +0000 (17:14 -0500)] 
Fix memory leak in krb5_verify_init_creds

When copying most of the credentials from one cache to another in
copy_creds_except (called from get_vfy_cred, from
krb5_verify_init_creds), we need to free all of the credentials that
we read, not just the ones we copied.

[ghudson@mit.edu: edited commit message]

(cherry picked from commit 27b136d2e3181e787b2d4a03ee712d5d5137f5cd)

ticket: 8089 (new)
version_fixed: 1.11.6
status: resolved

10 years agoInitialize err variable in krb5_sendto_kdc
Nalin Dahyabhai [Tue, 11 Mar 2014 17:26:32 +0000 (13:26 -0400)] 
Initialize err variable in krb5_sendto_kdc

When we get an KRB5_KDC_UNREACH error back from k5_sendto, we check if
the err variable we passed for use by our message handler has been set
to KDC_ERR_SVC_UNAVAILABLE.  If k5_sendto doesn't receive any
response, though, the handler isn't called, so we're reading an
uninitialized variable.  Initialize it to a value other than
KDC_ERR_SVC_UNAVAILABLE to be sure.

[ghudson@mit.edu: initialize err just before calling k5_sendto; edit
commit message]

(cherry picked from commit 1ed3f68c2394fbb48731bba4e4e9a60c8b925ca5)

ticket: 8088 (new)
version_fixed: 1.11.6
status: resolved

10 years agoUpdate iprop_master_ulogsize documentation
Greg Hudson [Fri, 7 Mar 2014 15:37:48 +0000 (10:37 -0500)] 
Update iprop_master_ulogsize documentation

When we removed the maximum number of ulog entries (#7368), we did not
update the documentation for that parameter in kdc.conf.  Reported by
Richard Basch.

(cherry picked from commit 5fa7e666bd81a2222b155bdf3f0c3fc1bc3fabf5)

ticket: 8087 (new)
version_fixed: 1.11.6
status: resolved

10 years agoCheck for malloc failure in process_chpw_request
Greg Hudson [Sun, 2 Mar 2014 23:12:54 +0000 (18:12 -0500)] 
Check for malloc failure in process_chpw_request

(cherry picked from commit 4356deefa2d2fe0bc7b52f3b62a387c7ec1eb369)

ticket: 8086 (new)
version_fixed: 1.11.6
status: resolved

10 years agoCorrect docs for "kdb5_util load" switches
Jeff D'Angelo [Fri, 28 Feb 2014 14:47:30 +0000 (09:47 -0500)] 
Correct docs for "kdb5_util load" switches

Remove obsolete parenthetical statement in the description of the
"-update" switch to "kdb5_util load".  Using the "-update" flag to
load a second dump made using the "-ov" switch is no longer necessary
now that the "-r13" format is the default.  Add statement that the
"-b7" dump format was the default for versions prior to 1.2.2 (to
match the statement from "dump" section).

[tlyu@mit.edu: commit message]

(cherry picked from commit 2d0f2fa48df1ea81363de5c78ab7e8cf1ab6d214)

ticket: 8085 (new)
version_fixed: 1.11.6
status: resolved

10 years agoAvoid duplicate "/etc/krb5.conf" in profile path
Tom Yu [Tue, 25 Feb 2014 22:35:35 +0000 (17:35 -0500)] 
Avoid duplicate "/etc/krb5.conf" in profile path

If configure gets run with --sysconfdir=/etc, "/etc/krb5.conf" shows
up twice in the profile path, which causes its contents to be read
twice.  This can cause some confusing and possibly problematic
behavior.

Add some logic to configure.in to avoid adding the duplicate entry for
"/etc/krb5.conf".

Reported independently by Denis Vlasenko and Fredrik Tolf.

(back ported from commit 8df1965d1ccdbcb8d74a3e68ad35d7579db9ac44)
(cherry picked from commit 51ef4b50e46d21374319b7070ad63ba7bb672ee2)

ticket: 8084 (new)
version_fixed: 1.11.6
status: resolved

10 years agoSupport referrals from Windows Server 2003
Nate Rosenblum [Mon, 23 Dec 2013 21:21:44 +0000 (13:21 -0800)] 
Support referrals from Windows Server 2003

Although RFC 6806 Section 7 requires servers to indicate a client
referral in a WRONG_REALM message, Microsoft Windows Server 2003
returns this information in a message with error code
PRINCIPAL_UNKNOWN.  Failure to follow the referral in these messages
prevents referral chasing in Windows Server 2003 forests.  Detect
referral messages of this type by checking for a non-empty
client.realm field in the response, and activate the referral logic in
these cases.

[tlyu@mit.edu: style, comments, and commit message]

(back ported from 3093b92734adfe2deb9ad6bad5a221acc967fd8b)

ticket: 8083 (new)
version_fixed: 1.11.6
status: resolved

10 years agoUpdate doc build instructions
Tom Yu [Fri, 14 Feb 2014 20:59:51 +0000 (15:59 -0500)] 
Update doc build instructions

Documentation build instructions in doc/README were out of date.
Update them.

(cherry picked from commit bfc8f194ae431fc4fadaa431a2a636b4e9b025dd)

ticket: 8082 (new)
version_fixed: 1.11.6
status: resolved

10 years agoProperly reflect MS krb5 mech in SPNEGO acceptor
Greg Hudson [Tue, 4 Feb 2014 02:11:34 +0000 (21:11 -0500)] 
Properly reflect MS krb5 mech in SPNEGO acceptor

r25590 changed negotiate_mech() to return an alias into the acceptor's
mech set, with the unfortunate side effect of transforming the
erroneous Microsoft krb5 mech OID into the correct krb5 mech OID,
meaning that we answer with a different OID than the requested one.
Return an alias into the initiator's mech set instead, and store that
in mech_set field the SPNEGO context.  The acceptor code only uses
mech_set to hold the allocated storage pointed into by internal_mech,
so this change is safe.

(cherry picked from commit 8255613476d4c1583a5e810b50444f188fde871f)

ticket: 8081 (new)
version_fixed: 1.11.6
status: resolved

10 years agoFix kpropd -x
Greg Hudson [Sun, 26 Jan 2014 23:38:11 +0000 (18:38 -0500)] 
Fix kpropd -x

A missing break in the switch statement caused kpropd -x to error out
with a usage message.

(cherry picked from commit 75b2ec88c4d75e7215322d2f0019307310cc9701)

ticket: 8080 (new)
version_fixed: 1.11.6
status: resolved

10 years agoAllow empty store in gss_acquire_cred_from
Greg Hudson [Thu, 16 Jan 2014 16:49:04 +0000 (11:49 -0500)] 
Allow empty store in gss_acquire_cred_from

There is no reason to deny a zero-length cred store, so don't check
for it in val_acq_cred_args or val_add_cred_args.

(cherry picked from commit 970304b558a360e08d8421ef92245d2df0ac5e49)

ticket: 8079 (new)
version_fixed: 1.11.6
status: resolved

10 years agoAvoid assertion failure in error_message
Greg Hudson [Thu, 16 Jan 2014 16:32:10 +0000 (11:32 -0500)] 
Avoid assertion failure in error_message

r17942 added a call to get_thread_buffer in the first part of
error_message, prior to the call to com_err_initialize.  This can
cause an assertion failure from k5_getspecific if error_message is
called on a system error before any other com_err functions are
called.  Move the initialization call earlier to prevent this.

(back ported from 6bdaa746fec1cf29adcbe5b8e65c4b8993770b84)

ticket: 8078 (new)
version_fixed: 1.11.6
status: resolved

10 years agoClean up rcache if GSS krb5 acquire_cred fails
Greg Hudson [Wed, 15 Jan 2014 19:41:54 +0000 (14:41 -0500)] 
Clean up rcache if GSS krb5 acquire_cred fails

The error handler in acquire_cred_context didn't release the rcache,
which would cause it to leak if we failed after acquire_accept_cred.

(cherry picked from commit 9df0c4bdce6b88a01af51e4bbb9a365db00256d5)

ticket: 8077 (new)
version_fixed: 1.11.6
status: resolved

11 years agoFix memory leak in patch for #7831
Tom Yu [Fri, 21 Feb 2014 20:04:10 +0000 (15:04 -0500)] 
Fix memory leak in patch for #7831

The patch for #7831 included a change to do_as_req.c that was only
needed in krb5-1.12; applying it to krb5-1.11 duplicated a block of
code and led to a memory leak.

ticket: 7867 (new)
version_fixed: 1.11.6
status: resolved

11 years agoUpdate for krb5-1.11.5-postrelease
Tom Yu [Tue, 21 Jan 2014 22:49:26 +0000 (17:49 -0500)] 
Update for krb5-1.11.5-postrelease

11 years agoUpdates for krb5-1.11.5 krb5-1.11.5-final
Tom Yu [Tue, 21 Jan 2014 21:28:45 +0000 (16:28 -0500)] 
Updates for krb5-1.11.5

11 years agoUpdate copyright years and acknowledgments
Tom Yu [Thu, 16 Jan 2014 21:41:53 +0000 (16:41 -0500)] 
Update copyright years and acknowledgments

11 years agomake update-po
Tom Yu [Thu, 16 Jan 2014 20:53:51 +0000 (15:53 -0500)] 
make update-po

11 years agoUpdate manpages
Tom Yu [Thu, 16 Jan 2014 20:53:26 +0000 (15:53 -0500)] 
Update manpages

11 years agomake depend
Tom Yu [Thu, 16 Jan 2014 20:52:33 +0000 (15:52 -0500)] 
make depend

11 years agoSort file list for msgfmt
Tom Yu [Wed, 15 Jan 2014 23:40:57 +0000 (18:40 -0500)] 
Sort file list for msgfmt

The list of input files for msgfmt was unsorted find output, resulting
in excessively large changes when running "make update-po".

(cherry picked from commit f131c5a4e266d07753a1f219d35c1bf82d98c0fb)

ticket: 7835 (new)
version_fixed: 1.11.5
status: resolved

11 years agoRemove mentions of krb5-send-pr
Tom Yu [Tue, 14 Jan 2014 20:43:35 +0000 (15:43 -0500)] 
Remove mentions of krb5-send-pr

Start the process of deprecating krb5-send-pr.  In practice, it causes
frustration for some users, and free-form email is good enough for
most bug reports.

Continue to install krb5-send-pr for now, but plan to remove it from
the tree in the future, probably replaced by a script that instructs
the user to send email manually.

(cherry picked from commit e972ce069dd45aad74e4f4853570ab27cfea05c2)

ticket: 7834 (new)
version_fixed: 1.11.5
status: resolved

11 years agoFix typo in sphinx manpage output
Tom Yu [Tue, 14 Jan 2014 21:13:44 +0000 (16:13 -0500)] 
Fix typo in sphinx manpage output

Some versions of the sphinx manpage writer have a typo in the name
'reStructuredText' written into the comments.  Add a sed command to
fix this.

(cherry picked from commit 4d30cc5d0838f6b5b3873046b0dfe72df2bdad11)

ticket: 7833 (new)
version_fixed: 1.11.5
status: resolved

11 years agoTest bogus KDC-REQs
Tom Yu [Thu, 16 Jan 2014 20:18:46 +0000 (15:18 -0500)] 
Test bogus KDC-REQs

Send encodings that are invalid KDC-REQs, but pass krb5_is_as_req()
and krb5_is_tgs_req(), to make sure that the KDC recovers correctly
from failures in decode_krb5_as_req() and decode_krb5_tgs_req().  Also
send an encoding that isn't a valid KDC-REQ.

(back ported from commit dae7693f8bf970d89d4c697f3d66a7d458281b93)

ticket: 7832 (new)
version_fixed: 1.11.5
status: resolved

11 years agoFix possible null deref in previous
Tom Yu [Wed, 1 Jan 2014 00:41:12 +0000 (19:41 -0500)] 
Fix possible null deref in previous

My rework of the do_tgs_req.c patch introduced a null deref if
decode_krb5_tgs_req() failed.

(cherry picked from commit 30589b2a1636de9f9b68591f0e546cb0fa21989f)

ticket: 7831
version_fixed: 1.11.5
status: resolved

11 years agoLog service princ in KDC more reliably
rbasch [Mon, 16 Dec 2013 15:54:41 +0000 (10:54 -0500)] 
Log service princ in KDC more reliably

Under some error conditions, the KDC would log "<unknown server>" for
the service principal because service principal information is not yet
available to the logging functions.  Set the appropriate variables
earlier.

do_as_req.c: After unparsing the client, immediately unparse the
server before searching for the client principal in the KDB.

do_tgs_req.c: Save a pointer to the client-requested service
principal, to make sure it gets logged if an error happens before
search_sprinc() successfully completes.

[tlyu@mit.edu: commit message; fix TGS to catch more error cases]

ticket: 7831 (new)

11 years agoFix typo that broke 'make clean'
Tom Yu [Thu, 16 Jan 2014 20:05:23 +0000 (15:05 -0500)] 
Fix typo that broke 'make clean'

Missing $

(cherry picked from commit 28633f186a943721b6948875ca85a4a34bc87da4)

ticket: 7826
version_fixed: 1.11.5
status: resolved

11 years agoAdd a test program for krb5_copy_context
Tom Yu [Thu, 16 Jan 2014 19:39:53 +0000 (14:39 -0500)] 
Add a test program for krb5_copy_context

This test program isn't completely proof against the kind of mistakes
we've made with krb5_copy_context in the past, but it at least
exercises krb5_copy_context and can detect some kinds of bugs.

(back ported from commit b78c3c8c5025aec870d20472f80d4a652062f921)

ticket: 7826

11 years agoFix krb5_copy_context
Tom Yu [Thu, 16 Jan 2014 19:34:54 +0000 (14:34 -0500)] 
Fix krb5_copy_context

krb5_copy_context has been broken since 1.8 (it broke in r22456)
because k5_copy_etypes crashes on null enctype lists.  Subsequent
additions to the context structure were not reflected in
krb5_copy_context, creating double-free bugs.  Make k5_copy_etypes
handle null input and account for all new fields in krb5_copy_context.
Reported by Arran Cudbard-Bell.

(back ported from commit c452644d91d57d8b05ef396a029e34d0c7a48920)

ticket: 7826 (new)

11 years agoClarify klist -s documentation
Greg Hudson [Tue, 17 Dec 2013 21:56:41 +0000 (16:56 -0500)] 
Clarify klist -s documentation

The documentation for klist -s erroneously suggests that it doesn't
affect the exit status behavior and that it merely checks for the
existence of the ccache (only mentioning the expired ticket check at
the end).  Make it clearer and simpler, but avoid going into a lot of
detail about the nature of the expiration check.

(cherry picked from commit bf1d3c7b0b060be4b3e9e793b633c07e489ac76f)

ticket: 7830 (new)
version_fixed: 1.11.5
status: resolved

11 years agoFix GSS krb5 acceptor acquire_cred error handling
Greg Hudson [Mon, 16 Dec 2013 20:37:56 +0000 (15:37 -0500)] 
Fix GSS krb5 acceptor acquire_cred error handling

When acquiring acceptor creds with a specified name, if we fail to
open a replay cache, we leak the keytab handle.  If there is no
specified name and we discover that there is no content in the keytab,
we leak the keytab handle and return the wrong major code.  Memory
leak reported by Andrea Campi.

(cherry picked from commit decccbcb5075f8fbc28a535a9b337afc84a15dee)

ticket: 7829 (new)
version_fixed: 1.11.5
status: resolved

11 years agoFix memory leak in SPNEGO initiator
Simo Sorce [Fri, 13 Dec 2013 17:00:41 +0000 (12:00 -0500)] 
Fix memory leak in SPNEGO initiator

If we eliminate a mechanism from the initiator list because
gss_init_sec_context fails, free the memory for that mech OID before
removing it from the list.

[ghudson@mit.edu: clarified commit message]

(cherry picked from commit 1cda48a7ed4069cfc052f974ec3d76a9137c8c5a)

ticket: 7828 (new)
version_fixed: 1.11.5
status: resolved

11 years agoFix SPNEGO one-hop interop against old IIS
Greg Hudson [Tue, 10 Dec 2013 17:04:18 +0000 (12:04 -0500)] 
Fix SPNEGO one-hop interop against old IIS

IIS 6.0 and similar return a zero length reponse buffer in the last
SPNEGO packet when context initiation is performed without mutual
authentication.  In this case the underlying Kerberos mechanism has
already completed successfully on the first invocation, and SPNEGO
does not expect a mech response token in the answer.  If we get an
empty mech response token when the mech is complete during
negotiation, ignore it.

[ghudson@mit.edu: small code style and commit message changes]

(cherry picked from commit 37af638b742dbd642eb70092e4f7781c3f69d86d)

ticket: 7827 (new)
version_fixed: 1.11.5
status: resolved

11 years agoAvoid malloc(0) in SPNEGO get_input_token
Greg Hudson [Fri, 6 Dec 2013 23:56:56 +0000 (18:56 -0500)] 
Avoid malloc(0) in SPNEGO get_input_token

If we read a zero-length token in spnego_mech.c's get_input_token(),
set the value pointer to NULL instead of calling malloc(0).

(cherry picked from commit 13fd26e1863c79f616653f6a10a58c01f65fceff)

ticket: 7825 (new)
version_fixed: 1.11.5
status: resolved

11 years agoFix S4U2Self against non-FAST KDCs
Greg Hudson [Fri, 6 Dec 2013 01:32:05 +0000 (20:32 -0500)] 
Fix S4U2Self against non-FAST KDCs

When we added FAST TGS support in 1.11, we broke S4U2Self against KDCs
which don't support FAST, because the S4U2Self padata is only present
within the FAST request.  For now, duplicate that padata in the outer
request so that both FAST and non-FAST KDCs can see it.

(cherry picked from commit 55c3a5f69919c2b5435bac0cb48ab09b11be869c)

ticket: 7824 (new)
version_fixed: 1.11.5
status: resolved

11 years agoTest SPNEGO error message in t_s4u.py
Tom Yu [Thu, 16 Jan 2014 19:31:55 +0000 (14:31 -0500)] 
Test SPNEGO error message in t_s4u.py

Now that #7045 is fixed, we can check for the correct error message
from t_s4u2proxy_krb5 with --spnego.

(back ported from commit 4faca53e3a8ee213d43da8998f6889e7bfd36248)

ticket: 7823
version_fixed: 1.11.5
status: resolved

11 years agoLet SPNEGO display mechanism errors
Simo Sorce [Tue, 17 Dec 2013 21:15:14 +0000 (16:15 -0500)] 
Let SPNEGO display mechanism errors

To avoid potential recursion we use a thread local variable that tells
us whether the ancestor was called via spnego_gss_display_name().  If
we detect recursion, we assume that we returned a com_err code like
ENOMEM and call error_message(); in the worst case that will result in
an "Unknown error" message.

[ghudson@mit.edu: Edited comments and commit message; removed an
unneeded line of code.]

(cherry picked from commit d160bc733a3dbeb6d84f4e175234ff18738d9f66)

ticket: 7823 (new)

11 years agoBetter keysalt docs
Tom Yu [Mon, 9 Dec 2013 20:48:02 +0000 (15:48 -0500)] 
Better keysalt docs

Add a new section to kdc_conf.rst to describe keysalt lists, and
update other documentation to better distinguish enctype lists from
keysalt lists.

(cherry picked from commit 23a75649277afc24a9dfea199689e18129fa390c)

ticket: 7799 (new)
version_fixed: 1.11.5
status: resolved

11 years agoFix error message quotations in install_kdc.rst
Tom Yu [Tue, 3 Dec 2013 19:47:51 +0000 (14:47 -0500)] 
Fix error message quotations in install_kdc.rst

Some error messages that kprop could print were quoted incorrectly in
install_kdc.rst.

Also fix minor typos.

(cherry picked from commit 68d7fcf11553c29a2e0c28a57896fbce4a3ef611)

ticket: 7798 (new)
version_fixed: 1.11.5
status: resolved

11 years agoUpdate doc for current kdb5_util dump version
Tom Yu [Fri, 22 Nov 2013 23:23:52 +0000 (18:23 -0500)] 
Update doc for current kdb5_util dump version

kdb5_util.rst incorrectly describes the current default dump format
version as 6 when it should be 7.  Reported by Jeff D'Angelo.

(cherry picked from commit f0d7309a20665ac16a22856e0c8cffdb156f2d24)

ticket: 7783 (new)
version_fixed: 1.11.5
status: resolved

11 years agoEdit ccache_def.rst
Greg Hudson [Fri, 22 Nov 2013 21:53:35 +0000 (16:53 -0500)] 
Edit ccache_def.rst

Re-fill to 70 columns.  Replace non-ascii apostrophes with ASCII ones.
Edit wording slightly.

(cherry picked from commit 482869d393807d02668cf49ce74666d682cf77a6)

ticket: 7782
version_fixed: 1.11.5
status: resolved

11 years agoAdded a new ccache doc to "Kerberos V5 concepts"
Zhanna Tsitkov [Fri, 22 Nov 2013 19:02:57 +0000 (14:02 -0500)] 
Added a new ccache doc to "Kerberos V5 concepts"

This is to add a short introductory document on credential
caches to the Concepts section of Kerberos documentation.

(cherry picked from commit 251f94621328277044e3ae1a10ecd3ddfdda1dbb)

ticket: 7782 (new)

11 years agoImprove default ccache name API documentation
Tom Yu [Tue, 26 Nov 2013 22:57:51 +0000 (17:57 -0500)] 
Improve default ccache name API documentation

Document the lifetime and caching behavior of the
krb5_cc_default_name() return value.  Document that
krb5_cc_set_default_name() may be called with NULL to purge the cached
value.  Correct a typo in the krb5_cc_default() summary and explicitly
reference krb5_cc_default_name().

(back ported from commit 3e5fe754b9f9742d1c9b1564633d4172277166db)

ticket: 7781 (new)
version_fixed: 1.11.5
status: resolved

11 years agoCorrect kadm5.acl back-reference documentation
Greg Hudson [Thu, 21 Nov 2013 21:22:48 +0000 (16:22 -0500)] 
Correct kadm5.acl back-reference documentation

In kadm5.acl, *N in the target principal name refers to the Nth
wildcard in the acting principal pattern, not the Nth component.

(cherry picked from commit 39bac22ed7f5ff583e92d082b34f0c5a2a3cad4c)

ticket: 7780 (new)
version_fixed: 1.11.5
status: resolved

11 years agoClarify lockout replication issues in docs
Greg Hudson [Mon, 18 Nov 2013 23:59:17 +0000 (18:59 -0500)] 
Clarify lockout replication issues in docs

In the "KDC replication and account lockout" section of lockout.rst,
specifically call out kprop and incremental propagation as the
mechanisms which do not replicate account lockout state, and add a
note that KDCs using LDAP may not be affected by that section's
concerns.

(cherry picked from commit 8eb9e6fe1b01faa875dcf91b618ad4cd7793438a)

ticket: 7779 (new)
version_fixed: 1.11.5
status: resolved

11 years agoRemove dangling --with-kdc-kdb-update references
Tom Yu [Tue, 26 Nov 2013 22:53:52 +0000 (17:53 -0500)] 
Remove dangling --with-kdc-kdb-update references

This configure option hasn't done anything since 1.8, so don't mention
it in configure --help or the documentation.  The disable_last_success
and disable_lockout DB options are now used to turn it off.

(back ported from commit 0b3225d63f50d4e6297be5d751cae1d3368fcdb1)

ticket: 7778 (new)
version_fixed: 1.11.5
status: resolved

11 years agoFix use-before-init in two test programs
Greg Hudson [Fri, 15 Mar 2013 05:57:40 +0000 (01:57 -0400)] 
Fix use-before-init in two test programs

If krb5_init_context fails, use a null context for getting the error
message, not a context we haven't yet initialized.  Observed by David
Benjamin <davidben@mit.edu> using clang.

(cherry picked from commit 525eafc83a0fbe8f215b7749b5774d54468a19d1)

ticket: 7760
version_fixed: 1.11.5
status: resolved

11 years agoClarify realm and dbmodules configuration docs
Greg Hudson [Wed, 6 Nov 2013 18:33:04 +0000 (13:33 -0500)] 
Clarify realm and dbmodules configuration docs

In kdc_conf.rst, add examples showing how to configure a realm
parameter and a database parameter.  Document that the default DB
configuration section is the realm name, and use that in the example.
Move the db_module_dir description to the end of the [dbmodules]
documentation since it is rarely used and could confuse a reader about
the usual structure of the section.

(cherry picked from commit 689d769c10c53bd4fa40e82421c89b96cc86cbae)

ticket: 7762 (new)
version_fixed: 1.11.5
status: resolved

12 years agoUpdate for krb5-1.11.4-postrelease
Tom Yu [Tue, 5 Nov 2013 01:14:17 +0000 (20:14 -0500)] 
Update for krb5-1.11.4-postrelease

12 years agoUpdates for krb5-1.11.4 krb5-1.11.4-final
Tom Yu [Mon, 4 Nov 2013 20:24:40 +0000 (15:24 -0500)] 
Updates for krb5-1.11.4

12 years agoFix reference for trace logging
Tom Yu [Tue, 5 Nov 2013 00:21:29 +0000 (19:21 -0500)] 
Fix reference for trace logging

The documentation change in #7727 depends on missing link target for
the trace logging section in doc/admin/troubleshoot.rst.  Add it.

ticket: 7758 (new)
version_fixed: 1.11.4
status: resolved

12 years agoMulti-realm KDC null deref [CVE-2013-1418]
Tom Yu [Mon, 4 Nov 2013 20:33:09 +0000 (15:33 -0500)] 
Multi-realm KDC null deref [CVE-2013-1418]

If a KDC serves multiple realms, certain requests can cause
setup_server_realm() to dereference a null pointer, crashing the KDC.

CVSSv2: AV:N/AC:M/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C

A related but more minor vulnerability requires authentication to
exploit, and is only present if a third-party KDC database module can
dereference a null pointer under certain conditions.

(back ported from commit 5d2d9a1abe46a2c1a8614d4672d08d9d30a5f8bf)

ticket: 7756 (new)
version_fixed: 1.11.4
status: resolved

12 years agoClarify kpropd standalone mode documentation
Greg Hudson [Wed, 30 Oct 2013 22:22:00 +0000 (18:22 -0400)] 
Clarify kpropd standalone mode documentation

The kpropd -S option is no longer needed to run kpropd in standalone
mode, but its functionality is not deprecated; standalone mode is
automatically activated when appropriate.  Clarify the kpropd
documentation on standalone mode to avoid giving the impression that
the mode is deprecated.

(cherry picked from commit bfec0671ca6df811453d46a2f47afc7168b980fc)

ticket: 7752 (new)
version_fixed: 1.11.4
status: resolved

12 years agoDocument master key rollover
Greg Hudson [Fri, 25 Oct 2013 16:30:48 +0000 (12:30 -0400)] 
Document master key rollover

Add a new section to database.rst documenting the procedure for
rolling the master key.

(cherry picked from commit e4b5d426a1e1e00367cc44a9619535ab71b20393)

ticket: 7748 (new)
version_fixed: 1.11.4
status: resolved

12 years agoImprove LDAP KDB initialization error messages
Greg Hudson [Mon, 28 Oct 2013 15:23:11 +0000 (11:23 -0400)] 
Improve LDAP KDB initialization error messages

In krb5_ldap_initialize, don't just blat the LDAP error into the
extended message; give an indication of which LDAP operation we were
trying to do and show what parameters we gave to it.

(Also, krb5_set_error_message can handle a null context argument, so
don't bother to check before calling.)

(cherry picked from commit 5a77bb85294f37d1dfa4c7faedfdfb0d7faaf8dc)

ticket: 7747 (new)
version_fixed: 1.11.4
status: resolved

12 years agoFix decoding of mkey kvno in mkey_aux tl-data
Greg Hudson [Sun, 27 Oct 2013 00:17:10 +0000 (20:17 -0400)] 
Fix decoding of mkey kvno in mkey_aux tl-data

krb5_dbe_lookup_mkey_aux was decoding a 16-bit value directly into an
int, resulting in the wrong value on big-endian platforms.  The
consequences are mostly invisible because we ignore this field and try
all mkey_aux nodes in krb5_def_fetch_mkey_list.

(cherry picked from commit 64ec2941af1561ef06e7e885b2ffb65a675516ce)

ticket: 7746 (new)
version_fixed: 1.11.4
status: resolved

12 years agoReset key-generation parameters for each enctype
Ben Kaduk [Fri, 25 Oct 2013 18:00:29 +0000 (14:00 -0400)] 
Reset key-generation parameters for each enctype

In add_key_pwd, initialize s2k_params to NULL inside the loop over
enctypes instead of outside the loop, so that if the afs3 salt type
is used it does not contaminate later enctype/salt pairs in the list.

(cherry picked from commit 381cf01afb13ad28de0927de37f8e1d12749bf49)

ticket: 7742 (new)
version_fixed: 1.11.4
status: resolved

12 years agoCorrectly activate master keys in pre-1.7 KDBs
Greg Hudson [Thu, 24 Oct 2013 16:51:18 +0000 (12:51 -0400)] 
Correctly activate master keys in pre-1.7 KDBs

Starting with 1.7, databases are created with actkvno tl-data in the
K/M entry which gives the initial master key version an activation
time of 0.  A database created before 1.7 will not have this tl-data,
but we should behave in the same way as we do for a more recent
database.

Move the actkvno list synthesis code from krb5_dbe_fetch_act_key_list
to krb5_dbe_lookup_actkvno so it applies to kdb5_util commands as well
as libkadm5.  Synthesize the same list as we would have initialized
the KDB with, with an activation time of 0 for the earliest master
key.

(cherry picked from commit ec560fac83912abaa15fb158101c8174497081c5)

ticket: 7737 (new)
version_fixed: 1.11.4
status: resolved

12 years agoUse active master key in update_princ_encryption
Greg Hudson [Wed, 23 Oct 2013 15:55:19 +0000 (11:55 -0400)] 
Use active master key in update_princ_encryption

kdb5_util update_princ_encryption should update to the active master
key version, not the most recent.

(cherry picked from commit 4ccc18bc3ddc49d0fd0d2de00ec91c0fa44c53a8)

ticket: 7735 (new)
version_fixed: 1.11.4
status: resolved

12 years agoFix typos in kdb5_util master key command outputs
Greg Hudson [Mon, 21 Oct 2013 20:46:15 +0000 (16:46 -0400)] 
Fix typos in kdb5_util master key command outputs

kdb5_util list_mkeys was beginning lines with "KNVO" instead of
"KVNO".  kdb5_util purge_mkeys was displaying "follwing" instead of
"following" for both dry-run and normal cases.

(cherry picked from commit 7fee58ccadf1b61eec9a8c62f47dac43986e2ad1)

ticket: 7734 (new)
version_fixed: 1.11.4
status: resolved

12 years agoDiscuss cert expiry, no-key princs in PKINIT docs
Greg Hudson [Mon, 14 Oct 2013 22:14:00 +0000 (18:14 -0400)] 
Discuss cert expiry, no-key princs in PKINIT docs

In pkinit.rst, add "-days" options to the example commands for
creating certificate and briefly discuss the issue of expiration dates
so that the administrator thinks about it.  In troubleshoot.rst, add
an entry for the "certificate has expired" error which results from
PKINIT (when linked with OpenSSL) when a certificate has expired.

(cherry picked from commit f3977b6883f0172a2af9006522a1b35546f86749)

ticket: 7727 (new)
version_fixed: 1.11.4
status: resolved

12 years agoUse protocol error for PKINIT cert expiry
Greg Hudson [Mon, 14 Oct 2013 21:02:31 +0000 (17:02 -0400)] 
Use protocol error for PKINIT cert expiry

If we fail to create a cert chain in cms_signeddata_create(), return
KRB5KDC_ERR_PREAUTH_FAILED, which corresponds to a protocol code,
rather than KRB5_PREAUTH_FAILED, which doesn't.  This is also more
consistent with other error clauses in the same function.

(cherry picked from commit cd59782cb32b79e4001a86b0fe47af8b6275ef0c)

ticket: 7726 (new)
version_fixed: 1.11.4
status: resolved

12 years agoChange KRB5KDC_ERR_NO_ACCEPTABLE_KDF to 100
Greg Hudson [Wed, 9 Oct 2013 17:37:17 +0000 (13:37 -0400)] 
Change KRB5KDC_ERR_NO_ACCEPTABLE_KDF to 100

draft-ietf-krb-wg-pkinit-alg-agility-07 specifies
KDC_ERR_NO_ACCEPTABLE_KDF as 82, but this value conflicts with
KRB_AP_ERR_PRINCIPAL_UNKNOWN from RFC 6111.  The former value has been
reassigned to 100 to fix the conflict.  Use the correct value.

We believe that this error won't crop up in practice for a long time
(when SHA-2 has been superceded by other hash algorithms and people
are desupporting it), by which time implementations will mostly have
been upgraded to use the new value.

(cherry picked from commit 2938851a5ec77ab68bcd1f5cfd07991c7ccabea6)

ticket: 7724 (new)
version_fixed: 1.11.4
status: resolved

12 years agoFix GSSAPI krb5 cred ccache import
Tom Yu [Thu, 17 Oct 2013 22:20:37 +0000 (18:20 -0400)] 
Fix GSSAPI krb5 cred ccache import

json_to_ccache was incorrectly indexing the JSON array when restoring
a memory ccache.  Fix it.

Add test coverage for a multi-cred ccache by exporting/importing the
synthesized S4U2Proxy delegated cred in t_s4u2proxy_krb5.c; move
export_import_cred from t_export_cred.c to common.c to facilitate
this.  Make a note in t_export_cred.py that this case is covered in
t_s4u.py.

(cherry picked from commit 48dd01f29b893a958a64dcf6eb0b734e8463425b)

ticket: 7723 (new)
version_fixed: 1.11.4
status: resolved

12 years agoDon't warn or error on variadic macros
Greg Hudson [Sat, 25 May 2013 18:35:41 +0000 (14:35 -0400)] 
Don't warn or error on variadic macros

Our portability assumptions now allow the use of variadic macros, so
don't warn or error on them.

(cherry picked from commit d211001ba17fddfb952beb00118dc5c7e598355e)

ticket: 7702
version_fixed: 1.11.4
status: resolved

12 years agoAdd test case for CVE-2013-1417
Tom Yu [Tue, 2 Jul 2013 02:20:41 +0000 (22:20 -0400)] 
Add test case for CVE-2013-1417

(back ported from commit f3328214a01fe9ca4de72cb9593ee10c39c638e9)

ticket: 7670
version_fixed: 1.11.4
status: resolved

12 years agoKDC null deref due to referrals [CVE-2013-1417]
Tom Yu [Fri, 21 Jun 2013 21:58:25 +0000 (17:58 -0400)] 
KDC null deref due to referrals [CVE-2013-1417]

An authenticated remote client can cause a KDC to crash by making a
valid TGS-REQ to a KDC serving a realm with a single-component name.
The process_tgs_req() function dereferences a null pointer because an
unusual failure condition causes a helper function to return success.

While attempting to provide cross-realm referrals for host-based
service principals, the find_referral_tgs() function could return a
TGS principal for a zero-length realm name (indicating that the
hostname in the service principal has no known realm associated with
it).

Subsequently, the find_alternate_tgs() function would attempt to
construct a path to this empty-string realm, and return success along
with a null pointer in its output parameter.  This happens because
krb5_walk_realm_tree() returns a list of length one when it attempts
to construct a transit path between a single-component realm and the
empty-string realm.  This list causes a loop in find_alternate_tgs()
to iterate over zero elements, resulting in the unexpected output of a
null pointer, which process_tgs_req() proceeds to dereference because
there is no error condition.

Add an error condition to find_referral_tgs() when
krb5_get_host_realm() returns an empty realm name.  Also add an error
condition to find_alternate_tgs() to handle the length-one output from
krb5_walk_realm_tree().

The vulnerable configuration is not likely to arise in practice.
(Realm names that have a single component are likely to be test
realms.)  Releases prior to krb5-1.11 are not vulnerable.

Thanks to Sol Jerome for reporting this problem.

CVSSv2: AV:N/AC:M/Au:S/C:N/I:N/A:P/E:H/RL:O/RC:C

(cherry picked from commit 3c7f1c21ffaaf6c90f1045f0f5440303c766acc0)

ticket: 7668
version_fixed: 1.11.4
status: resolved

12 years agoInstall ccselect_plugin.h
Tom Yu [Mon, 1 Jul 2013 19:34:36 +0000 (15:34 -0400)] 
Install ccselect_plugin.h

The ccselect pluggable interface was added in release 1.10, but we
neglected to install its header file.

(back ported from commit a1933d02c87e9d78ddbc586d460028aabbd747cb)

ticket: 7671
version_fixed: 1.11.4
status: resolved

12 years agoFix spin loop reading from KDC TCP socket
Tom Yu [Mon, 1 Jul 2013 19:18:33 +0000 (15:18 -0400)] 
Fix spin loop reading from KDC TCP socket

In the k5_sendto code for reading from a TCP socket, detect
end-of-stream when reading the length.  Otherwise we can get stuck in
an infinite loop of poll() and read().

[ghudson@mit.edu: commit message]

(back ported from commit 53e5c850e05f011e9e7f25c2032aec51d8b352a9)

ticket: 7508
version_fixed: 1.11.4
status: resolved

12 years agoBuild with Visual Studio 2012
Ben Kaduk [Mon, 24 Jun 2013 22:19:45 +0000 (18:19 -0400)] 
Build with Visual Studio 2012

It's more aggressive about enforcing that keywords are not macros
in C++ mode, and has bumped the MFC version to 11.

Keep compatibility with older versions of Visual Studio, appropriately
conditionalized.

(cherry picked from commit 7bca89626e53f258397818a9b0d838a0a3e00f5b)

ticket: 7664
version_fixed: 1.11.4
status: resolved

12 years agoProperly handle use_master in k5_init_creds_get
Greg Hudson [Thu, 30 May 2013 15:39:54 +0000 (11:39 -0400)] 
Properly handle use_master in k5_init_creds_get

If we make multiple requests in an initial creds exchange, the
krb5_sendto_kdc call in k5_init_creds_get may flip the use_master
value from 0 to 1 if it detects that the response was from a master
KDC.  Don't turn this into a requirement for future requests during
the same exchange, or we may have trouble following AS referrals.
Reported by Sumit Bose.

(cherry picked from commit a12a5ddb9b932061bad7b83df058c7c6e2e4b044)

ticket: 7650
version_fixed: 1.11.4
status: resolved

12 years agoUpdate for krb5-1.11.3-postrelease
Tom Yu [Mon, 3 Jun 2013 21:49:05 +0000 (17:49 -0400)] 
Update for krb5-1.11.3-postrelease

12 years agoUpdates for krb5-1.11.3 krb5-1.11.3-final
Tom Yu [Fri, 31 May 2013 21:50:55 +0000 (17:50 -0400)] 
Updates for krb5-1.11.3

12 years agoClean up dangling antecedent in allow_weak_crypto
Ben Kaduk [Fri, 31 May 2013 16:48:46 +0000 (12:48 -0400)] 
Clean up dangling antecedent in allow_weak_crypto

The "previous three lists" are not previous any more.
Say explicitly which three lists, and make the parenthetical bind
to the correct noun.

(cherry picked from commit 2a10e19e19c65af0e3890bdeae03c37089ef02ea)

ticket: 7655
version_fixed: 1.11.3
status: resolved

12 years agoClarify retiring-des based on user feedback
Ben Kaduk [Fri, 31 May 2013 16:40:10 +0000 (12:40 -0400)] 
Clarify retiring-des based on user feedback

Explain why DES keys should be removed from principals, and clarify
that allow_weak_crypto overrides all other configuration.

(cherry picked from commit fa6de1bf73926751a2f68bff31ef020eb7db9260)

ticket: 7654
version_fixed: 1.11.3
status: resolved

12 years agoDocument preauth flags for service principals
Ben Kaduk [Thu, 30 May 2013 22:49:36 +0000 (18:49 -0400)] 
Document preauth flags for service principals

These flags are overloaded to mean different things for clients and
servers; previously we only documented the client behavior.

(cherry picked from commit 7425e9b69566c241c54eb2686fb37f216122423f)

ticket: 7653
version_fixed: 1.11.3
status: resolved

12 years agoClarify krb5_rd_req documentation
Greg Hudson [Wed, 22 May 2013 05:55:12 +0000 (01:55 -0400)] 
Clarify krb5_rd_req documentation

For the user-to-user case, document that callers should pass a server
principal to krb5_rd_req.  For the keytab case, more accurately
document which keytab keys are tried against the ticket.

(cherry picked from commit 98aa233e18245981b491affe5fa70623cb83b705)

ticket: 7641
version_fixed: 1.11.3
status: resolved

12 years agoFix transited handling for GSSAPI acceptors
Greg Hudson [Mon, 20 May 2013 15:03:04 +0000 (11:03 -0400)] 
Fix transited handling for GSSAPI acceptors

The Acceptor Names project (#6855) extended krb5_rd_req so that it can
accept a "matching principal" in the server parameter.  If the
matching principal has an empty realm, rd_req_decoded_opt attempted to
do transited checking with an empty server realm.

To fix this, always reset server to req->ticket->server for future
processing steps if we decrypt the ticket using a keytab.
decrypt_ticket replaces req->ticket->server with the principal name
from the keytab entry, so we know this name is correct.

Based on a bug report and patch from nalin@redhat.com.

(cherry picked from commit 57acee11b5c6682a7f4f036e35d8b2fc9292875e)

ticket: 7639
version_fixed: 1.11.3
status: resolved

12 years agoClarify that kdc.conf and krb5.conf are merged
Ben Kaduk [Mon, 20 May 2013 17:04:32 +0000 (13:04 -0400)] 
Clarify that kdc.conf and krb5.conf are merged

These two files are merged into the profile for KDC applications

(cherry picked from commit e818d27a372d021bc6025e7bce867ed06a8fc1ad)

ticket: 7460
version_fixed: 1.11.3
status: resolved

12 years agoClean up python bytecode from doc build
Ben Kaduk [Tue, 2 Apr 2013 16:03:40 +0000 (12:03 -0400)] 
Clean up python bytecode from doc build

Otherwise they escape into the release tarball.

(cherry picked from commit 424bed7b2943e0bc32a3feab4c55a4ea056bfa21)

ticket: 7644
version_fixed: 1.11.3
status: resolved

12 years agoRename internal Camellia symbols
Greg Hudson [Tue, 14 May 2013 02:59:35 +0000 (22:59 -0400)] 
Rename internal Camellia symbols

Symbols from the NTT Camellia sources, used in the builtin crypto
provider, could conflict with symbols from other libraries such as
OpenSSL's libcrypto.  Rename those like we rename the Gladman AES
symbols.

(cherry picked from commit 19c9cc879c6fdc9420d3d9e9fb3affbb692668b9)

ticket: 7626
version_fixed: 1.11.3
status: resolved

12 years agoFix kpasswd UDP ping-pong [CVE-2002-2443]
Tom Yu [Fri, 3 May 2013 20:26:46 +0000 (16:26 -0400)] 
Fix kpasswd UDP ping-pong [CVE-2002-2443]

The kpasswd service provided by kadmind was vulnerable to a UDP
"ping-pong" attack [CVE-2002-2443].  Don't respond to packets unless
they pass some basic validation, and don't respond to our own error
packets.

Some authors use CVE-1999-0103 to refer to the kpasswd UDP ping-pong
attack or UDP ping-pong attacks in general, but there is discussion
leading toward narrowing the definition of CVE-1999-0103 to the echo,
chargen, or other similar built-in inetd services.

Thanks to Vincent Danen for alerting us to this issue.

CVSSv2: AV:N/AC:L/Au:N/C:N/I:N/A:P/E:P/RL:O/RC:C

(cherry picked from commit cf1a0c411b2668c57c41e9c4efd15ba17b6b322c)

ticket: 7637
version_fixed: 1.11.3
status: resolved

12 years agoSet msg_type when decoding FAST requests
Greg Hudson [Fri, 12 Apr 2013 20:28:14 +0000 (16:28 -0400)] 
Set msg_type when decoding FAST requests

An RFC 6113 KrbFastReq contains a padata sequence and a KDC-REQ-BODY,
neither of which contain the msg-type field found in a KDC-REQ.  So
when we decode the FAST request, the resulting krb5_kdc_req structure
has a msg_type of 0.  Copy msg_type from the outer body, since we make
use of it in further KDC processing.

(cherry picked from commit 3a447c5a8c95758501cf5a20c161a2d735a02f6d)

ticket: 7605
version_fixed: 1.11.3
status: resolved

12 years agoAllow config of dh_min_bits < 2048
Tom Yu [Wed, 10 Apr 2013 03:47:54 +0000 (23:47 -0400)] 
Allow config of dh_min_bits < 2048

Allow configuration to override the default dh_min_bits of 2048 to
1024.  Disallow configuration of dh_min_bits < 1024, but continue to
default to 2048.

(cherry picked from commit cae44d2d014985022a001924dce4a56d12c63818)

ticket: 7602
version_fixed: 1.11.3
status: resolved

12 years agoIgnore missing Q in dh_params
Tom Yu [Thu, 28 Mar 2013 23:09:04 +0000 (19:09 -0400)] 
Ignore missing Q in dh_params

Some implementations don't send the required Q value in dh_params, so
allow it to be absent.

(cherry picked from commit ed77a25c53ed6afd41372838f205a98a561a89fb)

ticket: 7596
version_fixed: 1.11.3
status: resolved