<feed xmlns='http://www.w3.org/2005/Atom'>
<title>krb5.git, branch kinit-c</title>
<subtitle>MIT Kerberos patches</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/krb5.git/'/>
<entry>
<title>Do not loop on principal unknown errors</title>
<updated>2015-01-20T19:27:06+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2015-01-20T18:48:34+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/krb5.git/commit/?id=fa32f6c018e8894ece11c0d32d5f666644239ca2'/>
<id>fa32f6c018e8894ece11c0d32d5f666644239ca2</id>
<content type='text'>
If the canonicalize flag is set, the MIT KDC always return the client
principal when KRB5_KDC_ERR_C_PRICIPAL_UNKNOWN is returned.

Check that this is really a referral by testing that the returned
client realm differs from the requested one.

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the canonicalize flag is set, the MIT KDC always return the client
principal when KRB5_KDC_ERR_C_PRICIPAL_UNKNOWN is returned.

Check that this is really a referral by testing that the returned
client realm differs from the requested one.

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Check for null *iter_p in profile_iterator()</title>
<updated>2015-01-15T16:47:43+00:00</updated>
<author>
<name>Greg Hudson</name>
<email>ghudson@mit.edu</email>
</author>
<published>2015-01-14T18:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/krb5.git/commit/?id=9a343200d305e7c8df6e556d63afaee42194175f'/>
<id>9a343200d305e7c8df6e556d63afaee42194175f</id>
<content type='text'>
In profile_iterator(), return PROF_MAGIC_ITERATOR if *iter_p is NULL,
instead of dereferencing a null pointer, as we did prior to 1.10.
Correct calling code will not trigger this case, but incorrect code
has been reported in the field.

ticket: 8059 (new)
target_version: 1.13.1
tags: pullup
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In profile_iterator(), return PROF_MAGIC_ITERATOR if *iter_p is NULL,
instead of dereferencing a null pointer, as we did prior to 1.10.
Correct calling code will not trigger this case, but incorrect code
has been reported in the field.

ticket: 8059 (new)
target_version: 1.13.1
tags: pullup
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix OTP tests with pyrad 2.x</title>
<updated>2015-01-04T23:25:28+00:00</updated>
<author>
<name>Greg Hudson</name>
<email>ghudson@mit.edu</email>
</author>
<published>2014-12-22T23:37:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/krb5.git/commit/?id=57dc24093015d292189ef23313ef8ff2a81431e4'/>
<id>57dc24093015d292189ef23313ef8ff2a81431e4</id>
<content type='text'>
Declare User-Password as having type "octets" instead of "string" or
pyrad 2.x will throw a decoding error when retrieving it.

ticket: 8053 (new)
target_version: 1.13.1
tags: pullup
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Declare User-Password as having type "octets" instead of "string" or
pyrad 2.x will throw a decoding error when retrieving it.

ticket: 8053 (new)
target_version: 1.13.1
tags: pullup
</pre>
</div>
</content>
</entry>
<entry>
<title>Include file ccache name in error messages</title>
<updated>2014-12-15T22:33:46+00:00</updated>
<author>
<name>Nicolas Williams</name>
<email>nico@cryptonector.com</email>
</author>
<published>2014-10-30T00:42:49+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/krb5.git/commit/?id=98b55e86d7ec8b0a3b9b9f9b415ffdf78f4fd2e8'/>
<id>98b55e86d7ec8b0a3b9b9f9b415ffdf78f4fd2e8</id>
<content type='text'>
When a FILE ccache method returns an error, append the filename to the
standard message for the code.  Remove code to set extended messages
in helper functions as they would just be overwritten.

Also change the interpretation of errno values.  Treat ENAMETOOLONG as
KRB5_FCC_NOFILE instead of KRB5_FCC_INTERNAL, since it has an external
cause and a name that long can't be opened by normal means.  Treat
EROFS as KRB5_FCC_PERM.  Treat ENOTDIR and ELOOP as KRB5_FCC_NOFILE
instead of KRB5_FCC_PERM as both errors imply that the full pathname
doesn't exist.  Treat EBUSY and ETXTBSY as KRB5_CC_IO instead of
KRB5_FCC_PERM as they indicate a conflict rather than a permission
issue.

[ghudson@mit.edu: renamed set_error to set_errmsg_filename; removed
now-inoperative code to set extended messages in helper functions;
trimmed changes to interpret_errno; clarified and shortened commit
message]

ticket: 8052 (new)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a FILE ccache method returns an error, append the filename to the
standard message for the code.  Remove code to set extended messages
in helper functions as they would just be overwritten.

