From 918e052ae12abc2b5b39905a8bf669e25ff57d50 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 13 Jul 2026 16:52:44 +0200 Subject: [PATCH] eap-md5: Avoid memory leak caused by repeated challenges Fixes: 4b403e7672a1 ("merged EAP-MD5 into trunk") --- src/libcharon/plugins/eap_md5/eap_md5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcharon/plugins/eap_md5/eap_md5.c b/src/libcharon/plugins/eap_md5/eap_md5.c index 7b0b15772..3752ad4a7 100644 --- a/src/libcharon/plugins/eap_md5/eap_md5.c +++ b/src/libcharon/plugins/eap_md5/eap_md5.c @@ -157,6 +157,7 @@ METHOD(eap_method_t, process_peer, status_t, DBG1(DBG_IKE, "received invalid EAP-MD5 message"); return FAILED; } + chunk_free(&this->challenge); this->challenge = chunk_clone(chunk_create(data.ptr + 6, data.ptr[5])); if (hash_challenge(this, &response, this->peer, this->server) != SUCCESS) {