SecurityTracker.com
Keep Track of the Latest Vulnerabilities
with SecurityTracker!
    Home    |    View Topics    |    Search    |    Contact Us    |    Help    |   

SecurityTracker
Archives


Welcome to SecurityTracker!
 
Click to Sign Up
Sign Up
Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
Instant Alerts
Buy our Premium Vulnerability Notification Service to receive customized, instant alerts
Affiliates
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
Partners
Become a Partner and License Our Database or Notification Service
Report a Bug
Report a vulnerability that you have found to SecurityTracker
bugs
@
securitytracker.com

Sign Up!





Category:  Application (Generic)  >  Linuxconf Vendors:  Gelinas,Jacques et al
Linuxconf Administration Utility Buffer Overflow in Processing the 'LINUXCONF_LANG' Environment Variable Lets Local Users Obtain Root Privileges
SecurityTracker Alert ID:  1005153
CVE Reference:  GENERIC-MAP-NOMATCH   (Links to External Site)
Date:  Aug 29 2002
Impact:  Execution of arbitrary code via local system, Root access via local system
Fix Available:  Yes   Vendor Confirmed:  Yes  
Version(s): prior to 1.28r4
Description:  A buffer overflow vulnerability was reported in the 'linuxconf' Linux administration utilities. A local user may be able to execute arbitrary code to gain root privileges on the system.

iDEFENSE issued an advisory warning that a local user can set the LINUXCONF_LANG environment variable to greater than 964 bytes of data to trigger the overflow and potentially execute arbitrary code on the system. It is reported that some distributions configure linuxconf with set user id (setuid) root privileges. In that case, the code would run with root level privileges.

The report indicates that linuxconf properly formats the specified path. However, if the referenced file does not exist, an error message is generated using sprintf, which can be overflowed.

Impact:  A local user can execute arbitrary code with the privileges of linuxconf, which may be root privileges on some installation.
Solution:  The vendor has provided a source code patch and has released a fixed version (1.28r4), available at:

http://www.solucorp.qc.ca/linuxconf/

As a workaround, the author indicates that you can remove the setuid bit from the linuxconf binary:

$ chmod u-s /bin/linuxconf

Vendor URL:  www.solucorp.qc.ca/linuxconf/ (Links to External Site)
Cause:  Boundary error
Underlying OS:  Linux (Any)
Reported By:  "David Endler" <dendler@idefense.com>
Message History:   None.


 Source Message Contents

Date:  Wed, 28 Aug 2002 11:58:53 -0400
From:  "David Endler" <dendler@idefense.com>
Subject:  iDEFENSE Security Advisory: Linuxconf locally exploitable buffer overflow

 

 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

iDEFENSE Security Advisory 08.28.2002
Linuxconf locally exploitable buffer overflow vulnerability

DESCRIPTION 

A vulnerability exists in linuxconf which if the 
LINUXCONF_LANG environment variable processes at least 964 
bytes of data, a buffer overflow occurs, thereby allowing an 
attacker to modify the return address of the function and 
execute arbitrary code with root permissions.  iDEFENSE has an 
exploit that allows a local user to launch a root shell on Red 
Hat Linux 7.3 by targeting the latest version of linuxconf 
1.28r3. 


ANALYSIS

According to the author of Linuxconf, Jacques Gelinas 
jack@solucorp.qc.ca, "linuxconf picks the variable and uses it 
to format a path using snprintf. This works fine. In fact, the 
receiving buffer is PATH_MAX large so even a 1000 characters 
variable won't overflow it and even if this was the case, 
snprintf would do its work. 

Once the path is formatted, the corresponding file is opened. 
If the file do not exist, an error message is formatted in a 
string. This was the problem and sprintf was used instead of 
snprintf there.

There are two fixes. One is to use snprintf to format error 
message at this place and the other is to look for appropriate 
length for this variable (max 5 characters) immediately when it 
is found."


DETECTION

This vulnerability affects any version of linuxconf 
(essentially 6 years worth of distributions) that is installed 
setuid root.  Generally, the four ways in which this utility 
can be installed setuid are:

1.) Shipped by vendor (Red Hat does not ship linuxconf 
setuid, but Mandrake does as do other linux vendors)
2.) Installed by RPM from the main site 
(http://www.solucorp.qc.ca/linuxconf/) for each particular 
linux OS (installs setuid root by default)
3.) Installed by source code also from main site 
(http://www.solucorp.qc.ca/linuxconf/) but prompts for whether 
to install setuid root 
4.) Installed in ways 1, 2, or 3 and manually set to setuid 
root by the user for added functionality.


WORKAROUND

Remove the setuid bit from the linuxconf binary:

$ chmod u-s /bin/linuxconf


VENDOR RESPONSE

iDEFENSE immediately contacted Jacques Gelinas and he provided 
a source code patch.  iDEFENSE verified that the vulnerability 
is mitigated in the newer distribution (1.28r4) of linuxconf.  

An updated version (1.28r4) of linuxconf which addresses this 
vulnerability will be available on August 28, 2002 at
http://www.solucorp.qc.ca/linuxconf/ .

Affected Linux vendors will make updates available 
August 28th, 2002.


DISCLOSURE TIMELINE


August 9, 2002 - Exclusively disclosed to iDEFENSE
August 19, 2002 - Disclosed to Vendor
August 19, 2002 - Disclosed to iDEFENSE clients
August 21, 2002 - Announcement to vendor-sec@lst.de
August 28, 2002 - Coordinated public disclosure by Linux vendors,  
	Linuxconf maintainer, and iDEFENSE


CREDIT

This issue was exclusively disclosed to iDEFENSE by Euan Briggs
(euan_briggs@btinternet.com)


http://www.idefense.com/contributor.html


- - -dave


David Endler, CISSP
Director, Technical Intelligence
iDEFENSE, Inc.
14151 Newbrook Drive
Suite 100
Chantilly, VA 20151
voice: 703-344-2632
fax: 703-961-1071

dendler@idefense.com
www.idefense.com

-----BEGIN PGP SIGNATURE-----
Version: PGP 7.1.1

iQA/AwUBPWzPr0rdNYRLCswqEQK4BQCfRNs+pQacI3q7eFNibtkQ8CQ+OlQAoOil
L8EJZISNsIFSig7PD4Uip392
=SStn
-----END PGP SIGNATURE-----

 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us   |    Help

Copyright 2002, SecurityGlobal.net LLC