Also change the interpretation of errno values.  Treat ENAMETOOLONG as
KRB5_FCC_NOFILE instead of KRB5_FCC_INTERNAL, since it has an external
cause and a name that long can't be opened by normal means.  Treat
EROFS as KRB5_FCC_PERM.  Treat ENOTDIR and ELOOP as KRB5_FCC_NOFILE
instead of KRB5_FCC_PERM as both errors imply that the full pathname
doesn't exist.  Treat EBUSY and ETXTBSY as KRB5_CC_IO instead of
KRB5_FCC_PERM as they indicate a conflict rather than a permission
issue.

[ghudson@mit.edu: renamed set_error to set_errmsg_filename; removed
now-inoperative code to set extended messages in helper functions;
trimmed changes to interpret_errno; clarified and shortened commit
message]

ticket: 8052 (new)
</pre>
</div>
</content>
</entry>
<entry>
<title>Use OFD locks where available</title>
<updated>2014-12-15T20:22:39+00:00</updated>
<author>
<name>Greg Hudson</name>
<email>ghudson@mit.edu</email>
</author>
<published>2014-10-07T16:12:11+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/krb5.git/commit/?id=0008014a748310e38b3e4d69e3227af935e86cf7'/>
<id>0008014a748310e38b3e4d69e3227af935e86cf7</id>
<content type='text'>
Linux 3.15 has added OFD locks, which contend with POSIX file locks
but are owned by the open file description instead of the process.
Use these in krb5_lock_file where available, for safer concurrency
behavior.

ticket: 8023 (new)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Linux 3.15 has added OFD locks, which contend with POSIX file locks
but are owned by the open file description instead of the process.
Use these in krb5_lock_file where available, for safer concurrency
behavior.

ticket: 8023 (new)
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct spelling</title>
<updated>2014-12-15T20:03:16+00:00</updated>
<author>
<name>Ben Kaduk</name>
<email>kaduk@mit.edu</email>
</author>
<published>2014-12-08T21:43:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/krb5.git/commit/?id=fff8e4817c2f20e923acd87a3085842f43edf192'/>
<id>fff8e4817c2f20e923acd87a3085842f43edf192</id>
<content type='text'>
Remove extra 'i' from "create_standalone_prinicipal".  While here,
pick a slightly shorter name for the variable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove extra 'i' from "create_standalone_prinicipal".  While here,
pick a slightly shorter name for the variable.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add helper for freeing arrays of berval pointers</title>
<updated>2014-12-15T20:03:16+00:00</updated>
<author>
<name>Ben Kaduk</name>
<email>kaduk@mit.edu</email>
</author>
<published>2014-12-06T02:18:38+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/krb5.git/commit/?id=e316b24a2ac3d0b13fe50b37773f51441c63396e'/>
<id>e316b24a2ac3d0b13fe50b37773f51441c63396e</id>
<content type='text'>
This eliminates a potential leak of the bv_val members from
krb5_encode_krbsecretkey().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This eliminates a potential leak of the bv_val members from
krb5_encode_krbsecretkey().
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove some dead code</title>
<updated>2014-12-15T20:03:16+00:00</updated>
<author>
<name>Ben Kaduk</name>
<email>kaduk@mit.edu</email>
</author>
<published>2014-11-19T17:09:55+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/krb5.git/commit/?id=fb0827e065763821ed1c6c205f15189b1c70bc2a'/>
<id>fb0827e065763821ed1c6c205f15189b1c70bc2a</id>
<content type='text'>
The secretkey variable is initialized to NULL and compared against
NULL, but never actually set to anything after initialization.

Remove the variable and all code that would have executed if it
was non-NULL.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The secretkey variable is initialized to NULL and compared against
NULL, but never actually set to anything after initialization.

