Bug 638391 (CVE-2010-3384) - CVE-2010-3384 torcs: insecure library loading vulnerability
Summary: CVE-2010-3384 torcs: insecure library loading vulnerability
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: CVE-2010-3384
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 638394
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-28 22:21 UTC by Vincent Danen
Modified: 2019-09-29 12:39 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-09-11 15:57:35 UTC
Embargoed:


Attachments (Terms of Use)

Description Vincent Danen 2010-09-28 22:21:28 UTC
Raphael Geissert conducted a review of various packages in Debian and found that torcs contained numerous scripts that could be abused by an attacker to execute arbitrary code [1].

The vulnerability is due to an insecure change to LD_LIBRARY_PATH, and environment variable used by ld.so(8) to look for libraries in directories other than the standard paths.  When there is an empty item in the colon-separated list of directories in LD_LIBRARY_PATH, ld.so(8) treats it as a '.' (current working directory).  If the given script is executed from a directory where a local attacker could write files, there is a chance for exploitation.

In Fedora, /usr/bin/{acc,nfs2ac,nfsperf,texmapper,torcs,trackgen} all re-set LD_LIBRARY_PATH insecurely:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR/lib

A solution is to patch the scripts to test if $LD_LIBRARY_PATH is set first before attempting to modify it:

if [ -z ${LD_LIBRARY_PATH} ]; then
    export LD_LIBRARY_PATH=/usr/lib/foo
else
    export LD_LIBRARY_PATH=/usr/lib/foo:${LD_LIBRARY_PATH}
fi

This issue has been assigned the name CVE-2010-3384.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598306

Comment 1 Vincent Danen 2010-09-28 22:22:23 UTC
Created torcs tracking bugs for this issue

Affects: fedora-all [bug 638394]

Comment 2 Tomas Hoger 2010-09-29 07:44:26 UTC
This one-liner should work as an alternative to if-else-fi fix:
export LD_LIBRARY_PATH=/usr/lib/foo${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

Comment 3 Vincent Danen 2012-09-11 15:57:35 UTC
This was corrected in upstream torcs 1.3.2:

http://torcs.sourceforge.net/index.php?name=News&file=article&sid=77

Current Fedora version is 1.3.3 in F17+; F16 still ships the vulnerable 1.3.1.


Note You need to log in before you can comment on or make changes to this bug.