<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/krb5.git/src/tests, branch master</title>
<subtitle>github.com: krb5/krb5
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/krb5.git/'/>
<entry>
<title>Add pac_privsvr_enctype string attribute</title>
<updated>2023-03-27T18:25:56+00:00</updated>
<author>
<name>Greg Hudson</name>
<email>ghudson@mit.edu</email>
</author>
<published>2023-03-21T04:51:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/krb5.git/commit/?id=5af907156f8f502bbe268f0c62274f88a61261e4'/>
<id>5af907156f8f502bbe268f0c62274f88a61261e4</id>
<content type='text'>
The KDC uses the first local TGT key for the privsvr and full PAC
checksums.  If this key is of an aes-sha2 enctype in a cross-realm
TGT, a Microsoft KDC in the target realm may reject the ticket because
it has an unexpectedly large privsvr checksum buffer.  This behavior
is unnecessarily picky as the target realm KDC cannot and does not
need to very the privsvr checksum, but [MS-PAC] 2.8.2 does limit the
checksum key to three specific enctypes.

As a workaround, add a string attribute which can force the privsvr
key to use a specified enctype using key derivation when issuing
tickets to that principal.  This attribute can be set on cross-realm
TGT entries when the target realm uses Active Directory and the local
TGT uses an aes-sha2 primary key.

ticket: 9089 (new)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The KDC uses the first local TGT key for the privsvr and full PAC
checksums.  If this key is of an aes-sha2 enctype in a cross-realm
TGT, a Microsoft KDC in the target realm may reject the ticket because
it has an unexpectedly large privsvr checksum buffer.  This behavior
is unnecessarily picky as the target realm KDC cannot and does not
need to very the privsvr checksum, but [MS-PAC] 2.8.2 does limit the
checksum key to three specific enctypes.

As a workaround, add a string attribute which can force the privsvr
key to use a specified enctype using key derivation when issuing
tickets to that principal.  This attribute can be set on cross-realm
TGT entries when the target realm uses Active Directory and the local
TGT uses an aes-sha2 primary key.

ticket: 9089 (new)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add margin to expired tickets in test suite</title>
<updated>2023-02-01T07:41:34+00:00</updated>
<author>
<name>Greg Hudson</name>
<email>ghudson@mit.edu</email>
</author>
<published>2023-01-28T01:13:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/krb5.git/commit/?id=6ecf843bf1e8653c988d2eddba56613f79abe05c'/>
<id>6ecf843bf1e8653c988d2eddba56613f79abe05c</id>
<content type='text'>
Very occasionally a test using expired tickets will fail because the
ticket isn't seen as expired.  Obtain tickets with a longer expiration
margin to avoid these failures.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Very occasionally a test using expired tickets will fail because the
ticket isn't seen as expired.  Obtain tickets with a longer expiration
margin to avoid these failures.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add PAC full checksums</title>
<updated>2023-01-24T07:42:58+00:00</updated>
<author>
<name>Greg Hudson</name>
<email>ghudson@mit.edu</email>
</author>
<published>2022-12-22T08:05:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/krb5.git/commit/?id=4602a10dbe380d75d1ec00f7d34479ac9d503735'/>
<id>4602a10dbe380d75d1ec00f7d34479ac9d503735</id>
<content type='text'>
A paper by Tom Tervoort noted that computing the PAC privsvr checksum
over only the server checksum is vulnerable to collision attacks
(CVE-2022-37967).  In response, Microsoft has added a second KDC
checksum over the full contents of the PAC.  Generate and verify full
KDC checksums in PACs for service tickets.  Update the t_pac.c ticket
test case to use a ticket issued by a recent version of Active
Directory (provided by Stefan Metzmacher).

ticket: 9084 (new)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A paper by Tom Tervoort noted that computing the PAC privsvr checksum
over only the server checksum is vulnerable to collision attacks
(CVE-2022-37967).  In response, Microsoft has added a second KDC
checksum over the full contents of the PAC.  Generate and verify full
KDC checksums in PACs for service tickets.  Update the t_pac.c ticket
test case to use a ticket issued by a recent version of Active
Directory (provided by Stefan Metzmacher).

ticket: 9084 (new)
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't issue session keys with deprecated enctypes</title>
<updated>2023-01-23T23:41:42+00:00</updated>
<author>
<name>Greg Hudson</name>
<email>ghudson@mit.edu</email>
</author>
<published>2022-12-16T23:31:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/krb5.git/commit/?id=1b57a4d134bbd0e7c52d5885a92eccc815726463'/>
<id>1b57a4d134bbd0e7c52d5885a92eccc815726463</id>
<content type='text'>
A paper by Tom Tervoort noted that rc4-hmac pre-hashes the input for
its checksum and GSS operations before applying HMAC, and is therefore
potentially vulnerable to hash collision attacks if a protocol
contains a restricted signing oracle.

