summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2022-11-29 20:27:14 +0100
committerStefan Metzmacher <metze@samba.org>2022-12-14 10:28:17 +0000
commitaeb7c646bb03d468f2cc167153dd54d79848cabb (patch)
treeecd1e43ab4f0092d5f163a12156a838e5d8d2bc9
parentb20acd876c892dd9b2fdf74c8d2dc1a2f95a32ab (diff)
downloadsamba-aeb7c646bb03d468f2cc167153dd54d79848cabb.tar.gz
CVE-2022-37966 python:tests/krb5: ignore empty supplementalCredentials attributes
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15237 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit f434a30ee7c40aac4a223fcabac9ddd160a155a5)
-rw-r--r--python/samba/tests/krb5/kdc_base_test.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/samba/tests/krb5/kdc_base_test.py b/python/samba/tests/krb5/kdc_base_test.py
index f218293f092..45a23b97eff 100644
--- a/python/samba/tests/krb5/kdc_base_test.py
+++ b/python/samba/tests/krb5/kdc_base_test.py
@@ -566,6 +566,8 @@ class KDCBaseTest(RawKerberosTest):
for attr in attributes:
if attr.attid == drsuapi.DRSUAPI_ATTID_supplementalCredentials:
net_ctx.replicate_decrypt(bind, attr, rid)
+ if attr.value_ctr.num_values == 0:
+ continue
attr_val = attr.value_ctr.values[0].blob
spl = ndr_unpack(drsblobs.supplementalCredentialsBlob,