summaryrefslogtreecommitdiffstats
path: root/kex.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2021-01-31 23:55:29 +0100
committerDamien Miller <djm@mindrot.org>2021-01-31 23:57:28 +0100
commit3dd0c64e08f1bba21d71996d635c7256c8c139d1 (patch)
tree8b1e590fba33fd7ebd8637970a8c67a266cf6035 /kex.c
parentupstream: Set linesize returned by getline to zero when freeing and (diff)
downloadopenssh-3dd0c64e08f1bba21d71996d635c7256c8c139d1.tar.xz
openssh-3dd0c64e08f1bba21d71996d635c7256c8c139d1.zip
upstream: 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@ OpenBSD-Commit-ID: 87331c715c095b587d5c88724694cdeb701c9def
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kex.c b/kex.c
index b73f14d3d..30425ab8a 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.166 2021/01/27 23:49:46 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.167 2021/01/31 22:55:29 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
*
@@ -405,7 +405,7 @@ kex_prop_free(char **proposal)
}
/* ARGSUSED */
-static int
+int
kex_protocol_error(int type, u_int32_t seq, struct ssh *ssh)
{
int r;