1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-05 01:02:39 +03:00

gssapi: Free selected OID set on error paths (GHSL-2023-034)

Thanks Phil Turnbull from GitHub

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2023-03-06 12:18:34 +01:00
committed by Andreas Schneider
parent 2b5bef9c03
commit bdabf25a5b

View File

@@ -327,6 +327,7 @@ ssh_gssapi_handle_userauth(ssh_session session, const char *user,
session->gssapi->mech.elements = malloc(oid.length);
if (session->gssapi->mech.elements == NULL){
ssh_set_error_oom(session);
gss_release_oid_set(&min_stat, &selected);
return SSH_ERROR;
}
memcpy(session->gssapi->mech.elements, oid.elements, oid.length);