more strictly enforce KEX state-machine by banning packet types
authordjm <djm@openbsd.org>
Sun, 31 Jan 2021 22:55:29 +0000 (22:55 +0000)
committerdjm <djm@openbsd.org>
Sun, 31 Jan 2021 22:55:29 +0000 (22:55 +0000)
commit1c4876f5ca4b2d6c9f7a9242687874d938e3c3fd
treebb4997ec0369abcab89164d57d17a7ccf42ab727
parent6970290938325c605547e7eaaee021c8572fbf50
more strictly enforce KEX state-machine by banning packet types
once they are received. Fixes memleak caused by duplicate
SSH2_MSG_KEX_DH_GEX_REQUEST (spotted by portable OpenSSH kex_fuzz
via oss-fuzz #30078).

ok markus@
usr.bin/ssh/kex.c
usr.bin/ssh/kex.h
usr.bin/ssh/kexgen.c
usr.bin/ssh/kexgexc.c
usr.bin/ssh/kexgexs.c