Bug 1232320 (CVE-2015-3240)

Summary: CVE-2015-3240 libreswan / openswan: denial of service via IKE daemon restart when receiving a bad DH gx value
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jrusnack, pwouters, security-response-team, slong
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A flaw was discovered in the way Libreswan's IKE daemon processed IKE KE payloads. A remote attacker could send specially crafted IKE payload with a KE payload of g^x=0 that, when processed, would lead to a denial of service (daemon crash).
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-20 07:15:14 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: 1256802, 1256803, 1259206, 1259207, 1259208, 1259209    
Bug Blocks: 1232321    

Description Vasyl Kaigorodov 2015-06-16 13:25:25 UTC
Paul Wouters of Red Hat reported a denial of service issue in libreswan/openswan:

If the peer sends us a DH gx value of 0, openswan/libreswan passes it to the NSS library, which returns NULL because it cannot perform DH with 0, which hits a passert() in the swan code. An attacker can keep connecting to the service and perform the bad DH, causing a denial of service.

Comment 3 Paul Wouters 2015-08-25 04:51:18 UTC
This issue is now public: https://libreswan.org/security/CVE-2015-3240/

Comment 4 Adam Mariš 2015-08-25 13:22:23 UTC
Created libreswan tracking bugs for this issue:

Affects: epel-all [bug 1256803]

Comment 5 Fedora Update System 2015-08-26 17:25:10 UTC
libreswan-3.15-1.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update libreswan'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14179

Comment 6 Paul Wouters 2015-08-27 13:54:18 UTC
note that using libreswan-3,15 you can test sending a bad g^x by running:

ipsec start
ipsec auto --add connname
ipsec whack --debug-all --impair-send-zero-gx
ipsec auto --up connname

Comment 9 Martin Prpič 2015-11-03 07:44:26 UTC
Acknowledgement:

This issue was discovered by Paul Wouters of Red Hat.

Comment 10 Tomas Hoger 2015-11-03 12:04:22 UTC
External References:

https://libreswan.org/security/CVE-2015-3240/

Comment 11 errata-xmlrpc 2015-11-04 08:37:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2015:1979 https://rhn.redhat.com/errata/RHSA-2015-1979.html