Commit 9762cc3b09 for strongswan.org

commit 9762cc3b091b423543510113a5d05215daf16951
Author: Tobias Brunner <tobias@strongswan.org>
Date:   Thu Jul 30 17:39:55 2026 +0200

    x509: Fix memory leak when parsing multiple authorityKeyIdentifier in attribute certificates

    Fixes: 26930a8c3e42 ("certificate factory can load certs from file")
    Fixes: CVE-2026-78131

diff --git a/src/libstrongswan/plugins/x509/x509_ac.c b/src/libstrongswan/plugins/x509/x509_ac.c
index ea5021a2aa..68b7cf927d 100644
--- a/src/libstrongswan/plugins/x509/x509_ac.c
+++ b/src/libstrongswan/plugins/x509/x509_ac.c
@@ -523,6 +523,7 @@ static bool parse_certificate(private_x509_ac_t *this)
 						DBG2(DBG_ASN, "  need to parse crlDistributionPoints");
 						break;
 					case OID_AUTHORITY_KEY_ID:
+						chunk_free(&this->authKeyIdentifier);
 						this->authKeyIdentifier =
 								x509_parse_authorityKeyIdentifier(object,
 											level, &this->authKeySerialNumber);