CVE-2020-25719 tests/krb5: Add expected parameters to cache key for obtaining tickets
commit2895186282eb076c276582ebd8f4159e8c2a7915
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 26 Oct 2021 22:18:36 +0000 (27 11:18 +1300)
committerJule Anger <janger@samba.org>
Mon, 8 Nov 2021 09:52:12 +0000 (8 10:52 +0100)
treee4fe3be1bd43722008b980709de7a517c4477c9a
parent241d3956af943169679e841e8149f22a5a79055f
CVE-2020-25719 tests/krb5: Add expected parameters to cache key for obtaining tickets

If multiple calls to get_tgt() or get_service_ticket() specify different
expected parameters, we want to perform the request again so that the
checking can be performed, rather than reusing a previously obtained
ticket and potentially skipping checks.

It should be fine to cache tickets with the same expected parameters, as
tickets that fail to be obtained will not be stored in the cache, so the
checking will happen for every call.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14561

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/krb5/kdc_base_test.py