Skip to content

Commit 0417114

Browse files
committed
kdc: validate sname in TGS-REQ
In tgs_build_reply(), validate the server name in the TGS-REQ is present before dereferencing.
1 parent a5378da commit 0417114

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: kdc/krb5tgs.c

+4
Original file line numberDiff line numberDiff line change
@@ -1699,6 +1699,10 @@ tgs_build_reply(astgs_request_t priv,
16991699

17001700
s = &adtkt.cname;
17011701
r = adtkt.crealm;
1702+
} else if (s == NULL) {
1703+
ret = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN;
1704+
_kdc_set_e_text(r, "No server in request");
1705+
goto out;
17021706
}
17031707

17041708
_krb5_principalname2krb5_principal(context, &sp, *s, r);

0 commit comments

Comments
 (0)