* 'ssh_kex' of https://github.com/MaxKellermann/zeek:
  analyzer/protocol/ssh: fix crash vulnerability after duplicate KEX packet
This commit is contained in:
Jon Siwek 2020-02-12 00:04:40 -08:00
commit 05d7f26b85

View file

@ -398,6 +398,7 @@ refine connection SSH_Conn += {
{
if ( *(client_list->Lookup(i)->AsStringVal()->AsString()) == *(server_list->Lookup(j)->AsStringVal()->AsString()) )
{
kex_algorithm_.free();
kex_algorithm_.init((const uint8 *) client_list->Lookup(i)->AsStringVal()->Bytes(),
client_list->Lookup(i)->AsStringVal()->Len());