In light of these potential attacks, begin the functional deprecation
of DES3 and RC4 by disallowing their use as session key enctypes by
default.  Add the variables allow_des3 and allow_rc4 in case
negotiability of these enctypes for session keys needs to be turned
back on, with the expectation that in future releases the enctypes
will be more comprehensively deprecated.

ticket: 9081
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A paper by Tom Tervoort noted that rc4-hmac pre-hashes the input for
its checksum and GSS operations before applying HMAC, and is therefore
potentially vulnerable to hash collision attacks if a protocol
contains a restricted signing oracle.

In light of these potential attacks, begin the functional deprecation
of DES3 and RC4 by disallowing their use as session key enctypes by
default.  Add the variables allow_des3 and allow_rc4 in case
negotiability of these enctypes for session keys needs to be turned
back on, with the expectation that in future releases the enctypes
will be more comprehensively deprecated.

ticket: 9081
</pre>
</div>
</content>
</entry>
<entry>
<title>In KDC, assume all services support aes256-sha1</title>
<updated>2023-01-23T23:41:09+00:00</updated>
<author>
<name>Greg Hudson</name>
<email>ghudson@mit.edu</email>
</author>
<published>2022-12-14T18:20:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/krb5.git/commit/?id=2cbd847e0e92bc4e219b65c770ae33f851b22afc'/>
<id>2cbd847e0e92bc4e219b65c770ae33f851b22afc</id>
<content type='text'>
To facilitate negotiating session keys with acceptable security,
assume that services support aes256-cts-hmac-sha1 unless a
session_enctypes string attribute says otherwise.

ticket: 9075
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To facilitate negotiating session keys with acceptable security,
assume that services support aes256-cts-hmac-sha1 unless a
session_enctypes string attribute says otherwise.

ticket: 9075
</pre>
</div>
</content>
</entry>
<entry>
<title>Make kprop work for dump files larger than 4GB</title>
<updated>2022-03-08T01:08:34+00:00</updated>
<author>
<name>Julien Rische</name>
<email>jrische@redhat.com</email>
</author>
<published>2022-01-19T18:46:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/krb5.git/commit/?id=2188041b98304fa8579006a9aaeb258945f1a0d5'/>
<id>2188041b98304fa8579006a9aaeb258945f1a0d5</id>
<content type='text'>
If the dump file size does not fit in 32 bits, encode four zero bytes
(forcing an error for unmodified kpropd) followed by the size in the
next 64 bits.

Add a functional test case, but only run it when an environment
variable is set, as processing a 4GB dump file is too
resource-intensive for make check.

[ghudson@mit.edu: edited comments and commit message; eliminated use
of defined constant in some cases; added test case]

ticket: 9053 (new)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the dump file size does not fit in 32 bits, encode four zero bytes
(forcing an error for unmodified kpropd) followed by the size in the
next 64 bits.

Add a functional test case, but only run it when an environment
variable is set, as processing a 4GB dump file is too
resource-intensive for make check.

[ghudson@mit.edu: edited comments and commit message; eliminated use
of defined constant in some cases; added test case]

ticket: 9053 (new)
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement replaced_reply_key input to issue_pac()</title>
<updated>2022-01-27T20:54:43+00:00</updated>
<author>
<name>Greg Hudson</name>
<email>ghudson@mit.edu</email>
</author>
<published>2022-01-13T19:33:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/krb5.git/commit/?id=78fd66926c4be5910c1e21d9e553dfb792ae822a'/>
<id>78fd66926c4be5910c1e21d9e553dfb792ae822a</id>
<content type='text'>
If a kdcpreauth module fully replaces the reply key during an AS
request, pass the reply key as the replaced_reply_key input to
issue_pac().  In Windows environments this is used to provide an NTLM
hash to the LSA when the client cannot be presumed to have a password
to derive it from.

To test this, add a fake PAC_CREDENTIALS_INFO buffer to the PAC in the
test KDB module, and alter adata.c to display the set of PAC buffer
types when a PAC is present.

ticket: 9050 (new)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a kdcpreauth module fully replaces the reply key during an AS
request, pass the reply key as the replaced_reply_key input to
issue_pac().  In Windows environments this is used to provide an NTLM
hash to the LSA when the client cannot be presumed to have a password
to derive it from.

To test this, add a fake PAC_CREDENTIALS_INFO buffer to the PAC in the
test KDB module, and alter adata.c to display the set of PAC buffer
types when a PAC is present.

