Vulnerability Note VU#161931

Sun Solaris cachefsd vulnerable to stack overflow in fscache_setup() function

Original Release date: 09 May 2002 | Last revised: 13 May 2002

Overview

Sun's NFS/RPC cachefs daemon (cachefsd) is shipped and installed by default with Sun Solaris 2.5.1, 2.6, 7, and 8 (SPARC and Intel architectures). Cachefsd caches requests for operations on remote file systems mounted via the use of NFS protocol. An exploitable stack overflow exists in cachefsd that could permit a local attacker to execute arbitrary code with the privileges of the cachefsd, typically root.

Description

After creating a local file on the system, an attacker can exploit a stack overflow in cachefsd to execute arbitrary code with the privileges of the cachefsd process, typically root. Sun Microsystems has released a Sun Alert Notification that addresses this issue as well as the issue described in VU#635811.

The Australian Computer Emergency Response Team has also issued an advisory related to incident activity exploiting cachefsd:


The eSecurityOnline team has also published a report on this vulnerability:

This issue is also being referenced as CAN-2002-0084:

Impact

An attacker can execute code with the privileges of the cachefsd process, typically root.

Solution

The CERT/CC is currently unaware of patches for this problem.

According to the Sun Alert Notification a workaround is as follows:


Comment out cachefsd in /etc/inetd.conf as shown below:

#100235/1 tli rpc/tcp wait root /usr/lib/fs/cachefs/cachefsd cachefsd

Once the line is commented out either:

- reboot, or
- send a HUP signal to inetd(1M) and kill existing cachefsd processes, for example,
on Solaris 2.5.1 and 2.6 do the following:
$ kill -HUP <PID of inetd>
$ kill <PIDs of any cachefsd processes>

Solaris 7 and 8 do the following:
$ pkill -HUP inetd
$ pkill cachefsd

The possible side effects of the workaround are:

- for systems not using cachefs:

There is no impact.

- for systems using cachefs:

Only a "disconnected" operation is known to be affected by
disabling cachefsd. This feature is rarely used outside of AutoClient.

Mounts and unmounts should still succeed though an error message
may be seen, "mount -F cachefs: cachefsd is not running".

There is no performance impact.

- for systems using AutoClient:

The impact is unknown. Again, only "disconnected" mode is likely
to be affected.

Systems Affected (Learn More)

VendorStatusDate NotifiedDate Updated
SunAffected-09 May 2002
CrayNot Affected-13 May 2002
If you are a vendor and your product is affected, let us know.

CVSS Metrics (Learn More)

Group Score Vector
Base N/A N/A
Temporal N/A N/A
Environmental N/A N/A

References

Credit

Our thanks to AusCERT, eSecurityOnline, and the Sun Security Coordination Team, as well as Mark Dowd and Stephen James of IT Audit & Consulting for their analysis and reports about this vulnerability.

This document was written by Jason Rafail.

Other Information

  • CVE IDs: CAN-2002-0084
  • Date Public: 30 Apr 2002
  • Date First Published: 09 May 2002
  • Date Last Updated: 13 May 2002
  • Severity Metric: 22.84
  • Document Revision: 12

Feedback

If you have feedback, comments, or additional information about this vulnerability, please send us email.