DSA-364-3 man-db -- buffer overflows, arbitrary command execution

Related Vulnerabilities: CVE-2003-0620   CVE-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.4. For the unstable distribution (sid), these problems have been fixed in version 2.4.1-13. We recommend that you update your man-db package.

Debian Security Advisory

DSA-364-3 man-db -- buffer overflows, arbitrary command execution

Date Reported:
04 Aug 2003
Affected Packages:
man-db
Vulnerable:
Yes
Security database references:
In the Bugtraq database (at SecurityFocus): BugTraq ID 8303, BugTraq ID 8341.
In Mitre's CVE dictionary: CVE-2003-0620, CVE-2003-0645.
More information:

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.4.

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

We recommend that you update your man-db package.

Fixed in:

Debian GNU/Linux 3.0 (woody)

Source:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4.dsc
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4.diff.gz
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20.orig.tar.gz
Alpha:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4_alpha.deb
ARM:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4_arm.deb
Intel IA-32:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4_i386.deb
Intel IA-64:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4_ia64.deb
HPPA:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4_hppa.deb
Motorola 680x0:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4_m68k.deb
Big endian MIPS:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4_mips.deb
Little endian MIPS:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4_mipsel.deb
PowerPC:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4_powerpc.deb
IBM S/390:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4_s390.deb
Sun Sparc:
http://security.debian.org/pool/updates/main/m/man-db/man-db_2.3.20-18.woody.4_sparc.deb

MD5 checksums of the listed files are available in the original advisory.

MD5 checksums of the listed files are available in the revised advisory.

MD5 checksums of the listed files are available in the revised advisory.