Skip to content
Permalink
Browse files Browse the repository at this point in the history
kdc: validate sname in TGS-REQ
In tgs_build_reply(), validate the server name in the TGS-REQ is present before
dereferencing.
  • Loading branch information
lhoward committed Aug 27, 2021
1 parent a5378da commit 0417114
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kdc/krb5tgs.c
Expand Up @@ -1699,6 +1699,10 @@ tgs_build_reply(astgs_request_t priv,

s = &adtkt.cname;
r = adtkt.crealm;
} else if (s == NULL) {
ret = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN;
_kdc_set_e_text(r, "No server in request");
goto out;
}

_krb5_principalname2krb5_principal(context, &sp, *s, r);
Expand Down

0 comments on commit 0417114

Please sign in to comment.