Bug 638396 (CVE-2010-3385) - CVE-2010-3385 tuxguitar: insecure library loading vulnerability
Summary: CVE-2010-3385 tuxguitar: insecure library loading vulnerability
Keywords:
Status: CLOSED UPSTREAM
Alias: CVE-2010-3385
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: 638398
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-28 22:28 UTC by Vincent Danen
Modified: 2019-09-29 12:39 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-10 10:57:18 UTC
Embargoed:


Attachments (Terms of Use)

Description Vincent Danen 2010-09-28 22:28:04 UTC
Raphael Geissert conducted a review of various packages in Debian and found that tuxguitar contained a script 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/tuxguitar re-sets LD_LIBRARY_PATH insecurely:

##LIBRARY_PATH
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/tuxguitar/
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/jni
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MOZILLA_FIVE_HOME}
...
export LD_LIBRARY_PATH

A solution is to patch the script 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-3385.

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

Comment 1 Vincent Danen 2010-09-28 22:30:34 UTC
Created tuxguitar tracking bugs for this issue

Affects: fedora-all [bug 638398]

Comment 2 Tomas Hoger 2010-09-29 07:44:30 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 Product Security DevOps Team 2019-06-10 10:57:18 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.


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