SGI IRIX rpc.xfsmd does not filter shell metacharacters from user input before invoking popen() function

2002-08-08T00:00:00
ID VU:195371
Type cert
Reporter CERT
Modified 2008-07-21T17:56:00

Description

Overview

The XFS journaling filesystem daemon uses a call to popen(3) with unfiltered client-controlled input. This will lead to arbitrary command execution on remote systems.

Description

XFS is a 64-bit compliant journaling file system. The XFS journaling filesystem daemon (xfsmd) on SGI systems uses a call to popen(3) with unfiltered client-controlled input.

As mentioned in VU#20276:

The popen(3) call is described by the man page as follows:

``_FILE *popen(const char *command, const char *type);_

_ popen() creates a pipe between the calling program and the command to be executed. The arguments to popen() are pointers to null-terminated strings. "command" consists of a shell command line_``.

In essence, popen provides the calling program the output of "command." One example of a command you could pass to popen is

cat /etc/passwd

In this case, popen would return the output of the "cat /etc/passwd" file to the calling program. You can also pass more complex shell commands to popen, such as

cat /etc/passwd & rm *

The ampersand character (&) puts the preceding command in the background and executes the rest of the command in the foreground. As another example, you can execute a sequence of commands by separating them with semicolons (;). For example,

ls ; rm * ; touch filename

This runs the commands sequentially.

As such, users able to send a stream of characters via popen(3) to a vulnerable daemon like xfsmd running on an SGI system would be able to have that text interpreted by the system as if the attacker were actually logged into the system and running a shell. When used in conjunction with exploitation of the weak RPC authentication vulnerability reported in VU#521147, remote unauthenticated users can run arbitrary commands on a victim system.


Impact

A remote user can run arbitrary commands with root privileges.


Solution

SGI has reported they will not be providing a patch for this issue. Sites are strongly urged to disable the XFS daemon and related subsystems as soon as their service requirements permit.


Per SGI Security Advisory 20020606-02-I:

There is no effective workaround available for these problems. SGI recommends either disabling or uninstalling the product.
To disable the product from running, perform the following steps:
` # killall /usr/etc/xfsmd

vi /etc/inetd.conf

Look for a line in inetd.conf that looks like this:
sgi_xfsmd/1 stream rpc/tcp wait root ?/usr/etc/xfsmd xfsmd
...and comment it out by putting a "#" at the beginning of the line:
#sgi_xfsmd/1 stream rpc/tcp wait root ?/usr/etc/xfsmd xfsmd
...or simply remove the line from the file.
# killall -HUP inetd
To remove the product from the system, perform the following command:
# versions remove eoe.sw.xfsmserv`


Vendor Information

195371

Filter by status: All Affected Not Affected Unknown

Filter by content: __ Vendor has issued information

__ Sort by: Status Alphabetical

Expand all

Affected Unknown __ Unaffected

Javascript is disabled. Click here to view vendors.

SGI

Updated: August 08, 2002

Status

__ Vulnerable

Vendor Statement

Please see <ftp://patches.sgi.com/support/free/security/advisories/20020606-01-I> and <ftp://patches.sgi.com/support/free/security/advisories/20020606-02-I>

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

-----BEGIN PGP SIGNED MESSAGE-----

_____________________________________________________________________________
SGI Security Advisory
` Title: xfsmd vulnerability
Number: 20020605-01-I
Date: June 20, 2002
Reference: CAN-2002-0359


- -----------------------
- --- Issue Specifics ---
- -----------------------
It's been reported that the /usr/etc/xfsmd daemon has security
vulnerabilities which can lead to a remote root exploit.
See &lt;http://www.lsd-pl.net/&gt; for more information.
SGI has investigated the issue and recommends the following steps for
neutralizing the exposure. It is HIGHLY RECOMMENDED that these measures be
implemented on ALL vulnerable SGI systems.
Since the xfsmserv product is being retired, SGI has no plans to fix the
xfsmd security issue.
`

- -------------- - --- Impact --- - --------------
The /usr/etc/xfsmd daemon is part of the optional eoe.sw.xfsmserv package, and is not installed by default on IRIX 6.5 systems. but if it is installed, it will run by default.
To determine the version of IRIX you are running, execute the following command:
# uname -R
That will return a result similar to the following:
# 6.5 6.5.15f
The first number ("6.5") is the release name, the second ("6.5.15f" in this case) is the extended release name. The extended release name is the "version" we refer to throughout this document.
To see if xfsmd is installed, execute the following command:
# versions eoe.sw.xfsmserv I = Installed, R = Removed
Name Date Description
I eoe 08/28/2001 IRIX Execution Environment, 6.5.13f I eoe.sw 08/28/2001 IRIX Execution Environment Software I eoe.sw.xfsmserv 08/28/2001 XFSM Server Software
If the output resembles the above, then the package is installed and the system is vulnerable.
This vulnerability was assigned the following CVE: ``&lt;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-0359&gt;``

