Bug 232831 - net-firewall/ipsec-tools <0.7.1 racoon DoS (CVE-2008-3651,CVE-2008-3652)
Bug#: 232831 (CVE-2008-3651) Product:  Gentoo Security Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: security@gentoo.org Reported By: natanael.copa@gmail.com
Component: Vulnerabilities
URL:  http://marc.info/?l=ipsec-tools-devel&m=121688914101709&w=2
Summary: net-firewall/ipsec-tools <0.7.1 racoon DoS (CVE-2008-3651,CVE-2008-3652)
Keywords:  
Status Whiteboard: B3 [glsa]
Opened: 2008-07-24 11:21 0000
Description:   Opened: 2008-07-24 11:21 0000
From ipsec-tools mailing list

Ipsec-tools 0.7.1 is out, with some fixes and features, which includes
a fix for memory leak when receiving invalid proposals.

As this leak may lead to a DoS (it will take time.... but it can be
done in some configurations), everybody is advised to update to this
version ASAP.


Archives are available here
ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.7/ipsec-tools-0.7.1.tar.bz2
(please have a look at http://www.netbsd.org/mirrors/#ftp).
and soon here:
http://prdownloads.sourceforge.net/ipsec-tools/ipsec-tools-0.7.1.tar.bz2

------- Comment #1 From Jeremy Olexa (darkside) 2008-07-24 12:40:43 0000 -------
Maintainer-needed package.

------- Comment #2 From Pierre-Yves Rofes 2008-07-24 13:02:38 0000 -------
(In reply to comment #1)
> Maintainer-needed package.
> 
so it should be assigned to maintainer-needed, not security :)

------- Comment #3 From Pierre-Yves Rofes 2008-07-24 13:04:24 0000 -------
(In reply to comment #2)
> (In reply to comment #1)
> > Maintainer-needed package.
> > 
> so it should be assigned to maintainer-needed, not security :)
> 

err, didn't catch the DoS issue. sorry for the bugspam.

------- Comment #4 From Tomas Hoger 2008-07-25 12:39:14 0000 -------
This seems to be an upstream patch:
http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/dist/ipsec-tools/src/racoon/proposal.c.diff?r1=1.15&r2=1.16&f=h

------- Comment #5 From Natanael Copa 2008-07-25 13:59:00 0000 -------
(In reply to comment #4)
> This seems to be an upstream patch:
> http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/dist/ipsec-tools/src/racoon/proposal.c.diff?r1=1.15&r2=1.16&f=h
> 

well... as i understand, the fix is included in 0.7.1. version bump should be
enough.

------- Comment #6 From Robert Buchholz 2008-08-15 13:34:06 0000 -------
CVE-2008-3651 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-3651):
  Memory leak in racoon/proposal.c in the racoon daemon in ipsec-tools before
  0.7.1 allows remote authenticated users to cause a denial of service (memory
  consumption) via invalid proposals.

------- Comment #7 From Robert Buchholz 2008-08-15 13:38:05 0000 -------
hardened, netmon: Would you be willing to maintain this package?

------- Comment #8 From Robert Buchholz 2008-08-15 13:39:18 0000 -------
CVE-2008-3652 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-3652):
  src/racoon/handler.c in racoon in ipsec-tools does not remove an "orphaned
  ph1" (phase 1) handle when it has been initiated remotely, which allows
  remote attackers to cause a denial of service (resource consumption).

------- Comment #9 From Stefan Behte 2008-09-05 13:02:59 0000 -------
A fix would be cool. Isn't security@gentoo.org in charge when there is no
maintainer?!

Well, you usually firewall your IKE-Ports for Point-to-Point VPN but when
you've got some roadwarriors, you can't do that. :(

------- Comment #10 From solar 2008-09-05 14:57:33 0000 -------
(In reply to comment #7)
> hardened, netmon: Would you be willing to maintain this package?

Hardened will have to decline at this point in time. Perhaps crypto@gentoo..

------- Comment #11 From Christian Hoffmann 2008-09-06 15:36:58 0000 -------
So, hardened declined, crypto was proposed, changing CC accordingly.

------- Comment #12 From Stefan Behte 2008-09-08 19:21:46 0000 -------
The attached ebuild is much more cleaner and also fixes that only selinux needs
--enable-security-context (stolen from #213695).

:)

------- Comment #13 From Stefan Behte 2008-09-08 19:22:59 0000 -------
Created an attachment (id=164950) [details]
ipsec-tools-0.7.1.ebuild (with selinux fix)

------- Comment #14 From Daniel Black 2008-09-09 21:27:01 0000 -------
(In reply to comment #13)
> Created an attachment (id=164950) [edit] [details]
> ipsec-tools-0.7.1.ebuild (with selinux fix)
> 

Thanks Craig for the inclusion of selinux and the cleanup. I've added it after
making a few USE flags enabled by default. Please tell me if there is a major
impact here.

Of note this actually failed a self test that I've run out of time to diagnose.
 f346bb67 7075a9b5 27cf458f 7d302e68 6aa5c5b4 832f903b 5ea73298 0143abd2
 fbf5d927 d845aae9 13788714 989c5784 9b914c71 72f745e6 8b039819 3085bf4d
 ca3e46ee 00b36bcc 85fc210e bbde5da7 a05519fe 7f56ffec afebd3c5 ae2069e7
ERROR: sharing gxy mismatched.

!!!!! Test 'dh' failed. !!!!!

FAIL: eaytest
===================
1 of 1 tests failed
===================

Users: please test and note weither it works and wheither it should be marked
stable on this bug report.

------- Comment #15 From Peter Volkov 2008-09-10 07:55:57 0000 -------
Daniel this test failure is not new, see bug 196517. So if you have setup to
test this package, please, bump it. BTW there some other bugs ipsec-tools and
some of them either should be marked fixed with this version bump or have patch
applied.

------- Comment #16 From Robert Buchholz 2008-09-14 11:30:13 0000 -------
Daniel, are you going to have a look at the remaining bugs, or should we go
ahead stabling this version?

------- Comment #17 From Daniel Black 2008-10-08 11:40:46 0000 -------
(In reply to comment #16)
> Daniel, are you going to have a look at the remaining bugs, or should we go
> ahead stabling this version?
> 

only 223319 seems still revelant. rest are upstream or are included.

as i've lost cvs access in my few weeks off moving house if someone could
commit the patch from 223319 and go stable from there that would be good.

------- Comment #18 From Robert Buchholz 2008-10-08 12:19:58 0000 -------
> commit the patch from 223319 and go stable from there that would be good.

done, thanks for investigating

------- Comment #19 From Robert Buchholz 2008-10-08 12:22:14 0000 -------
Arches, please test and mark stable:
=net-firewall/ipsec-tools-0.7.1
Target keywords : "amd64 ppc sparc x86"

------- Comment #20 From Stefan Behte 2008-10-08 16:52:06 0000 -------
Daniel, it's a shame you lost cvs.
The updated racoon runs stable since 14hrs for me.

------- Comment #21 From Markus Meier 2008-10-08 19:10:01 0000 -------
amd64/x86 stable

------- Comment #22 From Friedrich Oslage 2008-10-11 13:07:14 0000 -------
sparc stable

------- Comment #23 From Tobias Scherbaum 2008-10-16 18:15:24 0000 -------
ppc stable

------- Comment #24 From Tobias Heinlein 2008-10-16 18:52:50 0000 -------
Ready for vote, I vote YES.

------- Comment #25 From Robert Buchholz 2008-11-26 18:44:58 0000 -------
YES, filed

------- Comment #26 From Robert Buchholz 2008-12-02 17:50:42 0000 -------
GLSA 200812-03