Bug 24332

Summary: CVE-2010-3384: insecure library loading
Product: Sisyphus Reporter: Vladimir Lettiev <crux>
Component: TORCSAssignee: Vitaly Lipatov <lav>
Status: NEW --- QA Contact: qa-sisyphus
Severity: blocker    
Priority: P3 CC: arbars, lav
Version: unstableKeywords: security
Hardware: all   
OS: Linux   
URL: http://bugs.debian.org/598306

Description Vladimir Lettiev 2010-10-16 12:44:26 MSD
The vulnerability is introduced by an insecure change to
LD_LIBRARY_PATH, and environment variable used by ld.so(8) to look for
libraries on a directory other than the standard paths.

Vulnerable code follows:

/usr/bin/nfsperf line 30:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR/lib
/usr/bin/accc line 30:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR/lib
/usr/bin/texmapper line 30:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR/lib
/usr/bin/trackgen line 30:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR/lib
/usr/bin/nfs2ac line 30:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR/lib
/usr/bin/torcs line 40:
    export LD_LIBRARY_PATH=$LIBDIR/lib:$LD_LIBRARY_PATH

When there's an empty item on the colon-separated list of
LD_LIBRARY_PATH, ld.so treats it as '.' (i.e. CWD/$PWD.)
If the given script is executed from a directory where a potential,
local, attacker can write files to, there's a chance to exploit this
bug.