CVE-2018-17540
Description
A heap buffer overflow in strongSwan's gmp plugin allows remote attackers to crash the IKE daemon or potentially execute arbitrary code via a crafted certificate with a short RSA public key.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A heap buffer overflow in strongSwan's gmp plugin allows remote attackers to crash the IKE daemon or potentially execute arbitrary code via a crafted certificate with a short RSA public key.
Vulnerability
The gmp plugin in strongSwan before version 5.7.1 contains a heap buffer overflow vulnerability. It was introduced by the patch that fixes CVE-2018-16151/2, affecting any strongSwan version with that patch applied (versions 4.4.0 to 5.7.0). The bug occurs during RSA signature verification: a length check if (data.len > keylen - 11) uses an unsigned size_t for keylen, causing an integer underflow when keylen is less than 11 bytes. This underflow leads to a heap buffer overflow when the encoding is written to a buffer of only keylen bytes [1][4].
Exploitation
A remote attacker can exploit this vulnerability by sending a crafted certificate containing a very short RSA public key during an IKE handshake. The signature verification function in the gmp plugin processes the certificate, triggering the integer underflow and subsequent heap buffer overflow. No authentication or prior access is required; the attacker only needs network connectivity to the target strongSwan server [1][2].
Impact
Successful exploitation most likely crashes the IKE daemon, resulting in a denial of service. The Ubuntu security notice also states that arbitrary code execution may be possible, though the primary impact is a denial-of-service condition [1][2].
Mitigation
The vulnerability is fixed in strongSwan version 5.7.1. For versions 4.4.0 through 5.7.0, a patch is available from the strongSwan security page [4]. Ubuntu and Gentoo have released updated packages (USN-3774-1 and GLSA 201811-16, respectively) [2][3]. No workaround is known; upgrading to the fixed version is the recommended mitigation.
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
25- Range: <5.7.1
- osv-coords24 versionspkg:rpm/opensuse/strongswan&distro=openSUSE%20Leap%2015.0pkg:rpm/opensuse/strongswan&distro=openSUSE%20Leap%2015.1pkg:rpm/opensuse/strongswan&distro=openSUSE%20Tumbleweedpkg:rpm/suse/strongswan&distro=SUSE%20Enterprise%20Storage%205pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP4pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP1pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Point%20of%20Sale%2011%20SP3pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP4-LTSSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP1-LTSSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-LTSSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCLpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP1pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP2pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/strongswan&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/strongswan&distro=SUSE%20OpenStack%20Cloud%208
< 5.6.0-lp150.3.3.1+ 23 more
- (no CPE)range: < 5.6.0-lp150.3.3.1
- (no CPE)range: < 5.6.0-lp151.4.3.1
- (no CPE)range: < 5.9.0-1.9
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.6.0-4.3.2
- (no CPE)range: < 5.6.0-4.3.2
- (no CPE)range: < 5.6.0-4.3.2
- (no CPE)range: < 4.4.0-6.36.12.1
- (no CPE)range: < 4.4.0-6.36.12.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
- (no CPE)range: < 5.1.3-26.13.1
Patches
0No patches discovered yet.
Vulnerability mechanics
No source-code context for this CVE — mechanics is only generated when we can read the actual fix diff. Without that, the four sections (root cause, attack vector, affected code, fix) would be speculation rather than analysis.
References
9- lists.opensuse.org/opensuse-security-announce/2019-11/msg00077.htmlmitrevendor-advisoryx_refsource_SUSE
- lists.opensuse.org/opensuse-security-announce/2019-12/msg00001.htmlmitrevendor-advisoryx_refsource_SUSE
- lists.opensuse.org/opensuse-security-announce/2020-03/msg00047.htmlmitrevendor-advisoryx_refsource_SUSE
- security.gentoo.org/glsa/201811-16mitrevendor-advisoryx_refsource_GENTOO
- usn.ubuntu.com/3774-1/mitrevendor-advisoryx_refsource_UBUNTU
- www.debian.org/security/2018/dsa-4309mitrevendor-advisoryx_refsource_DEBIAN
- download.strongswan.org/security/CVE-2018-17540/mitrex_refsource_CONFIRM
- lists.debian.org/debian-lts-announce/2018/10/msg00001.htmlmitremailing-listx_refsource_MLIST
- www.strongswan.org/blog/2018/10/01/strongswan-vulnerability-%28cve-2018-17540%29.htmlmitrex_refsource_CONFIRM
News mentions
0No linked articles in our index yet.