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

SecurityTracker
Archives


 
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






Category:   Application (Generic)  >   man-db Vendors:   Watson, Colin et al
(Debian Issues Fix) 'man-db' Buffer Overflows Let Local Users Execute Arbitrary Code
SecurityTracker Alert ID:  1007412
SecurityTracker URL:  http://securitytracker.com/id/1007412
CVE Reference:   CAN-2003-0620   (Links to External Site)
Date:  Aug 5 2003
Impact:   Execution of arbitrary code via local system, User access via local system
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 2.4.1 and prior
Description:   Several vulnerabilities were reported in 'man-db'. A local user can cause man-db to execute arbitrary code.

Vade79 reported a buffer overflow in the add_to_dirlist() function in the 'src/manp.c' file. MANDATORY_MANPATH, MANPATH_MAP, and MANDB_MAP values are not properly validate to limit their size. According to the report, this overflow by itself can (likely) only be used to overwrite characters in the buffer and not to execute arbitrary code. However, a local user can reportedly supply large values that can trigger overflows in other functions.

The report indicates that many functions allocate buffers of 4095 bytes, but a local user can pass values of 8192 bytes.

A demonstration exploit transcript is provided:

# cd /tmp
# mkdir x
# echo MANDB_MAP `perl -e 'print"x"x8100'` x >~/.manpath
# mandb

It is also reported that the ult_src() function in the 'src/ult_src.c' file contains an incorrect buffer size (that is too small) for the 'path' variable. A local user may be able to execute arbitrary code.

A demonstration exploit is provided:

# man -M `perl -e 'print"/"x2100'`usr/share/man ls

It is also reported that the software does not perform bounds checking for linked '.so' man pages.

A demonstration exploit transcript is provided:

# cd /tmp
# mkdir man man/man1
# echo .so `perl -e 'print"x"x1024'` >man/man1/x.1
# man -M /tmp/man x

Finally, several overflows were reported in the processing of user-supplied PATH/MANPATH values.

A demonstration exploit is provided:

# man -M `perl -e 'print"/tmp:"x260'` x

Impact:   A local user may be able to cause man-db to execute arbitrary code with set group id (setgid) 'man' group privileges.
Solution:   Debian has released a fix for the current stable distribution (woody) in version 2.3.20-18.woody.2 and for the unstable distribution (sid) in version 2.4.1-12.

Debian GNU/Linux 3.0 alias woody:

Source archives:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2.dsc
Size/MD5 checksum: 632 88f2a959f43f5315d0a806717efc0059
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2.diff.gz
Size/MD5 checksum: 106550 11c00b2f23ab67aecdb3a22483c9ece8
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20.orig.tar.gz
Size/MD5 checksum: 516391 5021f8a23cba9b14df39aa06407baefb

Alpha architecture:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_alpha.deb
Size/MD5 checksum: 543394 1111c3763d4f237ea6d73fb2a03064b5

ARM architecture:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_arm.deb
Size/MD5 checksum: 478414 e188ec3286cfcc8c8f987a90b080413b

Intel IA-32 architecture:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_i386.deb
Size/MD5 checksum: 472766 1f93cf6f4cfeed221190ffb8dc7d60f7

Intel IA-64 architecture:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_ia64.deb
Size/MD5 checksum: 601548 e387151776a92d633bd9aad2c0412036

HP Precision architecture:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_hppa.deb
Size/MD5 checksum: 521056 7008ad4cbd4b0ee3b6d43c9cc552f5ab

Motorola 680x0 architecture:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_m68k.deb
Size/MD5 checksum: 467578 cd566e411a14c30ff3ee45261e864697

Big endian MIPS architecture:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_mips.deb
Size/MD5 checksum: 516014 c5cb6f88eaf124fa43ea262441f82a05

Little endian MIPS architecture:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_mipsel.deb
Size/MD5 checksum: 517142 cae6cd634af680723502e5571bb40ac3

PowerPC architecture:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_powerpc.deb
Size/MD5 checksum: 493992 fb696ef74405d4b8f53cadf89180f48d

IBM S/390 architecture:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_s390.deb
Size/MD5 checksum: 479112 0deef4a03421377c52befbc2bea5ed31

Sun Sparc architecture:

http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_sparc.deb
Size/MD5 checksum: 479184 c5f7de23038fc8d29db0475062a706fc

Vendor URL:  www.debian.org/security/ (Links to External Site)
Cause:   Boundary error
Underlying OS:   Linux (Debian)

Message History:   This archive entry is a follow-up to the message listed below.
Jul 29 2003 'man-db' Buffer Overflows Let Local Users Execute Arbitrary Code



 Source Message Contents

Date:  Mon, 4 Aug 2003 20:37:57 -0400
Subject:  [SECURITY] [DSA-364-1] New man-db packages fix buffer overflows, arbitrary command execution


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

