mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
CVE-2022-37966 tests/krb5: Add test requesting a TGT expiring post-2038
This demonstrates the behaviour of Windows 11 22H2 over Kerberos, which changed to use a year 9999 date for a forever timetime in tickets. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15197 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Oct 20 05:00:23 UTC 2022 on sn-devel-184 (cherry picked from commit 50cbdecf2e276e5f87b9c2d95fd3ca86d11a08e2) BUG: https://bugzilla.samba.org/show_bug.cgi?id=15237 Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
397a390aa8
commit
a65fc1fa47
@ -47,7 +47,7 @@ class AsReqBaseTest(KDCBaseTest):
|
|||||||
expected_cname=None, sname=None,
|
expected_cname=None, sname=None,
|
||||||
name_type=NT_PRINCIPAL, etypes=None,
|
name_type=NT_PRINCIPAL, etypes=None,
|
||||||
expected_error=None, expect_edata=None,
|
expected_error=None, expect_edata=None,
|
||||||
kdc_options=None):
|
kdc_options=None, till=None):
|
||||||
user_name = client_creds.get_username()
|
user_name = client_creds.get_username()
|
||||||
if client_account is None:
|
if client_account is None:
|
||||||
client_account = user_name
|
client_account = user_name
|
||||||
@ -71,6 +71,7 @@ class AsReqBaseTest(KDCBaseTest):
|
|||||||
expected_sname = sname
|
expected_sname = sname
|
||||||
expected_salt = client_creds.get_salt()
|
expected_salt = client_creds.get_salt()
|
||||||
|
|
||||||
|
if till is None:
|
||||||
till = self.get_KerberosTime(offset=36000)
|
till = self.get_KerberosTime(offset=36000)
|
||||||
|
|
||||||
if etypes is None:
|
if etypes is None:
|
||||||
@ -516,6 +517,14 @@ class AsReqKerberosTests(AsReqBaseTest):
|
|||||||
sname=wrong_krbtgt_princ,
|
sname=wrong_krbtgt_princ,
|
||||||
expected_error=KDC_ERR_S_PRINCIPAL_UNKNOWN)
|
expected_error=KDC_ERR_S_PRINCIPAL_UNKNOWN)
|
||||||
|
|
||||||
|
# Test that we can make a request for a ticket expiring post-2038.
|
||||||
|
def test_future_till(self):
|
||||||
|
client_creds = self.get_client_creds()
|
||||||
|
|
||||||
|
self._run_as_req_enc_timestamp(
|
||||||
|
client_creds,
|
||||||
|
till='99990913024805Z')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
global_asn1_print = False
|
global_asn1_print = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user