]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:kdc: Check parameters of samba_kdc_get_user_info_from_pac()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 3 Oct 2023 07:06:29 +0000 (20:06 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 12 Oct 2023 23:13:32 +0000 (23:13 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/pac-glue.c

index 58822678e6edf5d8c61e513680f0d1330fd6cb2c..0a9eea6a38404ee9295d1f5fdffaad403b858260 100644 (file)
@@ -1194,6 +1194,21 @@ static krb5_error_code samba_kdc_get_user_info_from_pac(TALLOC_CTX *mem_ctx,
        krb5_error_code ret = 0;
        NTSTATUS nt_status;
 
+       if (samdb == NULL) {
+               ret = EINVAL;
+               goto out;
+       }
+
+       if (!samba_krb5_pac_is_trusted(entry)) {
+               ret = EINVAL;
+               goto out;
+       }
+
+       if (info_out == NULL) {
+               ret = EINVAL;
+               goto out;
+       }
+
        *info_out = NULL;
        if (resource_groups_out != NULL) {
                *resource_groups_out = NULL;