- --------------------------------------------------------------------------
Debian Security Advisory DSA 364-1                     security@debian.org
http://www.debian.org/security/                             Matt Zimmerman
August 4th, 2003                        http://www.debian.org/security/faq
- --------------------------------------------------------------------------

Package        : man-db
Vulnerability  : buffer overflows, arbitrary command execution
Problem-Type   : local
Debian-specific: no
CVE Ids        : CAN-2003-0620, CAN-2003-0645

man-db provides the standard man(1) command on Debian systems.  During
configuration of this package, the administrator is asked whether
man(1) should run setuid to a dedicated user ("man") in order to
provide a shared cache of preformatted manual pages.  The default is
for man(1) NOT to be setuid, and in this configuration no known
vulnerability exists.  However, if the user explicitly requests setuid
operation, a local attacker could exploit either of the following bugs to
execute arbitrary code as the "man" user.

Again, these vulnerabilities do not affect the default configuration,
where man is not setuid.

- - CAN-2003-0620: Multiple buffer overflows in man-db 2.4.1 and
  earlier, when installed setuid, allow local users to gain privileges
  via (1) MANDATORY_MANPATH, MANPATH_MAP, and MANDB_MAP arguments to
  add_to_dirlist in manp.c, (2) a long pathname to ult_src in
  ult_src.c, (3) a long .so argument to test_for_include in ult_src.c,
  (4) a long MANPATH environment variable, or (5) a long PATH
  environment variable.

- - CAN-2003-0645: Certain DEFINE directives in ~/.manpath, which
  contained commands to be executed, would be honored even when
  running setuid, allowing any user to execute commands as the
  "man" user.

For the current stable distribution (woody), these problems have been
fixed in version 2.3.20-18.woody.2.

For the unstable distribution (sid), these problems have been fixed in
version 2.4.1-12.

We recommend that you update your man-db package.

Upgrade Instructions
- --------------------

wget url
        will fetch the file for you
dpkg -i file.deb
        will install the referenced file.

If you are using the apt-get package manager, use the line for
sources.list as given below:

apt-get update
        will update the internal database
apt-get upgrade
        will install corrected packages

You may use an automated update by adding the resources from the
footer to the proper configuration.

Debian GNU/Linux 3.0 alias woody
- --------------------------------

  Source archives:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2.dsc
      Size/MD5 checksum:      632 88f2a959f43f5315d0a806717efc0059
    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2.diff.gz
      Size/MD5 checksum:   106550 11c00b2f23ab67aecdb3a22483c9ece8
    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20.orig.tar.gz
      Size/MD5 checksum:   516391 5021f8a23cba9b14df39aa06407baefb

  Alpha architecture:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_alpha.deb
      Size/MD5 checksum:   543394 1111c3763d4f237ea6d73fb2a03064b5

  ARM architecture:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_arm.deb
      Size/MD5 checksum:   478414 e188ec3286cfcc8c8f987a90b080413b

  Intel IA-32 architecture:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_i386.deb
      Size/MD5 checksum:   472766 1f93cf6f4cfeed221190ffb8dc7d60f7

  Intel IA-64 architecture:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_ia64.deb
      Size/MD5 checksum:   601548 e387151776a92d633bd9aad2c0412036

  HP Precision architecture:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_hppa.deb
      Size/MD5 checksum:   521056 7008ad4cbd4b0ee3b6d43c9cc552f5ab

  Motorola 680x0 architecture:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_m68k.deb
      Size/MD5 checksum:   467578 cd566e411a14c30ff3ee45261e864697

  Big endian MIPS architecture:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_mips.deb
      Size/MD5 checksum:   516014 c5cb6f88eaf124fa43ea262441f82a05

  Little endian MIPS architecture:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_mipsel.deb
      Size/MD5 checksum:   517142 cae6cd634af680723502e5571bb40ac3

  PowerPC architecture:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_powerpc.deb
      Size/MD5 checksum:   493992 fb696ef74405d4b8f53cadf89180f48d

  IBM S/390 architecture:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_s390.deb
      Size/MD5 checksum:   479112 0deef4a03421377c52befbc2bea5ed31

  Sun Sparc architecture:

    http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.2_sparc.deb
      Size/MD5 checksum:   479184 c5f7de23038fc8d29db0475062a706fc

  These files will probably be moved into the stable distribution on
  its next revision.

- ---------------------------------------------------------------------------------
For apt-get: deb http://security.debian.org/ stable/updates main
For dpkg-ftp: ftp://security.debian.org/debian-security dists/stable/updates/main
Mailing list: debian-security-announce@lists.debian.org
Package info: `apt-cache show <pkg>' and http://packages.debian.org/<pkg>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/LvwPArxCt0PiXR4RAoA1AJoCMfFafd2wCCQwR7NGUJU5GUdhjgCfaISH
dYjPMb7LLnZ4M+jULyG5nAQ=
=j3kR
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to debian-security-announce-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

Copyright 2012, SecurityGlobal.net LLC