- ---------------------------- - --- Temporary Workaround --- - ----------------------------
There is no effective workaround available for these problems. SGI recommends either disabling or uninstalling the product.
To disable the product from running, perform the following steps:
` # killall /usr/etc/xfsmd

vi /etc/inetd.conf

Look for a line in inetd.conf that looks like this:
sgi_xfsmd/1 stream rpc/tcp wait root ?/usr/etc/xfsmd xfsmd
...and comment it out by putting a "#" at the beginning of the line:
#sgi_xfsmd/1 stream rpc/tcp wait root ?/usr/etc/xfsmd xfsmd
...or simply remove the line from the file.
# killall -HUP inetd
To remove the product from the system, perform the following command:
# versions remove eoe.sw.xfsmserv
`

- ---------------- - --- Solution --- - ----------------
SGI will not be providing a fix or patches for this issue, as the product is being retired. Our recommendation is to follow the instructions in the Temporary Workaround section above.
OS Version Vulnerable? Patch # Other Actions ---------- ----------- ------- ------------- IRIX 3.x unknown Note 1 IRIX 4.x unknown Note 1 IRIX 5.x unknown Note 1 IRIX 6.0.x unknown Note 1 IRIX 6.1 unknown Note 1 IRIX 6.2 unknown Note 1 IRIX 6.3 unknown Note 1 IRIX 6.4 unknown Note 1 IRIX 6.5 yes Notes 2 & 3 IRIX 6.5.1 yes Notes 2 & 3 IRIX 6.5.2 yes Notes 2 & 3 IRIX 6.5.3 yes Notes 2 & 3 IRIX 6.5.4 yes Notes 2 & 3 IRIX 6.5.5 yes Notes 2 & 3 IRIX 6.5.6 yes Notes 2 & 3 IRIX 6.5.7 yes Notes 2 & 3 IRIX 6.5.8 yes Notes 2 & 3 IRIX 6.5.9 yes Notes 2 & 3 IRIX 6.5.10 yes Notes 2 & 3 IRIX 6.5.11 yes Notes 2 & 3 IRIX 6.5.12 yes Notes 2 & 3 IRIX 6.5.13 yes Notes 2 & 3 IRIX 6.5.14 yes Notes 2 & 3 IRIX 6.5.15 yes Notes 2 & 3 IRIX 6.5.16 yes Notes 2 & 3
NOTES
1) This version of the IRIX operating has been retired. Upgrade to an actively supported IRIX operating system. See ``&lt;http://support.sgi.com/irix/news/index.html#policy&gt;`` for more information.
2) If you have not received an IRIX 6.5.X CD for IRIX 6.5, contact your SGI Support Provider or URL: ``&lt;http://support.sgi.com/irix/swupdates/&gt;``
3) Disable or uninstall the product.

- ------------------------ - --- Acknowledgments ---- - ------------------------
SGI wishes to thank The Last Stages of Delirium Research Group at ``&lt;http://www.lsd-pl.net/&gt;`` for their assistance in this matter.

- ------------- - --- Links --- - -------------
SGI Security Advisories can be found at: ``&lt;http://www.sgi.com/support/security/&gt;`` and ``&lt;ftp://patches.sgi.com/support/free/security/advisories/&gt;``
SGI Security Patches can be found at: ``&lt;http://www.sgi.com/support/security/&gt;`` and ``&lt;ftp://patches.sgi.com/support/free/security/patches/&gt;``
SGI patches for IRIX can be found at the following patch servers: ``&lt;http://support.sgi.com/irix/&gt;`` and ``&lt;ftp://patches.sgi.com/&gt;``
SGI freeware updates for IRIX can be found at: ``&lt;http://freeware.sgi.com/&gt;``
SGI fixes for SGI open sourced code can be found on: ``&lt;http://oss.sgi.com/projects/&gt;``
SGI patches and RPMs for Linux can be found at: ``&lt;http://support.sgi.com/linux/&gt;`` or ``&lt;http://oss.sgi.com/projects/sgilinux-combined/download/security-fixes/&gt;``
SGI patches for Windows NT or 2000 can be found at: ``&lt;http://support.sgi.com/nt/&gt;``
IRIX 5.2-6.4 Recommended/Required Patch Sets can be found at: ``&lt;http://support.sgi.com/irix/&gt;`` and ``&lt;ftp://patches.sgi.com/support/patchset/&gt;``
IRIX 6.5 Maintenance Release Streams can be found at: ``&lt;http://support.sgi.com/colls/patches/tools/relstream/index.html&gt;``
IRIX 6.5 Software Update CDs can be obtained from: ``&lt;http://support.sgi.com/irix/swupdates/&gt;``
The primary SGI anonymous FTP site for security advisories and patches is patches.sgi.com (216.32.174.211). Security advisories and patches are located under the URL ``&lt;ftp://patches.sgi.com/support/free/security/&gt;``
For security and patch management reasons, ftp.sgi.com (mirrors patches.sgi.com security FTP repository) lags behind and does not do a real-time update.

