Skip to content

Commit e776732

Browse files
Merge PR "[AUTO-CHERRYPICK] [AutoPR- Security] Patch strongswan for CVE-2026-25075 [HIGH] - branch 3.0-dev" #16262
Co-authored-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com>
1 parent 7ce83c8 commit e776732

2 files changed

Lines changed: 53 additions & 1 deletion

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
From a4fe712399f0a679f0951c12d3758cf9264f3cdc Mon Sep 17 00:00:00 2001
2+
From: Tobias Brunner <tobias@strongswan.org>
3+
Date: Thu, 5 Mar 2026 12:43:12 +0100
4+
Subject: [PATCH] eap-ttls: Prevent crash if AVP length header field is invalid
5+
6+
The length field in the AVP header includes the 8 bytes of the header
7+
itself. Not checking for that and later subtracting it causes an
8+
integer underflow that usually triggers a crash when accessing a
9+
NULL pointer that resulted from the failing chunk_alloc() call because
10+
of the high value.
11+
12+
The attempted allocations for invalid lengths (0-7) are 0xfffffff8,
13+
0xfffffffc, or 0x100000000 (0 on 32-bit hosts), so this doesn't result
14+
in a buffer overflow even if the allocation succeeds.
15+
16+
Fixes: 79f2102cb442 ("implemented server side support for EAP-TTLS")
17+
Fixes: CVE-2026-25075
18+
Signed-off-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com>
19+
Upstream-reference: https://download.strongswan.org/security/CVE-2026-25075/strongswan-4.5.0-6.0.4_eap_ttls_avp_len.patch
20+
---
21+
src/libcharon/plugins/eap_ttls/eap_ttls_avp.c | 4 ++--
22+
1 file changed, 2 insertions(+), 2 deletions(-)
23+
24+
diff --git a/src/libcharon/plugins/eap_ttls/eap_ttls_avp.c b/src/libcharon/plugins/eap_ttls/eap_ttls_avp.c
25+
index 06389f7..2983bd0 100644
26+
--- a/src/libcharon/plugins/eap_ttls/eap_ttls_avp.c
27+
+++ b/src/libcharon/plugins/eap_ttls/eap_ttls_avp.c
28+
@@ -119,7 +119,7 @@ METHOD(eap_ttls_avp_t, process, status_t,
29+
chunk_free(&this->input);
30+
this->inpos = 0;
31+
32+
- if (!success)
33+
+ if (!success || avp_len < AVP_HEADER_LEN)
34+
{
35+
DBG1(DBG_IKE, "received invalid AVP header");
36+
return FAILED;
37+
@@ -130,7 +130,7 @@ METHOD(eap_ttls_avp_t, process, status_t,
38+
return FAILED;
39+
}
40+
this->process_header = FALSE;
41+
- this->data_len = avp_len - 8;
42+
+ this->data_len = avp_len - AVP_HEADER_LEN;
43+
this->input = chunk_alloc(this->data_len + (4 - avp_len) % 4);
44+
}
45+
46+
--
47+
2.45.4
48+

SPECS/strongswan/strongswan.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
Name: strongswan
1414
Version: 5.9.14
15-
Release: 8%{?dist}
15+
Release: 9%{?dist}
1616
Summary: An OpenSource IPsec-based VPN and TNC solution
1717
# Automatically converted from old format: GPLv2+ - review is highly recommended.
1818
License: GPL-2.0-or-later
@@ -32,6 +32,7 @@ Patch3: strongswan-6.0.1-gcc15.patch
3232
Patch4: strongswan-fix-make-check.patch
3333
Patch5: 0001-Extending-timeout-for-test-cases-with-multiple-read-.patch
3434
Patch6: CVE-2025-62291.patch
35+
Patch7: CVE-2026-25075.patch
3536

3637
BuildRequires: autoconf
3738
BuildRequires: automake
@@ -426,6 +427,9 @@ install -D -m 0644 %{SOURCE3} %{buildroot}/%{_tmpfilesdir}/strongswan-starter.co
426427
%endif
427428

428429
%changelog
430+
* Tue Mar 24 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 5.9.14-9
431+
- Patch for CVE-2026-25075
432+
429433
* Mon Jan 19 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 5.9.14-8
430434
- Patch for CVE-2025-62291
431435

0 commit comments

Comments
 (0)