mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 04:40:31 +09:00
gssapi: Avoid memory leaks of selected OID (GHSL-2023-036)
Thanks Phil Turnbull from GitHub Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
@@ -718,7 +718,7 @@ end:
|
||||
*/
|
||||
int ssh_gssapi_auth_mic(ssh_session session){
|
||||
size_t i;
|
||||
gss_OID_set selected; /* oid selected for authentication */
|
||||
gss_OID_set selected = GSS_C_NO_OID_SET; /* oid selected for authentication */
|
||||
ssh_string *oids = NULL;
|
||||
int rc;
|
||||
size_t n_oids = 0;
|
||||
@@ -795,6 +795,8 @@ out:
|
||||
SSH_STRING_FREE(oids[i]);
|
||||
}
|
||||
free(oids);
|
||||
gss_release_oid_set(&min_stat, &selected);
|
||||
|
||||
if (rc != SSH_ERROR) {
|
||||
return SSH_AUTH_AGAIN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user