<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>156376</bug_id>
          
          <creation_ts>2006-11-26 23:32 0000</creation_ts>
          <short_desc>net-dialup/gnuradius format string vulnerability (CVE-2006-4181)</short_desc>
          <delta_ts>2006-12-15 07:56:26 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Security</product>
          <component>Vulnerabilities</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=443</bug_file_loc>
          <status_whiteboard>B1? [glsa]  jaervosz</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jaervosz@gentoo.org</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>net-dialup@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2006-11-26 23:32:46 0000</bug_when>
            <thetext>GNU Radius Format String Vulnerability
I. BACKGROUND
 GNU Radius is a centralized user authentication and accounting system. It supports back-end SQL databases for accounting. More information can be found at http://www.gnu.org/software/radius/ 
II. DESCRIPTION
 Remote exploitation of a format string vulnerability in GNU Radius could allow an attacker to execute code in the context of the running daemon. 
 The vulnerability specifically exists within the SQL accounting code. A format string is built using user supplied data and then unsafely passed to the variable argument function &apos;sqllog&apos;. 
III. ANALYSIS
 Successful exploitation allows unauthenticated remote attackers to execute arbitrary code in the context of the running radius daemon (radiusd). Typically the radius daemon will run as root. 
 Exploitation requires that radiusd be compiled with an SQL back-end and SQL accounting be turned on. These options are both turned on by default for FreeBSD and Gentoo Linux. 
IV. DETECTION
 iDefense has confirmed that this vulnerability is present in version 1.3 and 1.2 of GNU Radius. It is likely that all prior versions are vulnerable. 
V. WORKAROUND
 iDefense confirms that using one of the other supported accounting methods will mitigate exploitation of this vulnerability while still allowing accounting to take place. 
VI. VENDOR RESPONSE
 The GNU Radius team included a fix for this vulnerability in version 1.4. 
VII. CVE INFORMATION
 The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2006-4181 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems. 
VIII. DISCLOSURE TIMELINE
 08/16/2006 Initial vendor notification
 09/08/2006 Initial vendor response
 11/06/2006 Second vendor notification
 11/26/2006 Coordinated public disclosure
 
IX. CREDIT
 The discoverer of this vulnerability wishes to remain anonymous. 
Get paid for vulnerability research
http://labs.idefense.com/methodology/vulnerability/vcp.php
Free tools, research and upcoming events
http://labs.idefense.com/
X. LEGAL NOTICES
 Copyright </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2006-11-26 23:32:46 0000</bug_when>
            <thetext>GNU Radius Format String Vulnerability
I. BACKGROUND
 GNU Radius is a centralized user authentication and accounting system. It supports back-end SQL databases for accounting. More information can be found at http://www.gnu.org/software/radius/ 
II. DESCRIPTION
 Remote exploitation of a format string vulnerability in GNU Radius could allow an attacker to execute code in the context of the running daemon. 
 The vulnerability specifically exists within the SQL accounting code. A format string is built using user supplied data and then unsafely passed to the variable argument function &apos;sqllog&apos;. 
III. ANALYSIS
 Successful exploitation allows unauthenticated remote attackers to execute arbitrary code in the context of the running radius daemon (radiusd). Typically the radius daemon will run as root. 
 Exploitation requires that radiusd be compiled with an SQL back-end and SQL accounting be turned on. These options are both turned on by default for FreeBSD and Gentoo Linux. 
IV. DETECTION
 iDefense has confirmed that this vulnerability is present in version 1.3 and 1.2 of GNU Radius. It is likely that all prior versions are vulnerable. 
V. WORKAROUND
 iDefense confirms that using one of the other supported accounting methods will mitigate exploitation of this vulnerability while still allowing accounting to take place. 
VI. VENDOR RESPONSE
 The GNU Radius team included a fix for this vulnerability in version 1.4. 
VII. CVE INFORMATION
 The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2006-4181 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems. 
VIII. DISCLOSURE TIMELINE
 08/16/2006 Initial vendor notification
 09/08/2006 Initial vendor response
 11/06/2006 Second vendor notification
 11/26/2006 Coordinated public disclosure
 
IX. CREDIT
 The discoverer of this vulnerability wishes to remain anonymous. 
