summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTobias Heider <tobhe@cvs.openbsd.org>2021-09-07 14:09:05 +0000
committerTobias Heider <tobhe@cvs.openbsd.org>2021-09-07 14:09:05 +0000
commit24bbda3384768122e14323f0baa1e358e1de60ca (patch)
tree51f7d759ed473a7cb1ff30d1c7eb7f8c8464c3ef /sbin
parentaf6809e16a01af5cb0c91e2c374daff565e79d9f (diff)
Fix leak of msg_cert.id_buf. ikev2_msg_cleanup() frees id_buf if we
don't delete the pointer. ok markus@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/ikev2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c
index 5cbe1c4a935..833c2875825 100644
--- a/sbin/iked/ikev2.c
+++ b/sbin/iked/ikev2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2.c,v 1.326 2021/09/01 15:30:06 tobhe Exp $ */
+/* $OpenBSD: ikev2.c,v 1.327 2021/09/07 14:09:04 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -1019,7 +1019,6 @@ ikev2_ike_auth_recv(struct iked *env, struct iked_sa *sa,
certtype = msg->msg_cert.id_type;
cert = ibuf_data(msg->msg_cert.id_buf);
certlen = ibuf_length(msg->msg_cert.id_buf);
- bzero(&msg->msg_cert, sizeof(msg->msg_cert));
}
sa->sa_stateflags &= ~IKED_REQ_CERTVALID;
if (ca_setcert(env, &sa->sa_hdr, id, certtype, cert, certlen, PROC_CERT) == -1)