Remove the variable and all code that would have executed if it
was non-NULL.
</pre>
</div>
</content>
</entry>
<entry>
<title>Regression tests for keyless principals</title>
<updated>2014-12-15T20:03:16+00:00</updated>
<author>
<name>Ben Kaduk</name>
<email>kaduk@mit.edu</email>
</author>
<published>2014-11-21T19:00:20+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/krb5.git/commit/?id=71201ced154fd3d1a87358ebdaf209d24885ed13'/>
<id>71201ced154fd3d1a87358ebdaf209d24885ed13</id>
<content type='text'>
Confirm that kadmind does not crash when creating/modifying a principal
to have no keys, and confirm that no keys are present after a
purgekeys -all.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Confirm that kadmind does not crash when creating/modifying a principal
to have no keys, and confirm that no keys are present after a
purgekeys -all.
</pre>
</div>
</content>
</entry>
<entry>
<title>Support keyless principals in LDAP [CVE-2014-5354]</title>
<updated>2014-12-15T20:03:16+00:00</updated>
<author>
<name>Ben Kaduk</name>
<email>kaduk@mit.edu</email>
</author>
<published>2014-11-19T17:04:46+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/krb5.git/commit/?id=04038bf3633c4b909b5ded3072dc88c8c419bf16'/>
<id>04038bf3633c4b909b5ded3072dc88c8c419bf16</id>
<content type='text'>
Operations like "kadmin -q 'addprinc -nokey foo'" or
"kadmin -q 'purgekeys -all foo'" result in principal entries with
no keys present, so krb5_encode_krbsecretkey() would just return
NULL, which then got unconditionally dereferenced in
krb5_add_ber_mem_ldap_mod().

Apply some fixes to krb5_encode_krbsecretkey() to handle zero-key
principals better, correct the test for an allocation failure, and
slightly restructure the cleanup handler to be shorter and more
appropriate for the usage.  Once it no longer short-circuits when
n_key_data is zero, it will produce an array of length two with both
entries NULL, which is treated as an empty list by the LDAP library,
the correct behavior for a keyless principal.

However, attributes with empty values are only handled by the LDAP
library for Modify operations, not Add operations (which only get
a sequence of Attribute, with no operation field).  Therefore, only
add an empty krbprincipalkey to the modlist when we will be performing a
Modify, and not when we will be performing an Add, which is conditional
on the (misspelled) create_standalone_prinicipal boolean.

CVE-2014-5354:

In MIT krb5, when kadmind is configured to use LDAP for the KDC
database, an authenticated remote attacker can cause a NULL
dereference by inserting into the database a principal entry which
contains no long-term keys.

In order for the LDAP KDC backend to translate a principal entry
from the database abstraction layer into the form expected by the
LDAP schema, the principal's keys are encoded into a
NULL-terminated array of length-value entries to be stored in the
LDAP database.  However, the subroutine which produced this array
did not correctly handle the case where no keys were present,
returning NULL instead of an empty array, and the array was
unconditionally dereferenced while adding to the list of LDAP
operations to perform.

Versions of MIT krb5 prior to 1.12 did not expose a way for
principal entries to have no long-term key material, and
therefore are not vulnerable.

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

ticket: 8041 (new)
tags: pullup
target_version: 1.13.1
subject: kadmind with ldap backend crashes when putting keyless entries
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Operations like "kadmin -q 'addprinc -nokey foo'" or
"kadmin -q 'purgekeys -all foo'" result in principal entries with
no keys present, so krb5_encode_krbsecretkey() would just return
NULL, which then got unconditionally dereferenced in
krb5_add_ber_mem_ldap_mod().

Apply some fixes to krb5_encode_krbsecretkey() to handle zero-key
principals better, correct the test for an allocation failure, and
slightly restructure the cleanup handler to be shorter and more
appropriate for the usage.  Once it no longer short-circuits when
n_key_data is zero, it will produce an array of length two with both
entries NULL, which is treated as an empty list by the LDAP library,
the correct behavior for a keyless principal.

However, attributes with empty values are only handled by the LDAP
library for Modify operations, not Add operations (which only get
a sequence of Attribute, with no operation field).  Therefore, only
add an empty krbprincipalkey to the modlist when we will be performing a
Modify, and not when we will be performing an Add, which is conditional
on the (misspelled) create_standalone_prinicipal boolean.

CVE-2014-5354:

In MIT krb5, when kadmind is configured to use LDAP for the KDC
database, an authenticated remote attacker can cause a NULL
dereference by inserting into the database a principal entry which
contains no long-term keys.

In order for the LDAP KDC backend to translate a principal entry
from the database abstraction layer into the form expected by the
LDAP schema, the principal's keys are encoded into a
NULL-terminated array of length-value entries to be stored in the
LDAP database.  However, the subroutine which produced this array
did not correctly handle the case where no keys were present,
returning NULL instead of an empty array, and the array was
unconditionally dereferenced while adding to the list of LDAP
operations to perform.

Versions of MIT krb5 prior to 1.12 did not expose a way for
principal entries to have no long-term key material, and
therefore are not vulnerable.

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

ticket: 8041 (new)
tags: pullup
target_version: 1.13.1
subject: kadmind with ldap backend crashes when putting keyless entries
</pre>
</div>
</content>
</entry>
</feed>
