summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-03-08 23:51:33 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-03-08 23:51:33 +0800
commit0372d1978dfe76fc7c27ffa9b8c08e8c815e6cff (patch)
treecd0a517f01ac5a4b41891a85c19514ad7474c872
parent516d68745c5ec10e4d8cc2e0d32ce316663ffc43 (diff)
downloaddropbear-0372d1978dfe76fc7c27ffa9b8c08e8c815e6cff.tar.gz
avoid leak of ecdh public key
-rw-r--r--common-kex.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common-kex.c b/common-kex.c
index 7da3fb7..d4933dd 100644
--- a/common-kex.c
+++ b/common-kex.c
@@ -694,6 +694,9 @@ void kexecdh_comb_key(struct kex_ecdh_param *param, buffer *pub_them,
/* K, the shared secret */
buf_putmpint(ses.kexhashbuf, ses.dh_K);
+ ecc_free(Q_them);
+ m_free(Q_them);
+
/* calculate the hash H to sign */
finish_kexhashbuf();
}