SecurityTracker.com
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 


Category:   Application (Generic)  >   Sudo Vendors:   Miller, Todd C.
(EnGarde Issues Fix) Sudo Utility Has Heap Overflow That May Let Local Users Execute Arbitrary Code with Root Privileges
SecurityTracker Alert ID:  1004175
SecurityTracker URL:  http://securitytracker.com/id/1004175
CVE Reference:   CVE-2002-0184   (Links to External Site)
Updated:  Nov 20 2003
Original Entry Date:  Apr 29 2002
Impact:   Execution of arbitrary code via local system, Root access via local system
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 1.6.5p2 and prior
Description:   A vulnerability has been reported in the sudo utility. A local user may be able to obtain root privileges.

Global InterSec reported an off-by-five heap overflow in 'sudo'. A local user can apparently call sudo with a specially formatted argument for the -p command line option to trigger the overflow. It is reported that sudo may not correctly allocate memory when parsing the '%h' (hostname) or '%u' (username) strings in the argument in some situations. A local user could potentially trigger the overflow and execute arbitrary code with root privileges.

The exact nature of the conditions required to exploit this flaw were not provided. However, it is reported that the compile-time options and the length of the hostname may affect whether the application is vulnerable or not.

Impact:   A local user may be able to execute arbitrary code with root privileges in certain situations.
Solution:   EnGarde has released a fix.

Users of the EnGarde Professional edition can use the Guardian Digital Secure Network to update their systems automatically.

EnGarde Community users should upgrade to the most recent version as outlined in this advisory. Updates may be obtained from:

ftp://ftp.engardelinux.org/pub/engarde/stable/updates/
http://ftp.engardelinux.org/pub/engarde/stable/updates/

Before upgrading the package, the machine must either:

a) be booted into a "standard" kernel; or
b) have LIDS disabled.

To disable LIDS, execute the command:

# /sbin/lidsadm -S -- -LIDS_GLOBAL

To install the updated package, execute the command:

# rpm -Uvh <filename>

You must now update the LIDS configuration by executing the command:

# /usr/sbin/config_lids.pl

To re-enable LIDS (if it was disabled), execute the command:

# /sbin/lidsadm -S -- +LIDS_GLOBAL

To verify the signatures of the updated packages, execute the command:

# rpm -Kv <filename>

These updated packages are for EnGarde Secure Linux Community Edition:

Source Packages:

SRPMS/sudo-1.6.4-1.0.7.src.rpm
MD5 Sum: 75db702281fec73962968f099e1a959c

Binary Packages:

i386/sudo-1.6.4-1.0.7.i386.rpm
MD5 Sum: 0ecafa8dd05315772afa7e77f7089d69

i686/sudo-1.6.4-1.0.7.i686.rpm
MD5 Sum: a267c880a9e0093e4e13d140898756cc

Vendor URL:  www.courtesan.com/sudo/ (Links to External Site)
Cause:   Boundary error
Underlying OS:  Linux (EnGarde)

Message History:   This archive entry is a follow-up to the message listed below.
Apr 25 2002 Sudo Utility Has Heap Overflow That May Let Local Users Execute Arbitrary Code with Root Privileges



 Source Message Contents

Subject:  [ESA-20020429-010] 'sudo' heap corruption vulnerability




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


+------------------------------------------------------------------------+
| EnGarde Secure Linux Security Advisory                  April 29, 2002 |
| http://www.engardelinux.org/                          ESA-20020429-010 |
|                                                                        |
| Package:  sudo                                                         |
| Summary:  sudo heap corruption vulnerability.                          |
+------------------------------------------------------------------------+

  EnGarde Secure Linux is a secure distribution of Linux that features
  improved access control, host and network intrusion detection, Web
  based secure remote management, complete e-commerce using AllCommerce,
  and integrated open source security tools.

OVERVIEW
- --------
  There is a heap corruption vulnerability in sudo which may allow an
  attacker to execute arbitrary commands.

DETAIL
- ------
  sudo allows a permitted user to execute a command as the superuser or
  another user, as specified in the sudoers file.  It takes a -p argument
  which allows the user to specify a custom password prompt.

  The user is permitted to use %u and %h macros which are expanded to
  their username and the systems hostname.  When parsing the argument to
  -p sudo will malloc() memory for the string that is to become the 
  password prompt.

  By using a specially crafted argument the user may trick sudo into
  allocating less memory then it should for this prompt.  If sudo was
  compiled with PAM support (which it is in most Linux distributions) the
  user may corrupt the heap and execute arbitrary commands.

SOLUTION
- --------
  Users of the EnGarde Professional edition can use the Guardian Digital
  Secure Network to update their systems automatically.

  EnGarde Community users should upgrade to the most recent version
  as outlined in this advisory.  Updates may be obtained from:

    ftp://ftp.engardelinux.org/pub/engarde/stable/updates/
    http://ftp.engardelinux.org/pub/engarde/stable/updates/

  Before upgrading the package, the machine must either:

    a) be booted into a "standard" kernel; or
    b) have LIDS disabled.

  To disable LIDS, execute the command:

    # /sbin/lidsadm -S -- -LIDS_GLOBAL

  To install the updated package, execute the command:

    # rpm -Uvh <filename>

  You must now update the LIDS configuration by executing the command:

    # /usr/sbin/config_lids.pl

  To re-enable LIDS (if it was disabled), execute the command:

    # /sbin/lidsadm -S -- +LIDS_GLOBAL

  To verify the signatures of the updated packages, execute the command:

    # rpm -Kv <filename>

UPDATED PACKAGES
- ----------------
  These updated packages are for EnGarde Secure Linux Community
  Edition.

  Source Packages:

    SRPMS/sudo-1.6.4-1.0.7.src.rpm
      MD5 Sum: 75db702281fec73962968f099e1a959c

  Binary Packages:

    i386/sudo-1.6.4-1.0.7.i386.rpm
      MD5 Sum: 0ecafa8dd05315772afa7e77f7089d69

    i686/sudo-1.6.4-1.0.7.i686.rpm
      MD5 Sum: a267c880a9e0093e4e13d140898756cc

REFERENCES
- ----------
  Guardian Digital's public key:
    http://ftp.engardelinux.org/pub/engarde/ENGARDE-GPG-KEY

  Credit for the discovery of this bug goes to:
    fc, with research/coordination by Global InterSec

  sudo's Official Web Site:
    http://www.sudo.ws/

  Security Contact:    security@guardiandigital.com
  EnGarde Advisories:  http://www.engardelinux.org/advisories.html

- --------------------------------------------------------------------------
$Id: ESA-20020429-010-sudo,v 1.2 2002/04/29 12:45:39 rwm Exp $
- --------------------------------------------------------------------------
Author: Ryan W. Maple, <ryan@guardiandigital.com> 
Copyright 2002, Guardian Digital, Inc.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8zUJSHD5cqd57fu0RAjllAJ9Op27A6vfkkJkEuuYuzqCJfenqGwCfZWiT
Oz+VLltXAen6krbFC2I0Dio=
=1D2t
-----END PGP SIGNATURE-----

------------------------------------------------------------------------
     To unsubscribe email engarde-security-request@engardelinux.org
         with "unsubscribe" in the subject of the message.

Copyright(c) 2001 Guardian Digital, Inc.                EnGardeLinux.org
------------------------------------------------------------------------




 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2020, SecurityGlobal.net LLC