From baf85344c861d2ace39931282e3b3c696f81d8fa Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 6 Apr 2022 14:12:32 -0400 Subject: [PATCH] TT#14008 prevent double-free of MKI closes #1474 Change-Id: I6d72913fa5f76049de633c3bf7b3633030ce9443 (cherry picked from commit 2b74e64ddf946a02680307c3b7852f21ab30e1d9) --- include/crypto.h | 1 + t/auto-daemon-tests.pl | 71 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/include/crypto.h b/include/crypto.h index 44cc3f46b..0b5ee48c9 100644 --- a/include/crypto.h +++ b/include/crypto.h @@ -212,6 +212,7 @@ INLINE void crypto_params_sdes_queue_copy(GQueue *dst, const GQueue *src) { struct crypto_params_sdes *cps = l->data; struct crypto_params_sdes *cpy = g_slice_alloc(sizeof(*cpy)); *cpy = *cps; + cpy->params.mki = NULL; crypto_params_copy(&cpy->params, &cps->params, 1); g_queue_push_tail(dst, cpy); } diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 03e048b4c..c73f65a88 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -15087,4 +15087,75 @@ m=application 0 * SDP + +new_call; + +offer('MKI re-invite (GH #1474)', { DTLS => 'off' }, < 'off' }, <