strongSwan EAP-SIM/EAP-AKA Pre-Auth Heap Buffer Overflow via Integer Underflow (CVE-2026-35330)
by JohannesLks · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-35330
- Category
- network
- Affected product
- strongSwan — libsimaka (EAP-SIM/EAP-AKA)
- Affected versions
- Versions containing the flawed simaka_message.c parser
- Disclosed
- 2026-07-05
- Patch status
- unpatched
Tags
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-06 |
| Author / Researcher | JohannesLks |
| CVE / Advisory | CVE-2026-35330 |
| Category | network |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | strongswan |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | strongSwan — libsimaka (EAP-SIM/EAP-AKA) |
| Versions Affected | Versions containing the flawed simaka_message.c parser |
| Language / Platform | C PoC (ASan-driven crash) |
| Authentication Required | No (pre-authentication) |
| Network Access Required | Yes (IKE/EAP over UDP) |
Summary
strongSwan’s parse_attributes() in src/libsimaka/simaka_message.c reads TLV attribute headers whose length byte counts 4-byte words. For the AT_RAND/AT_ENCR_DATA branches, a crafted small length value causes an integer underflow in the computed remaining-data size, leading to a pre-authentication heap buffer overflow when the parser subsequently reads past the allocated buffer.
Vulnerability Details
Root Cause
Length arithmetic in the EAP-SIM/AKA TLV attribute parser underflows for certain attacker-supplied length values, producing an out-of-bounds heap read/write.
Attack Vector
- Establish an IKE/EAP-SIM or EAP-AKA session with a strongSwan endpoint acting as an EAP server.
- Send a crafted
AT_RAND/AT_ENCR_DATAattribute with a length value engineered to underflow the parser’s size arithmetic. - The parser reads/writes past the allocated buffer in the heap, corrupting adjacent memory before authentication completes.
Impact
Pre-authentication heap corruption in strongSwan’s EAP-SIM/AKA parser, reachable by any peer able to initiate an EAP-SIM/AKA exchange — potential crash or further exploitation.
Environment / Lab Setup
Target: strongSwan build using the vulnerable libsimaka parser
Attacker: C compiler, ASan-instrumented strongSwan build for crash confirmation
Proof of Concept
PoC Script
See
poc.cin this folder.
| |
Constructs a crafted EAP-SIM/AKA attribute stream that drives parse_attributes() into the underflow condition, confirmed via AddressSanitizer.
Detection & Indicators of Compromise
Signs of compromise:
- strongSwan process crashes correlated with EAP-SIM/AKA negotiation attempts
Remediation
| Action | Detail |
|---|---|
| Primary fix | Apply the upstream strongSwan patch correcting the length arithmetic in simaka_message.c once available |
| Interim mitigation | Disable EAP-SIM/EAP-AKA authentication methods if not required, pending patch |
References
Notes
Mirrored from https://github.com/JohannesLks/CVE-2026-35330 on 2026-07-05.
| |