Bug 62389 (CVE-2004-0961)

Summary: VUL-0: CVE-2004-0961: freeradius DoS
Product: [Novell Products] SUSE Security Incidents Reporter: Ludwig Nussel <lnussel>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: RESOLVED FIXED QA Contact: Security Team bot <security-team>
Severity: Major    
Priority: P3 - Medium CC: patch-request, security-team, stark, stefan.fent
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard: CVE-2004-0961: CVSS v2 Base Score: 5.0 (AV:N/AC:L/Au:N/C:N/I:N/A:P)
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ludwig Nussel 2004-10-19 16:25:48 UTC
We received the following report via vendor-sec.
The issue is public.

freeradius 1.0.1 apparently fixes some bugs that can lead to DoS
http://www.freeradius.org/security.html

Date: Tue, 19 Oct 2004 07:58:35 +0100 (BST)
From: Mark J Cox <mjc@redhat.com>
To: vendor-sec@lst.de
Subject: [vendor-sec] FreeRADIUS CVE names


======================================================
Candidate: CAN-2004-0938
URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0938
Final-Decision: 
Interim-Decision: 
Modified: 
Proposed: 
Assigned: 20041006
Category: SF
Reference: GENTOO:GLSA-200409-29
Reference: URL:http://security.gentoo.org/glsa/glsa-200409-29.xml
Reference: CERT-VN:VU#541574
Reference: URL:http://www.kb.cert.org/vuls/id/541574
Reference: BID:11222
Reference: URL:http://www.securityfocus.com/bid/11222
Reference: OSVDB:10178
Reference: URL:http://www.osvdb.org/10178
Reference: XF:freeradius-dos(17440)
Reference: URL:http://xforce.iss.net/xforce/xfdb/17440

FreeRADIUS before 1.0.1 allows remote attackers to cause a denial of
service (server crash) by sending an Ascend-Send-Secret attribute
without the required leading packet.



======================================================
Candidate: CAN-2004-0960
URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0960
Final-Decision: 
Interim-Decision: 
Modified: 
Proposed: 
Assigned: 20041018
Category: SF
Reference: GENTOO:GLSA-200409-29
Reference: URL:http://security.gentoo.org/glsa/glsa-200409-29.xml
Reference: CERT-VN:VU#541574
Reference: URL:http://www.kb.cert.org/vuls/id/541574
Reference: BID:11222
Reference: URL:http://www.securityfocus.com/bid/11222

FreeRADIUS before 1.0.1 allows remote attackers to cause a denial of
service (core dump) via malformed USR vendor-specific attributes (VSA)
that cause a memcpy operation with a -1 argument.



======================================================
Candidate: CAN-2004-0961
URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0961
Final-Decision: 
Interim-Decision: 
Modified: 
Proposed: 
Assigned: 20041018
Category: SF
Reference: GENTOO:GLSA-200409-29
Reference: URL:http://security.gentoo.org/glsa/glsa-200409-29.xml
Reference: CERT-VN:VU#541574
Reference: URL:http://www.kb.cert.org/vuls/id/541574
Reference: BID:11222
Reference: URL:http://www.securityfocus.com/bid/11222

Memory leak in FreeRADIUS before 1.0.1 allows remote attackers to
cause a denial of service (memory exhaustion) via a series of
Access-Request packets with (1) Ascend-Send-Secret, (2)
Ascend-Recv-Secret, or (3) Tunnel-Password attributes.


_______________________________________________
Vendor Security mailing list
Vendor Security@lst.de
https://www.lst.de/cgi-bin/mailman/listinfo/vendor-sec
Comment 1 Wolfgang Rosenauer 2004-10-19 17:04:28 UTC
I will check which version need to be fixed.
Comment 2 Wolfgang Rosenauer 2004-10-19 20:43:03 UTC
seems that all our "maintained" versions are affected:

8.1/SLES8/UL: 0.5
8.2:          0.8.1
9.0:          0.9
9.1/SLES9:    0.9.3
9.2:          1.0.0

Do we want backports for all these versions?
Comment 3 Wolfgang Rosenauer 2004-10-20 15:56:40 UTC
I have packages ready for every version which are building fine.
The problem is to test them all. I don't have the time and ressources to install
and test all of them. How do we proceed?
Comment 4 Ludwig Nussel 2004-10-20 16:20:41 UTC
QA will test the testcases you have in the pdb for SLES. Box version will be 
released untested unless we tell QA to test them as well. 
Comment 5 Wolfgang Rosenauer 2004-10-20 17:32:29 UTC
all packages have been submitted to /work/src/done and are waiting for checkin.
Please provide the patchinfo files, thanks.
Comment 6 Ludwig Nussel 2004-10-20 17:39:51 UTC
you refer only to one of the bugs in the changelog, are we not affected by the 
others? 
Comment 7 Wolfgang Rosenauer 2004-10-20 18:02:13 UTC
oops, you are right, I forgot to mention the others.
I've extracted the different fixes from project CVS and applied them as far as
possible to older versions. Since our oldest version is 0.5 there are many
differences in the code and for some changes I couldn't find an equivalent.
So it would make sense if some of you would review the patches in addition.
Comment 8 Ludwig Nussel 2004-10-20 19:36:11 UTC
patch for 9.1 looks good. You added an additional fix so that the random pool 
doesn't get reinitialized all the time. Lack of that fix is probably an 
unmentioned weakness in older versions. Furthermore 1.0.1 contains a fix for 
regex matching in src/main/valuepair.c: 
 			compare = regexec(&reg, 
 			  (char *)auth_item->strvalue, 
-			  16, rxmatch, 0); 
+			  REQUEST_MAX_REGEX + 1, 
+			  rxmatch, 0); 
 
