<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>97184</bug_id>
          
          <creation_ts>2005-06-27 03:52 0000</creation_ts>
          <short_desc>sys-cluster/xpvm &lt;= 1.2.5-r2 insecure tmp file creation</short_desc>
          <delta_ts>2005-08-23 22:06:17 0000</delta_ts>
          
          
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Security</product>
          <component>Vulnerabilities</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://secunia.com/advisories/16040/</bug_file_loc>
          <status_whiteboard>B3 [noglsa] jaervosz</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>zataz@zataz.net</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>dberkholz@gentoo.org</cc>
    
    <cc>tantive@gentoo.org</cc>
    
    <cc>voxus@gentoo.org</cc>
    
    <cc>xmerlin@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>zataz@zataz.net</who>
            <bug_when>2005-06-27 03:52:03 0000</bug_when>
            <thetext>Hello,

Take a look at

src/xpvm.tcl :

158 #
159 # Get User Name
160 #
161 
162 set user [ get_user_name ]

832 if { $tfck == 0 } { set trace_file &quot;/tmp/xpvm.trace.$user&quot; }

834 $CTRL.file_entry insert 0 $trace_file

Regards.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tigger@gentoo.org</who>
            <bug_when>2005-07-05 06:26:00 0000</bug_when>
            <thetext>confirmed vulnerable.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zataz@zataz.net</who>
            <bug_when>2005-07-12 00:37:07 0000</bug_when>
            <thetext>Hello,

Vendor notified.

Regards.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>taviso@gentoo.org</who>
            <bug_when>2005-07-12 01:47:05 0000</bug_when>
            <thetext>confirmed by rob, moving to vulnerabilities.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-07-13 12:56:29 0000</bug_when>
            <thetext>Leaked by Secunia, SA16040</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-07-18 05:25:52 0000</bug_when>
            <thetext>Pulling in maintainer :

The project looks quite dead (upstream mail failed), should we patch it ? remove
it ?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-07-23 04:55:35 0000</bug_when>
            <thetext>Tantive seems to be MIA, pulling in the rest of cluster. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tantive@gentoo.org</who>
            <bug_when>2005-07-28 14:50:34 0000</bug_when>
            <thetext>If someone is able to fix it, then let&apos;s fix it, otherwise we have to remove or
mask it.
Personally i&apos;d love to see a fix so it can stay in portage.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>yvasilev@gentoo.org</who>
            <bug_when>2005-07-29 00:02:46 0000</bug_when>
            <thetext>It should be changes to use ns_tmpnam [1], something like may work:
832 if { $tfck == 0 } { set trace_file ns_tmpnam }

Yuri.

[1] http://www.panoptic.com/wiki/aolserver/686</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2005-07-29 15:23:59 0000</bug_when>
            <thetext>Yuri are you sure about that? I don&apos;t use wish much or xpvm at all but 
I&apos;ve done a fair bit of tcl in my day and I&apos;ve never seen ns_tmpnam. 
Perhaps it&apos;s an aolserver only function?

solar@simple xpvm $ wish
% ns_tmpnam
invalid command name &quot;ns_tmpnam&quot;
solar@simple xpvm $ tclsh
Loading module ptrace
8.4.6&gt; ns_tmpnam
invalid command name &quot;ns_tmpnam&quot;
solar@simple xpvm $ tcl
tcl&gt;ns_tmpnam
Error: invalid command name &quot;ns_tmpnam&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>yvasilev@gentoo.org</who>
            <bug_when>2005-07-29 17:09:55 0000</bug_when>
            <thetext>Created an attachment (id=64689)
xpvmm-1.2.5-secure-temp.patch

a patch that should do fine until file tempfile ?template? ?namevar? [1] is
available in tcl 8.5

[1] http://www.tcl.tk/cgi-bin/tct/tip/210.html</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>yvasilev@gentoo.org</who>
            <bug_when>2005-07-29 17:32:59 0000</bug_when>
            <thetext>There is another way to solve this problem but it&apos;ll require
&gt;=dev-tcltk/tcllib-1.7 to be added as dependency so &quot;::fileutil::tempfile  ?
prefix ?&quot; can be used, but I think it&apos;s not worth adding another dependency
considerings the before mentioned support for file tempfile subcommand is
expected to be added in tcl 8.5.

