Hi, <br><br>There is an untrusted library search path vulnerability in x2gostartagent. <br><br>Lines 188,189 in /usr/bin/x2gostartagent in the Ubuntu PPA package say: <br><br>LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${X2GO_LIB}"<br>

export LD_LIBRARY_PATH<br><br>If one of these are empty, then there will be an empty addendum to LD_LIBRARY_PATH, which will make ld search for libraries in the current working directory. <br><br>Programs xauth, x2goserver-run-extensions and x2gofeature (and the programs further spawned by them, including perl, basename, find, grep, sort, bash etc.) are launched with this insecure LD_LIBRARY_PATH. <br>

<br>Thus, the current working directory will be searched for shared libraries when this command is launched.<br><br>Usually, x2gostartagent is launched over ssh, and the current working directory will be the user's home directory. <br>
<br>The problem is that if a user is tricked into downloading a malicious library off the Internet and saves it into his home directory, this malicious library will be loaded and can take control of the user's process when an x2go session is launched. <br>

<br>The fix is simply to check if either LD_LIBRARY_PATH or X2GO_LIB are empty. I am pasting the patch below. <br><br>Please keep me updated on this issue. <br><br>Thanks, <br>Hayawardh Vijayakumar<br><br>--- /usr/bin/x2gostartagent     <a href="tel:2012-01-05%2017" value="+12012010517" target="_blank">2012-01-05 17</a>:48:07.843705023 -0500<br>

+++ /usr/bin/x2gostartagent.fixed       <a href="tel:2012-01-05%2016" value="+12012010516" target="_blank">2012-01-05 16</a>:44:41.839705377 -0500<br>@@ -184,8 +184,13 @@<br> <br> X2GO_COOKIE=`mcookie`<br> <br>+if [ ! ${LD_LIBRARY_PATH} ] || [ ! ${X2GO_LIB} ]<br>
+then<br>+       LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${X2GO_LIB}"<br>
+else<br>+       LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${X2GO_LIB}"<br>+fi<br> <br>-LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${X2GO_LIB}"<br> export LD_LIBRARY_PATH<br> <br> PATH="${PATH}:${X2GO_BIN}/"<br>

<br><br><br>