1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-11 08:08:06 -05:00

Fix crash in GSSAPI key exchange.

Introduced recently by commit 42740a54550476e, in which I decided to
call ssh_key_cache_str() even on certified host keys. But that call
was conditional on s->hkey being non-NULL (which happens in GSS KEX)
as well as on it not being certified, and I managed to absentmindedly
remove _both_ conditions. As a result we got a null-pointer
dereference on any GSS kex.
This commit is contained in:
Simon Tatham 2022-08-29 13:43:07 +01:00
parent d2e982efa7
commit c6d7ffda68

View File

@ -718,7 +718,7 @@ void ssh2kex_coroutine(struct ssh2_transport_state *s, bool *aborted)
}
}
s->keystr = ssh_key_cache_str(s->hkey);
s->keystr = s->hkey ? ssh_key_cache_str(s->hkey) : NULL;
#ifndef NO_GSSAPI
if (s->gss_kex_used) {
/*