rxmatch has only 9 entries so it could overflow by 7 bytes in < 1.0.1. No idea 
if that is harmful there. 
Comment 9 Wolfgang Rosenauer 2004-10-20 20:11:41 UTC
I was in contact with the author and the security issues are all handled in
src/lib/radius.c according to him. So I patched only this file.
Comment 10 Ludwig Nussel 2004-10-20 20:46:44 UTC
Ok, thanks. The patches for 8.1-9.0 also look good. The check for attrlen in 
rad_decode() apparently is not needed in pre 1.0 as it is already checked in 
rad_recv() 
Comment 11 Stefan Fent 2004-11-05 18:39:05 UTC
Here is another patch to make it build correctly on x86_64

--- configure.ORG       2003-11-20 21:14:50.000000000 +0100
+++ configure   2004-11-05 10:33:48.382611892 +0100
@@ -1881,7 +1881,7 @@
 # This must be Linux ELF.
 linux-gnu*)
   case $host_cpu in
-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
+  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* | x86_64*)
     lt_cv_deplibs_check_method=pass_all ;;
   *)
     # glibc up to 2.1.1 does not perform some relocations on ARM

w/o this patch, freeradius doesn't work at all on x86_64
Comment 12 Michael Schröder 2004-11-08 22:12:25 UTC
Ok, so what's with patchinfo 37eb5c6bf8b4aca8f550659a4f3926c1 and
e2a19d65493e3f891fa2ffb498b81a4d? Should we cancel and resubmit them?
Comment 13 Michael Schröder 2004-11-08 22:16:24 UTC
(and what's with 9.2 and sles8 aka 8.1. Isn't the patch needed for them as
well?)
Comment 14 Harald Mueller-Ney 2004-11-08 22:55:18 UTC
See below snippets from some mail - please "resubmit"
I will reject the current patches after checkin of the new patchinfos ...

> Is 9.2-x86_64 hit by this problem? Marked als directories to manipulate.

no the 9.2 versions seems to be fixed. The libs are in the RPM package


SLES8 is not affected but 9.0-x86_64 and 9.1-x86_64 are.
So I will submit a fixed package for 9.1/SLES9 and for 9.0.
Can you submit 9.0 with the old patchinfo, too?
Comment 15 Michael Schröder 2004-11-08 23:45:29 UTC
Huh? Packages for 9.0/9.1 were just checked in.
Comment 16 Wolfgang Rosenauer 2004-11-09 14:49:39 UTC
OK, let's sum up:

8.1, 8.2 and 9.2 were fixed some days ago as 9.0 and 9.1.
But we found a problem with AMD64 on SLES9 which occurs on 9.0 and 9.1.
So these two version got another small fix.
All fixed packages are now checked in.
Comment 17 Michael Schröder 2004-11-09 18:26:06 UTC
Yes. The question was if I should resubmit the two patchinfos...
Comment 18 Ludwig Nussel 2004-11-09 18:37:02 UTC
Harald said yesterday that you are going to resubmit the patchinfos and he 
will reject the currently active ones then. 
Comment 19 Michael Schröder 2004-11-09 18:44:49 UTC
Will do. He should not reject 9dbb825d4a68104e44f645e93d1bfd6c,
1e45eb63952773be3469e841fc17e9a7.
He should reject 37eb5c6bf8b4aca8f550659a4f3926c1 and
e2a19d65493e3f891fa2ffb498b81a4d.
Comment 20 Thomas Biege 2004-11-18 00:22:43 UTC
packages released. 
 
 
To: security-intern@suse.de, ro@suse.de 
From: patch_system@suse.de 
Date: Thu, 11 Nov 2004 11:50:17 +0100 (CET) 
Cc: 
Subject: [sec-int] [putonftp] secfix freeradius-0.8.1-156.i586.rpm 
Reply-To: security-intern@suse.de 
Errors-To: security-intern-bounces+thomas=suse.de@suse.de 
 
Script 'mail_hack' called by root 
package:freeradius-0.8.1-156.i586.rpm 
comment:Several bugs that would allow attackers to remotely crash freeradius 
have been fixed (CAN-2004-0938, CAN-2004-0960, CAN-2004-0961). 
comment_de:Mehrere Fehler, die es einem entfernten Angreifer erm\366glichen 
w\374rden, freeradius zum Absturz zu bringen, wurden behoben 
(CAN-2004-0938, CAN-2004-0960, CAN-2004-0961). 
md5sum:9dbb825d4a68104e44f645e93d1bfd6c 
url:ftp://ftp.suse.com/pub/suse/i386/update/8.2/rpm/i586/freeradius-0.8.1-156.i586.rpm 
 
Comment 21 Thomas Biege 2009-10-13 19:54:05 UTC
CVE-2004-0961: CVSS v2 Base Score: 5.0 (AV:N/AC:L/Au:N/C:N/I:N/A:P)