Skip to content

Commit

Permalink
kdc: fix memory leak when decryption AuthorizationData
Browse files Browse the repository at this point in the history
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13131

Signed-off-by: Stefan Metzmacher <metze@samba.org>

MR: heimdal#1156
  • Loading branch information
metze-samba authored and jsutton24 committed Feb 26, 2024
1 parent b4b873f commit 80acfba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kdc/krb5tgs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1199,11 +1199,13 @@ tgs_parse_request(astgs_request_t r,
}
ALLOC(*auth_data);
if (*auth_data == NULL) {
krb5_data_free(&ad);
krb5_auth_con_free(r->context, ac);
ret = KRB5KRB_AP_ERR_BAD_INTEGRITY; /* ? */
goto out;
}
ret = decode_AuthorizationData(ad.data, ad.length, *auth_data, NULL);
krb5_data_free(&ad);
if(ret){
krb5_auth_con_free(r->context, ac);
free(*auth_data);
Expand Down

0 comments on commit 80acfba

Please sign in to comment.