diff options
author | tobhe <tobhe@cvs.openbsd.org> | 2020-04-26 18:21:54 +0000 |
---|---|---|
committer | tobhe <tobhe@cvs.openbsd.org> | 2020-04-26 18:21:54 +0000 |
commit | 30052a1712c14d555295168daf56373a4f674089 (patch) | |
tree | 07a14eb67b63c371eed02cfbc896fdd9d4ac93b7 /sbin | |
parent | 32e6d749cf9974379dff8196387f462f15307adb (diff) |
Fix leak of temporary ID ibufs on IKE SA rekey.
ok markus@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/iked/ikev2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c index b6a2d64d85e..b46b4c90401 100644 --- a/sbin/iked/ikev2.c +++ b/sbin/iked/ikev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.c,v 1.220 2020/04/24 21:20:52 tobhe Exp $ */ +/* $OpenBSD: ikev2.c,v 1.221 2020/04/26 18:21:53 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -3899,6 +3899,10 @@ ikev2_ikesa_enable(struct iked *env, struct iked_sa *sa, struct iked_sa *nsa) } /* Preserve ID information */ + ibuf_release(nsa->sa_iid.id_buf); + ibuf_release(nsa->sa_rid.id_buf); + ibuf_release(nsa->sa_icert.id_buf); + ibuf_release(nsa->sa_rcert.id_buf); if (sa->sa_hdr.sh_initiator == nsa->sa_hdr.sh_initiator) { nsa->sa_iid = sa->sa_iid; nsa->sa_rid = sa->sa_rid; |