Learn about CVE-2018-16152, a vulnerability in strongSwan versions 4.x and 5.x before 5.7.0 allowing attackers to fabricate signatures during RSA signature verification, potentially leading to impersonation in IKEv2 authentication. Find out how to mitigate this security risk.
A vulnerability in the gmp plugin of strongSwan versions 4.x and 5.x before 5.7.0 allows attackers to fabricate signatures during RSA signature verification, potentially leading to impersonation in IKEv2 authentication.
Understanding CVE-2018-16152
This CVE describes a flaw in the RSA implementation of strongSwan that could be exploited by attackers to forge signatures.
What is CVE-2018-16152?
The function verify_emsa_pkcs1_signature() in gmp_rsa_public_key.c within the gmp plugin of strongSwan versions 4.x and 5.x before 5.7.0 does not correctly handle extra information found in the digestAlgorithm.parameters field during PKCS#1 v1.5 signature verification for RSA. This vulnerability allows an attacker to fabricate signatures, especially when small public exponents are utilized. As a result, there is a risk of impersonation in cases where only an RSA signature is employed for IKEv2 authentication. It is worth noting that this particular issue is a variation of both CVE-2006-4790 and CVE-2014-1568.
The Impact of CVE-2018-16152
Technical Details of CVE-2018-16152
This section provides more technical insights into the vulnerability.
Vulnerability Description
In verify_emsa_pkcs1_signature() in gmp_rsa_public_key.c in the gmp plugin in strongSwan 4.x and 5.x before 5.7.0, the RSA implementation based on GMP does not reject excess data in the digestAlgorithm.parameters field during PKCS#1 v1.5 signature verification. Consequently, a remote attacker can forge signatures when small public exponents are being used, which could lead to impersonation when only an RSA signature is used for IKEv2 authentication. This is a variant of CVE-2006-4790 and CVE-2014-1568.
Affected Systems and Versions
Exploitation Mechanism
The vulnerability allows attackers to manipulate the digestAlgorithm.parameters field during PKCS#1 v1.5 signature verification, enabling them to fabricate signatures and potentially impersonate users during IKEv2 authentication.
Mitigation and Prevention
Protecting systems from this vulnerability requires immediate actions and long-term security practices.
Immediate Steps to Take
Long-Term Security Practices
Patching and Updates