copyright | disclaimer | privacy | contact  
Australia's Leading Computer Emergency Response Team
Search this site

On this site

 > About AusCERT
 > Membership
 > Contact Us
 > PKI Services
 > Publications
 > Sec. Bulletins
 > Conferences
 > News & Media
 > Services
 > Web Log
 > Site Map
 > Site Help
 > Member login


ESB-2000.296 -- RHSA-2000:080-01 -- tmpwatch has a local denial of service and root exploit

Date: 19 October 2000

Click here for printable version
Click here for PGP verifiable version

              AUSCERT External Security Bulletin Redistribution
                      ESB-2000.296 -- RHSA-2000:080-01
           tmpwatch has a local denial of service and root exploit
                               19 October 2000


	AusCERT Security Bulletin Summary

Product:                tmpwatch
Vendor:                 Red Hat
Operating System:       Red Hat Linux
Impact:                 Denial of Service
                        Root Compromise
Access Required:        Local

- --------------------------BEGIN INCLUDED TEXT--------------------

- ---------------------------------------------------------------------
                   Red Hat, Inc. Security Advisory

Synopsis:          tmpwatch has a local denial of service and root exploit
Advisory ID:       RHSA-2000:080-01
Issue date:        2000-10-06
Updated on:        2000-10-06
Product:           Red Hat Linux
Keywords:          tmpwatch, fuser, DoS, fork
Cross references:  N/A
- ---------------------------------------------------------------------

1. Topic:

tmpwatch as shipped in Red Hat Linux 6.1, 6.2, and 7.0 uses fork() to
recursively process subdirectories, enabling a local user to perform a
denial of service attack.  Tmpwatch from Red Hat Linux 6.2 and 7.0 also
contains an option to allow it to use the fuser command to check for open
files before removal. It executed fuser in an insecure fashion, allowing a
local root exploit.

2. Relevant releases/architectures:

Red Hat Linux 6.1 - i386, alpha, sparc
Red Hat Linux 6.2 - i386, alpha, sparc
Red Hat Linux 7.0 - i386

3. Problem description:

The tmpwatch program periodically cleans up files in temporary directories
by removing all files older than a certain age.  In Red Hat Linux 6.1, 6.2,
and 7.0, it used fork() to recursively process subdirectories.  If a
malicious user created many layers of subdirectories (thousands) in a
temporary directory monitored by tmpwatch, the system process table would
fill up, requiring a reboot.

Additionally, tmpwatch in 6.2 and 7.0 contains an option, "--fuser", that
attempts to user the fuser command to check if a file is in use before
removal.  However, it executed fuser with the system() call in an insecure
fashion.  A malicious user could construct an environment such that this
provided them a local root shell.  Tmpwatch now uses execle() to run fuser.

4. Solution:

For each RPM for your particular architecture, run:

rpm -Fvh [filename]

where filename is the name of the RPM.

5. Bug IDs fixed ( for more info):

17286 - tmpwatch run from cron allows locale DoS.

6. RPMs required:

Red Hat Linux 6.2:





Red Hat Linux 7.0:



7. Verification:

MD5 sum                           Package Name
- --------------------------------------------------------------------------
b8a670944cc54fd39c9eefb79f147ec1  6.2/SRPMS/tmpwatch-2.6.2-1.6.2.src.rpm
39fe4fbf666e5f9a40503134c05046d8  6.2/alpha/tmpwatch-2.6.2-1.6.2.alpha.rpm
84609abc355fde23ce878e4d310766f8  6.2/i386/tmpwatch-2.6.2-1.6.2.i386.rpm
f4625e9bc27af011a614eaa146586917  6.2/sparc/tmpwatch-2.6.2-1.6.2.sparc.rpm
b1a9201c44a5f921209c9b648ba85ada  7.0/SRPMS/tmpwatch-2.6.2-1.7.src.rpm
8acf394469c47a98fcc589dd0d73b98c  7.0/i386/tmpwatch-2.6.2-1.7.i386.rpm

These packages are GPG signed by Red Hat, Inc. for security.  Our key
is available at:

You can verify each package with the following command:
    rpm --checksig  <filename>

If you only wish to verify that each package has not been corrupted or
tampered with, examine only the md5sum with the following command:
    rpm --checksig --nogpg <filename>

8. References:

Thanks go to Internet Security System's X-Force team ( for
discovering and documenting the local root exploit.

Copyright(c) 2000 Red Hat, Inc.

- --------------------------END INCLUDED TEXT--------------------

This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content.  The decision to use any or all of this information is
the responsibility of each user or organisation, and should be done so in
accordance with site policies and procedures.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the original authors to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

If you believe that your system has been compromised, contact AusCERT or
your representative in FIRST (Forum of Incident Response and Security

Internet Email:
Facsimile:	(07) 3365 7031
Telephone:	(07) 3365 4417 (International: +61 7 3365 4417)
		AusCERT personnel answer during Queensland business hours
		which are GMT+10:00 (AEST).
		On call after hours for emergencies.

Version: 2.6.3i
Charset: noconv