Bug 742065 (CVE-2011-3380)
Summary: | CVE-2011-3380 openswan: IKE invalid key length allows remote unauthenticated user to crash openswan | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Vincent Danen <vdanen> |
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
Status: | CLOSED ERRATA | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | unspecified | CC: | avagarwa, jlieskov, jrieden, pwouters, security-response-team, sgrubb |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | openswan 2.6.36 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-05-22 15:21:53 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 742069, 742070, 743760 | ||
Bug Blocks: | 742072 |
Description
Vincent Danen
2011-09-28 22:04:15 UTC
Upstream patch: diff --git a/programs/pluto/ike_alg.c b/programs/pluto/ike_alg.c index 78aea4a..08b8d82 100644 --- a/programs/pluto/ike_alg.c +++ b/programs/pluto/ike_alg.c @@ -115,7 +115,7 @@ bool ike_alg_enc_ok(int ealg, unsigned key_len, ealg, key_len); } ); - if (!ret && *errp) + if (!ret && errp) *errp = ugh_buf; return ret; } This will be fixed in upstream 2.6.36 release. It was found that this isn't just limited to AES key lengths, but could also be impacted by 3DES. A revised upstream announcement is as follows: Subject: CVE-2011-3380 Openswan IKE invalid key length vulnerability Release date: Wed Oct 5, 2011 http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2011-3380 Security Alert: This alert (and any possible updates) is available at the following URL: http://www.openswan.org/download/CVE-2011-3380/ The Openswan project has discovered a vulnerability in the key length handler in their IKE daemon implementation "pluto". Vulnerable versions: openswan 2.6.29 up to 2.6.35 Fixed version : openswan 2.6.36 Vulnerability information: When an ISAKMP message with an invalid KEY_LENGTH attribute is received, the error handling function crashes on a NULL pointer dereference. Openswan automatically restarts the pluto IKE daemon but all ISAKMP state is lost. This vulnerability does NOT allow an attacker access to the system. This can be used to launch a denial of service attack by sending repeated IKE packets with the invalid key length attribute. Openswan is only vulnerable if the attacker's IP address is allowed to connect to it by a loaded policy. For static tunnels, this is limited to the allowed remote IP address. However, in the case of supporting dynamic clients ("roadwarriors", via right=%any) any IP address can trigger the crash. The crash is independant of the authentication method used (PSK, RAW RSA or X.509), Restricted static IPs could also be spoofed to trigger the vulnerability. This vulnerability happens in the IKE layer before any authentication has taken place, meaning any attacker can crash openswan without the need to know a preshared key (PSK) and without the need for a valid X.509 certificate, as long as there is a potential match for the attacker's IP address and the loaded IKE policies. Vulnerability Details: The function parse_isakmp_sa_body() calls the function ike_alg_enc_ok() twice, once to verify the algorithm and once to verify the key length. In openswan 2.6.29, the second call was changed to pass NULL as the errp pointer. The function ike_alg_enc_ok() error handler improperly dereferences the errp pointer. Full release: The latest openswan release which fixes all known issues can be found at: http://www.openswan.org/download/openswan-2.6.36.tar.gz http://www.openswan.org/download/openswan-2.6.36.tar.gz.asc (GPG signature) Patch: For those unable to upgrade to the latest openswan 2.6.36 release, the following patch can be used to resolve this problem: diff --git a/programs/pluto/ike_alg.c b/programs/pluto/ike_alg.c index 78aea4a..08b8d82 100644 --- a/programs/pluto/ike_alg.c +++ b/programs/pluto/ike_alg.c @@ -115,7 +115,7 @@ bool ike_alg_enc_ok(int ealg, unsigned key_len, ealg, key_len); } ); - if (!ret && *errp) + if (!ret && errp) *errp = ugh_buf; return ret; } This is now public. External References: http://www.openswan.org/download/CVE-2011-3380/CVE-2011-3380.txt Acknowledgements: Red Hat would like to thank the Openswan project for reporting this issue. Upstream acknowledges Paul Wouters as the original reporter. This issue has been addressed in following products: Red Hat Enterprise Linux 6 Via RHSA-2011:1356 https://rhn.redhat.com/errata/RHSA-2011-1356.html Created openswan tracking bugs for this issue Affects: fedora-all [bug 743760] should this bug be closed? Yes it should. Thanks for noticing. |