Get paid for vulnerability research
http://labs.idefense.com/methodology/vulnerability/vcp.php
Free tools, research and upcoming events
http://labs.idefense.com/
X. LEGAL NOTICES
 Copyright © 2006 iDefense, Inc.
 
 Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDefense. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please e-mail customer service for permission.
 
 Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2006-11-26 23:33:47 0000</bug_when>
            <thetext>net-dialup please advise and bump as necessary.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dercorny@gentoo.org</who>
            <bug_when>2006-11-27 00:40:39 0000</bug_when>
            <thetext>i guess SQL support is a useflag? is SQL accounting enabled by default?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mrness@gentoo.org</who>
            <bug_when>2006-11-27 10:22:42 0000</bug_when>
            <thetext>Version bumped and marked stable on x86 (the only keyword btw).

(In reply to comment #2)
&gt; i guess SQL support is a useflag? is SQL accounting enabled by default?

yes and yes.
However, we do not provide a init script for radius daemon.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dercorny@gentoo.org</who>
            <bug_when>2006-11-27 12:42:59 0000</bug_when>
            <thetext>does this really run with root privs like stated in the advisory? If so, this should be changed before sending a GLSA.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mrness@gentoo.org</who>
            <bug_when>2006-11-27 14:51:40 0000</bug_when>
            <thetext>Created an attachment (id=102869)
sqllog changes

The attachement describe changes occured in sqllog().

Since we don&apos;t provide a init script, I cannot say anything about this subject. The user decides under which privileges will run radius daemon, not us.

The fact that we don&apos;t provide a init script speak for itself: there aren&apos;t many gnuradius users. Most RADIUS peeps use freeradius (me included). 

sqllog function has no longer a variable list of arguments. Since all calls to that function had only the 2 mandatory arguments, I can only conclude that va_start can be exploited through a carefully chosen msg.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2006-12-11 08:16:42 0000</bug_when>
            <thetext>This one is ready for GLSA release. Sorry for the delay:-(</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>falco@gentoo.org</who>
            <bug_when>2006-12-15 07:56:26 0000</bug_when>
            <thetext>GLSA 200612-17</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>102869</attachid>
            <date>2006-11-27 14:51 0000</date>
            <desc>sqllog changes</desc>
            <filename>sqllog.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">QEAgLTQwOSwxNyArMzk5LDE1IEBACiAvKiBJbnRlcmZhY2UgKi8KIAogI2lmZGVmIFVTRV9TUUwK
LS8qUFJJTlRGTElLRTIqLwogdm9pZAotc3FsbG9nKGludCBzdGF0dXMsIGNoYXIgKm1zZywgLi4u
KQorc3FsbG9nKGludCBzdGF0dXMsIGNoYXIgKnF1ZXJ5KQogewotICAgICAgICB2YV9saXN0IGFw
OwogICAgICAgICBGSUxFICpmcDsKICAgICAgICAgY2hhciAqcGF0aDsKICAgICAgICAgY2hhciAq
ZmlsZW5hbWU7CiAKICAgICAgICAgZmlsZW5hbWUgPSBzdGF0dXMgPyAic3FsLWxvc3QiIDogInNx
bC5sb2ciOwotICAgICAgICBwYXRoID0gZ3JhZF9ta2ZpbGVuYW1lKHJhZGFjY3RfZGlyLCBmaWxl
bmFtZSk7CisgICAgICAgIHBhdGggPSBncmFkX21rZmlsZW5hbWUoZ3JhZF9hY2N0X2RpciwgZmls
ZW5hbWUpOwogICAgICAgICBpZiAoKGZwID0gZm9wZW4ocGF0aCwgImEiKSkgPT0gTlVMTCkgewog
ICAgICAgICAgICAgICAgIGdyYWRfbG9nKExfRVJSfExfUEVSUk9SLCAgCiAgICAgICAgICAgICAg
ICAgICAgICAgICAgXygiY291bGQgbm90IGFwcGVuZCB0byBmaWxlICVzIiksIHBhdGgpOwpAQCAt
NDI3LDEwICs0MTUsNyBAQAogICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgfQogICAg
ICAgICBncmFkX2ZyZWUocGF0aCk7Ci0JdmFfc3RhcnQoYXAsIG1zZyk7Ci0gICAgICAgIHZmcHJp
bnRmKGZwLCBtc2csIGFwKTsKLSAgICAgICAgZnByaW50ZihmcCwgIjtcbiIpOwotICAgICAgICB2
YV9lbmQoYXApOworICAgICAgICBmcHJpbnRmKGZwLCAiJXM7XG4iLCBxdWVyeSk7CiAgICAgICAg
IGZjbG9zZShmcCk7CiB9CiAjZW5kaWYK
</data>        

          </attachment>
    </bug>

</bugzilla>