ticket: 9050 (new)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add k5test.py facilities for PKINIT</title>
<updated>2022-01-27T06:52:10+00:00</updated>
<author>
<name>Greg Hudson</name>
<email>ghudson@mit.edu</email>
</author>
<published>2022-01-24T16:20:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/krb5.git/commit/?id=727627036ccba5f1c4c2b9ce6949fdc3172fc684'/>
<id>727627036ccba5f1c4c2b9ce6949fdc3172fc684</id>
<content type='text'>
Add the global variables pkinit_enabled and pkinit_certs.  Add the
realm flag pkinit=True.  Add the realm method pkinit().  Use these
facilities in t_pkinit.py, t_certauth.py, and t_authdata.py.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the global variables pkinit_enabled and pkinit_certs.  Add the
realm flag pkinit=True.  Add the realm method pkinit().  Use these
facilities in t_pkinit.py, t_certauth.py, and t_authdata.py.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace AD-SIGNEDPATH with minimal PACs</title>
<updated>2022-01-12T18:28:07+00:00</updated>
<author>
<name>Greg Hudson</name>
<email>ghudson@mit.edu</email>
</author>
<published>2022-01-08T03:41:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/krb5.git/commit/?id=a441fbe329ebbd7775eb5d4ccc4a05eef370f08b'/>
<id>a441fbe329ebbd7775eb5d4ccc4a05eef370f08b</id>
<content type='text'>
Remove all of the AD-SIGNEDPATH code.  Instead, issue a signed minimal
PAC in all tickets and require a valid PAC to be present in all
tickets presented for S4U operations.  Remove the get_authdata_info()
and sign_authdata() DAL methods, and add an issue_pac() method to
allow the KDB to add or copy buffers to the PAC.  Add a disable_pac
realm flag.

Microsoft revised the S4U2Proxy rules for forwardable tickets.  All
S4U2Proxy operations require forwardable evidence tickets, but
S4U2Self should issue a forwardable ticket if the requesting service
has no ok-to-auth-as-delegate bit but also no constrained delegation
privileges for traditional S4U2Proxy.  Implement these rules,
extending the check_allowed_to_delegate() DAL method so that the KDC
can ask if a principal has any delegation privileges.

Combine the KRB5_KDB_FLAG_ISSUE_PAC and
KRB5_FLAG_CLIENT_REFERRALS_ONLY flags into KRB5_KDB_FLAG_CLIENT.

Rename the KRB5_KDB_FLAG_CANONICALIZE flag to
KRB5_KDB_FLAG_REFERRAL_OK, and only pass it to get_principal() for
lookup operations that can use a realm referral.

For consistency with Active Directory, honor the no-auth-data-required
server principal flag for S4U2Proxy but not for S4U2Self.  Previously
we did the reverse.

ticket: 9044 (new)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove all of the AD-SIGNEDPATH code.  Instead, issue a signed minimal
PAC in all tickets and require a valid PAC to be present in all
tickets presented for S4U operations.  Remove the get_authdata_info()
and sign_authdata() DAL methods, and add an issue_pac() method to
allow the KDB to add or copy buffers to the PAC.  Add a disable_pac
realm flag.

Microsoft revised the S4U2Proxy rules for forwardable tickets.  All
S4U2Proxy operations require forwardable evidence tickets, but
S4U2Self should issue a forwardable ticket if the requesting service
has no ok-to-auth-as-delegate bit but also no constrained delegation
privileges for traditional S4U2Proxy.  Implement these rules,
extending the check_allowed_to_delegate() DAL method so that the KDC
can ask if a principal has any delegation privileges.

Combine the KRB5_KDB_FLAG_ISSUE_PAC and
KRB5_FLAG_CLIENT_REFERRALS_ONLY flags into KRB5_KDB_FLAG_CLIENT.

Rename the KRB5_KDB_FLAG_CANONICALIZE flag to
KRB5_KDB_FLAG_REFERRAL_OK, and only pass it to get_principal() for
lookup operations that can use a realm referral.

For consistency with Active Directory, honor the no-auth-data-required
server principal flag for S4U2Proxy but not for S4U2Self.  Previously
we did the reverse.

ticket: 9044 (new)
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't fail krb5_cc_select() for no default realm</title>
<updated>2022-01-02T01:29:08+00:00</updated>
<author>
<name>Isaac Boukris</name>
<email>iboukris@gmail.com</email>
</author>
<published>2021-12-26T01:28:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/krb5.git/commit/?id=4b479814747b69ec386d0e092f71678e6e193a75'/>
<id>4b479814747b69ec386d0e092f71678e6e193a75</id>
<content type='text'>
If the target server principal is a host-based service without
multiple dotted components and no default realm is configured,
krb5_cc_select() can fail, and therefore gss_init_sec_context().
Continue without filling in the realm in this case.

[ghudson@mit.edu: edited commit message and comment; slightly adjusted
flow control]

ticket: 9042 (new)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the target server principal is a host-based service without
multiple dotted components and no default realm is configured,
krb5_cc_select() can fail, and therefore gss_init_sec_context().
Continue without filling in the realm in this case.

[ghudson@mit.edu: edited commit message and comment; slightly adjusted
flow control]

ticket: 9042 (new)
</pre>
</div>
</content>
</entry>
</feed>
