Skip to content

Commit

Permalink
Issue an error from KDC on S4U2Self failures
Browse files Browse the repository at this point in the history
Commit 3b163ee mistakenly separated
the call to kdc_process_s4u2self_req() from its error check, causing
the KDC to ignore S4U2Self padata with bad checksums.  Restore the
error check so that the KDC replies with an error as intended.

[ghudson@mit.edu: removed old error check later on in the code;
rewrote commit message]

ticket: 9038 (new)
  • Loading branch information
cryptomilk authored and greghudson committed Dec 5, 2021
1 parent f1b36bb commit 9544229
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/kdc/do_tgs_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ process_tgs_req(krb5_kdc_req *request, krb5_data *pkt,
au_state->status = status;
kau_s4u2self(kdc_context, errcode ? FALSE : TRUE, au_state);
au_state->s4u2self_user = NULL;
if (errcode)
goto cleanup;
}

/* For user-to-user and S4U2Proxy requests, decrypt the second ticket. */
Expand All @@ -295,9 +297,6 @@ process_tgs_req(krb5_kdc_req *request, krb5_data *pkt,
goto cleanup;
}

if (errcode)
goto cleanup;

if (s4u_x509_user != NULL && client == NULL) {
/*
* For an S4U2Self referral request (the requesting service is
Expand Down

0 comments on commit 9544229

Please sign in to comment.