- ----------------------------------------- - --- SGI Security Information/Contacts --- - -----------------------------------------
If there are questions about this document, email can be sent to security-info@sgi.com.
------oOo------
SGI provides security information and patches for use by the entire SGI community. This information is freely available to any person needing the information and is available via anonymous FTP and the Web.
The primary SGI anonymous FTP site for security advisories and patches is patches.sgi.com (216.32.174.211). Security advisories and patches are located under the URL ``&lt;ftp://patches.sgi.com/support/free/security/&gt;``
The SGI Security Headquarters Web page is accessible at the URL: ``&lt;http://www.sgi.com/support/security/&gt;``
For issues with the patches on the FTP sites, email can be sent to security-info@sgi.com.
For assistance obtaining or working with security patches, please contact your SGI support provider.
------oOo------
SGI provides a free security mailing list service called wiretap and encourages interested parties to self-subscribe to receive (via email) all SGI Security Advisories when they are released. Subscribing to the mailing list can be done via the Web (``&lt;http://www.sgi.com/support/security/wiretap.html&gt;``) or by sending email to SGI as outlined below.
% mail wiretap-request@sgi.com subscribe wiretap &lt;YourEmailAddress&gt; end ^d
In the example above, &lt;YourEmailAddress&gt; is the email address that you wish the mailing list information sent to. The word end must be on a separate line to indicate the end of the body of the message. The control-d (^d) is used to indicate to the mail program that you are finished composing the mail message.

------oOo------
SGI provides a comprehensive customer World Wide Web site. This site is located at ``&lt;http://www.sgi.com/support/security/&gt;`` .
------oOo------
If there are general security questions on SGI systems, email can be sent to security-info@sgi.com.
For reporting *NEW* SGI security issues, email can be sent to security-alert@sgi.com or contact your SGI support provider. A support contract is not required for submitting a security report.
______________________________________________________________________________ This information is provided freely to all interested parties and may be redistributed provided that it is not altered in any way, SGI is appropriately credited and the document retains and includes its valid PGP signature.

-----BEGIN PGP SIGNATURE----- Version: 2.6.2
iQCVAwUBPRHu/bQ4cFApAP75AQFHqQP+JrpglOWIfUiFziFGCpHjDw9ZBZbBb8WG 6WqFlu45LGpYjoMuVMp1Ama7QAbn96BV0j5yw1FX7PZqACMlG4Y58FXZovzJoTI0 VQTBrkclKmV1+YnDvUWq3ur4424xZTEKHEI5Fjr6imw4pnKu4nNteJRUi2vujwN5 DoGIdY3S+Pk= =PWfa -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----

_____________________________________________________________________________

SGI Security Advisory

Title: xfsmd vulnerability
Number: 20020606-02-I
Date: June 24, 2002
Reference: CAN-2002-0359
_____________________________________________________________________________

- --------------
- --- Update ---
- --------------

Fixed incorrect advisory number in the header.

- -----------------------
- --- Issue Specifics ---
- -----------------------

It's been reported that the /usr/etc/xfsmd daemon has security
vulnerabilities which can lead to a remote root exploit.

See &lt;http://www.lsd-pl.net/&gt; for more information.

SGI has investigated the issue and recommends the following steps for
neutralizing the exposure. It is HIGHLY RECOMMENDED that these measures be
implemented on ALL vulnerable SGI systems.

Since the xfsmserv product is being retired, SGI has no plans to fix the
xfsmd security issue.

- --------------
- --- Impact ---
- --------------

The /usr/etc/xfsmd daemon is part of the optional eoe.sw.xfsmserv package,
and is not installed by default on IRIX 6.5 systems. but if it is installed,
it will run by default.

To determine the version of IRIX you are running, execute the following
command:

# uname -R

That will return a result similar to the following:

# 6.5 6.5.15f

The first number ("6.5") is the release name, the second ("6.5.15f" in this
case) is the extended release name. The extended release name is the
"version" we refer to throughout this document.

To see if xfsmd is installed, execute the following command:

# versions eoe.sw.xfsmserv
I = Installed, R = Removed

Name Date Description

I eoe 08/28/2001 IRIX Execution Environment, 6.5.13f
I eoe.sw 08/28/2001 IRIX Execution Environment Software
I eoe.sw.xfsmserv 08/28/2001 XFSM Server Software

If the output resembles the above, then the package is installed and the
system is vulnerable.

This vulnerability was assigned the following CVE:
&lt;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-0359&gt;

- ----------------------------
- --- Temporary Workaround ---
- ----------------------------

There is no effective workaround available for these problems.
SGI recommends either disabling or uninstalling the product.

To disable the product from running, perform the following steps:

# killall /usr/etc/xfsmd
# vi /etc/inetd.conf

Look for a line in inetd.conf that looks like this:

sgi_xfsmd/1 stream rpc/tcp wait root ?/usr/etc/xfsmd xfsmd

...and comment it out by putting a "#" at the beginning of the line:

#sgi_xfsmd/1 stream rpc/tcp wait root ?/usr/etc/xfsmd xfsmd

...or simply remove the line from the file.

# killall -HUP inetd

To remove the product from the system, perform the following command:

# versions remove eoe.sw.xfsmserv

- ----------------
- --- Solution ---
- ----------------

SGI will not be providing a fix or patches for this issue, as the product is
being retired. Our recommendation is to follow the instructions in the
Temporary Workaround section above.

OS Version Vulnerable? Patch # Other Actions
---------- ----------- ------- -------------
IRIX 3.x unknown Note 1
IRIX 4.x unknown Note 1
IRIX 5.x unknown Note 1
IRIX 6.0.x unknown Note 1
IRIX 6.1 unknown Note 1
IRIX 6.2 unknown Note 1
IRIX 6.3 unknown Note 1
IRIX 6.4 unknown Note 1
IRIX 6.5 yes Notes 2 & 3
IRIX 6.5.1 yes Notes 2 & 3
IRIX 6.5.2 yes Notes 2 & 3
IRIX 6.5.3 yes Notes 2 & 3
IRIX 6.5.4 yes Notes 2 & 3
IRIX 6.5.5 yes Notes 2 & 3
IRIX 6.5.6 yes Notes 2 & 3
IRIX 6.5.7 yes Notes 2 & 3
IRIX 6.5.8 yes Notes 2 & 3
IRIX 6.5.9 yes Notes 2 & 3
IRIX 6.5.10 yes Notes 2 & 3
IRIX 6.5.11 yes Notes 2 & 3
IRIX 6.5.12 yes Notes 2 & 3
IRIX 6.5.13 yes Notes 2 & 3
IRIX 6.5.14 yes Notes 2 & 3
IRIX 6.5.15 yes Notes 2 & 3
IRIX 6.5.16 yes Notes 2 & 3

NOTES

1) This version of the IRIX operating has been retired. Upgrade to an
actively supported IRIX operating system. See
&lt;http://support.sgi.com/irix/news/index.html#policy&gt; for more
information.