Also, in case the patch gets accepted, please credit solar@gentoo.org for it&apos;s
authorship as I my just cleaned it.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-07-30 07:27:19 0000</bug_when>
            <thetext>solar, you&apos;re the TCL expert, could you review the patch ? If you&apos;re OK with it,
tantive can plug it in.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2005-08-01 22:02:14 0000</bug_when>
            <thetext>The code is fine.
shell$ qfile /bin/tempfile
sys-apps/debianutils (/bin/tempfile) 

A dep would have to be added either way.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-08-01 22:03:44 0000</bug_when>
            <thetext>Micheal please provide an updated ebuild. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tantive@gentoo.org</who>
            <bug_when>2005-08-09 13:59:28 0000</bug_when>
            <thetext>I added a patched xpvm-1.2.5-r4 to the tree and removed the old ebuilds.
Thanks for your help.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-08-09 14:04:29 0000</bug_when>
            <thetext>Thx Micheal. 
 
This one is ready for GLSA decision. I tend to vote NO. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-08-10 00:46:57 0000</bug_when>
            <thetext>Looks like a tool that would typically run as root, which would make me vote
yes, but I really don&apos;t know.

Michael, could you provide some insight on how the software is typically run,
and if it always uses the temporary file (vs. it only uses it if option
--verbosity=high is set)...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-08-15 09:50:14 0000</bug_when>
            <thetext>Micheal/Cluster please advise.  </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-08-21 08:36:30 0000</bug_when>
            <thetext>OK; looks like we won&apos;t get input about this from the cluster herd, so security
members, make up your mind. In doubt I vote YES.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>taviso@gentoo.org</who>
            <bug_when>2005-08-23 02:07:09 0000</bug_when>
            <thetext>i would vote NO</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-08-23 22:06:17 0000</bug_when>
            <thetext>Reverting my vote to full NO -&gt; Closing without GLSA. Feel free to reopen if 
you disagree. </thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>64689</attachid>
            <date>2005-07-29 17:09 0000</date>
            <desc>xpvmm-1.2.5-secure-temp.patch</desc>
            <filename>xpvmm-1.2.5-secure-temp.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">ZGlmZiAtTmF1ciB4cHZtLm9yaWcvc3JjL3hwdm0udGNsIHhwdm0vc3JjL3hwdm0udGNsCi0tLSB4
cHZtLm9yaWcvc3JjL3hwdm0udGNsCTE5OTgtMDQtMDkgMTY6MTI6MzIuMDAwMDAwMDAwIC0wNTAw
CisrKyB4cHZtL3NyYy94cHZtLnRjbAkyMDA1LTA3LTI5IDE5OjAyOjMzLjc3NjU4ODg2NCAtMDUw
MApAQCAtODI5LDcgKzgyOSwxNyBAQAogCiBzZXQgdGZjayBbIGluZm8gZXhpc3RzIHRyYWNlX2Zp
bGUgXQogCi1pZiB7ICR0ZmNrID09IDAgfSB7IHNldCB0cmFjZV9maWxlICIvdG1wL3hwdm0udHJh
Y2UuJHVzZXIiIH0KK2lmIHsgJHRmY2sgPT0gMCB9IHsKKwlpZiB7JHRjbF9wbGF0Zm9ybShwbGF0
Zm9ybSkgIT0gInVuaXgifSB7CisJCXB1dHMgc3RkZXJyICJmYXRhbCBlcnJvciwgc2VjdXJlIHRl
bXAgZmlsZSBjcmVhdGlvbiBub3QgYXZhaWxhYmxlIgorCQlleGl0IDEKKwl9CisJY2F0Y2gge2V4
ZWMgL2Jpbi90ZW1wZmlsZX0gdHJhY2VfZmlsZQorCWlmIHtbZmlsZSBleGlzdCAkdHJhY2VfZmls
ZV0gIT0gMX0geworCQlwdXRzIHN0ZGVyciAiZmF0YWwgZXJyb3IsIHNlY3VyZSB0ZW1wIGZpbGUg
Y3JlYXRpb24gbm90IGF2YWlsYWJsZSIKKwkJZXhpdCAxCisJfQorfQogCiAkQ1RSTC5maWxlX2Vu
dHJ5IGluc2VydCAwICR0cmFjZV9maWxlCiAK
</data>        

          </attachment>
    </bug>

</bugzilla>