2) If you have not received an IRIX 6.5.X CD for IRIX 6.5, contact your
SGI Support Provider or URL: &lt;http://support.sgi.com/irix/swupdates/&gt;

3) Disable or uninstall the product.

- ------------------------
- --- Acknowledgments ----
- ------------------------

SGI wishes to thank The Last Stages of Delirium Research Group at
&lt;http://www.lsd-pl.net/&gt; for their assistance in this matter.

- -------------
- --- Links ---
- -------------

SGI Security Advisories can be found at:
&lt;http://www.sgi.com/support/security/&gt; and
&lt;ftp://patches.sgi.com/support/free/security/advisories/&gt;

SGI Security Patches can be found at:
&lt;http://www.sgi.com/support/security/&gt; and
&lt;ftp://patches.sgi.com/support/free/security/patches/&gt;

SGI patches for IRIX can be found at the following patch servers:
&lt;http://support.sgi.com/irix/&gt; and &lt;ftp://patches.sgi.com/&gt;

SGI freeware updates for IRIX can be found at:
&lt;http://freeware.sgi.com/&gt;

SGI fixes for SGI open sourced code can be found on:
&lt;http://oss.sgi.com/projects/&gt;

SGI patches and RPMs for Linux can be found at:
&lt;http://support.sgi.com/linux/&gt; or
&lt;http://oss.sgi.com/projects/sgilinux-combined/download/security-fixes/&gt;

SGI patches for Windows NT or 2000 can be found at:
&lt;http://support.sgi.com/nt/&gt;

IRIX 5.2-6.4 Recommended/Required Patch Sets can be found at:
&lt;http://support.sgi.com/irix/&gt; and &lt;ftp://patches.sgi.com/support/patchset/&gt;

IRIX 6.5 Maintenance Release Streams can be found at:
&lt;http://support.sgi.com/colls/patches/tools/relstream/index.html&gt;

IRIX 6.5 Software Update CDs can be obtained from:
&lt;http://support.sgi.com/irix/swupdates/&gt;

The primary SGI anonymous FTP site for security advisories and patches is
patches.sgi.com (216.32.174.211). Security advisories and patches are
located under the URL &lt;ftp://patches.sgi.com/support/free/security/&gt;

For security and patch management reasons, ftp.sgi.com (mirrors
patches.sgi.com security FTP repository) lags behind and does not do a
real-time update.

- -----------------------------------------
- --- SGI Security Information/Contacts ---
- -----------------------------------------

If there are questions about this document, email can be sent to
security-info@sgi.com.

------oOo------

SGI provides security information and patches for use by the entire SGI
community. This information is freely available to any person needing the
information and is available via anonymous FTP and the Web.

The primary SGI anonymous FTP site for security advisories and patches is
patches.sgi.com (216.32.174.211). Security advisories and patches are
located under the URL &lt;ftp://patches.sgi.com/support/free/security/&gt;

The SGI Security Headquarters Web page is accessible at the URL:
&lt;http://www.sgi.com/support/security/&gt;

For issues with the patches on the FTP sites, email can be sent to
security-info@sgi.com.

For assistance obtaining or working with security patches, please
contact your SGI support provider.

------oOo------

SGI provides a free security mailing list service called wiretap and
encourages interested parties to self-subscribe to receive (via email) all
SGI Security Advisories when they are released. Subscribing to the mailing
list can be done via the Web
(&lt;http://www.sgi.com/support/security/wiretap.html&gt;) or by sending email to
SGI as outlined below.

% mail wiretap-request@sgi.com
subscribe wiretap &lt;YourEmailAddress&gt;
end
^d

In the example above, &lt;YourEmailAddress&gt; is the email address that you wish
the mailing list information sent to. The word end must be on a separate
line to indicate the end of the body of the message. The control-d (^d) is
used to indicate to the mail program that you are finished composing the
mail message.

------oOo------

SGI provides a comprehensive customer World Wide Web site. This site is
located at &lt;http://www.sgi.com/support/security/&gt; .

------oOo------

If there are general security questions on SGI systems, email can be sent to
security-info@sgi.com.

For reporting *NEW* SGI security issues, email can be sent to
security-alert@sgi.com or contact your SGI support provider. A support
contract is not required for submitting a security report.

______________________________________________________________________________
This information is provided freely to all interested parties
and may be redistributed provided that it is not altered in any
way, SGI is appropriately credited and the document retains and
includes its valid PGP signature.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBPRd8trQ4cFApAP75AQFkxwP+KwHRN/rrTPNPRGf2NRwBUaZirjeXxan8
7suZq1ATeZi827OEyIfNANn0b52WHnYQN0e4y/3l3PU8oXTXFZx5kfUwQuz2Kd0e
PdQWj8z1xKNZ6w/IEWsF98et0yjy99P2REXuGen0QA8y2sjLVxsb1OEw4twSL48c
/1gmG++9rQQ=
=r6eE
-----END PGP SIGNATURE-----

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

CVSS Metrics

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

References

  • <ftp://patches.sgi.com/support/free/security/advisories/20020606-02-I>
  • <http://www.securityfocus.com/bid/5075>
  • <http://www.iss.net/security_center/static/9402.php>
  • <http://oss.sgi.com/projects/xfs/>
  • <http://www.sgi.com/software/xfs/>

Credit

Last Stage of Delirium reported this vulnerability in several public forums.

This document was written by Jeffrey S. Havrilla.

Other Information

CVE IDs: | CVE-2002-0359
---|---
Severity Metric:** | 35.10
Date Public:
| 2002-06-18
Date First Published: | 2002-08-08
Date Last Updated: | 2008-07-21 17:56 UTC
Document Revision: | 20