<?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>66400</bug_id>
          
          <creation_ts>2004-10-05 03:17 0000</creation_ts>
          <short_desc>sys-apps/ed-0.2-r3: mktemp vulnerability</short_desc>
          <delta_ts>2007-01-23 13:53:22 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Security</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <status_whiteboard>A3 [glsa] koon</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>73858</dependson>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ulm@gentoo.org</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>falco@gentoo.org</cc>
    
    <cc>marc.vila@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>ulm@gentoo.org</who>
            <bug_when>2004-10-05 03:17:57 0000</bug_when>
            <thetext>ed-0.2 use &quot;mktemp&quot; to create temporary files.
This problem is known since almost four years, see for example:
http://www.linuxsecurity.com/advisories/redhat_advisory-967.html

| The ed executable creates files in /tmp with predictable
| names. By using various symlink attacks, it is possible to
| have ed write to files it should not, change the permissions 
| of various files, etc.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ulm@gentoo.org</who>
            <bug_when>2004-10-05 03:19:16 0000</bug_when>
            <thetext>Created an attachment (id=41133)
ed-0.2-mkstemp.patch

Patch from LFS.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>marc.vila@gmail.com</who>
            <bug_when>2004-10-05 03:34:09 0000</bug_when>
            <thetext>seems like we install ed by default in gentoo, so this should be fixed.
also we don</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>marc.vila@gmail.com</who>
            <bug_when>2004-10-05 03:34:09 0000</bug_when>
            <thetext>seems like we install ed by default in gentoo, so this should be fixed.
also we don´t apply any kind of patch to fix this in our ed-0.2-r3</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ulm@gentoo.org</who>
            <bug_when>2004-10-05 04:26:17 0000</bug_when>
            <thetext>Sorry, should of course have been ed-0.2-r3 in the subject.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2004-10-05 04:43:28 0000</bug_when>
            <thetext>Base-system, please comment and/or apply patch.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2004-10-05 06:00:04 0000</bug_when>
            <thetext>0.2-r4 is in portage, lets make it stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2004-10-05 06:14:57 0000</bug_when>
            <thetext>Arches, please test and mark sys-apps/ed-0.2-r4 stable :
Current KEYWORDS=&quot;~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86&quot;
Target KEYWORDS=&quot;x86 ppc sparc mips alpha arm hppa amd64 ia64 ppc64 s390&quot;
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kloeri@gentoo.org</who>
            <bug_when>2004-10-05 07:45:48 0000</bug_when>
            <thetext>Stable on alpha.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tester@gentoo.org</who>
            <bug_when>2004-10-05 10:43:22 0000</bug_when>
            <thetext>Stable on x86</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gustavoz@gentoo.org</who>
            <bug_when>2004-10-05 15:02:20 0000</bug_when>
            <thetext>sparc tasty.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2004-10-05 15:46:05 0000</bug_when>
            <thetext>arm/hppa/ia64/s390 have been loved</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sejo@gentoo.org</who>
            <bug_when>2004-10-06 01:16:02 0000</bug_when>
            <thetext>stable on ppc</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eradicator@gentoo.org</who>
            <bug_when>2004-10-07 14:45:25 0000</bug_when>
            <thetext>stable amd64</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2004-10-07 18:45:07 0000</bug_when>
            <thetext>mips stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2004-10-09 11:20:18 0000</bug_when>
            <thetext>GLSA 200410-07
ppc64 : don&apos;t forget to mark stable to benefit from GLSA</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tgall@gentoo.org</who>
            <bug_when>2004-10-09 20:07:02 0000</bug_when>
            <thetext>stable on ppc64, thanks!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>robbat2@gentoo.org</who>
            <bug_when>2004-12-21 17:20:03 0000</bug_when>
            <thetext>security: please see bug #73858. This security fix of yours has broken ed.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2004-12-22 04:23:00 0000</bug_when>
            <thetext>Well, it&apos;s not &quot;our fix&quot;. vapier applied a patch (originally from LFS) on behalf of the base-system herd. But we can try to help in determining a more appropriate patch.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>falco@gentoo.org</who>
            <bug_when>2007-01-23 13:53:22 0000</bug_when>
            <thetext>*** Bug 163220 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>41133</attachid>
            <date>2004-10-05 03:19 0000</date>
            <desc>ed-0.2-mkstemp.patch</desc>
            <filename>ed-0.2-mkstemp.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">U3VibWl0dGVkIEJ5OiBMRlMgQm9vayA8bGZzLWJvb2tAbGludXhmcm9tc2NyYXRjaC5vcmc+CkRh
dGU6IDIwMDMtMTAtMDUKSW5pdGlhbCBQYWNrYWdlIFZlcnNpb246IDAuMgpPcmlnaW46IFNsYWNr
d2FyZSBTb3VyY2UKRGVzY3JpcHRpb246IFVzZSBta3N0ZW1wIGluc3RlYWQgb2YgbWt0ZW1wLgpk
aWZmIC1OYXVyIGVkLTAuMi9idWYuYyBlZC0wLjItMi9idWYuYwotLS0gZWQtMC4yL2J1Zi5jCVNh
dCBOb3YgMTkgMDQ6Mzc6NTkgMTk5NAorKysgZWQtMC4yLTIvYnVmLmMJVHVlIE1heSAyOCAxODoz
ODoyMyAyMDAyCkBAIC0yMDAsMTMgKzIwMCwxMyBAQAogaW50CiBvcGVuX3NidWYgKCkKIHsKLSAg
Y2hhciAqbWt0ZW1wICgpOwotICBpbnQgdTsKKyAgaW50IHUsIHNmZDsKIAogICBpc2JpbmFyeSA9
IG5ld2xpbmVfYWRkZWQgPSAwOwogICB1ID0gdW1hc2soMDc3KTsKICAgc3RyY3B5IChzZm4sICIv
dG1wL2VkLlhYWFhYWCIpOwotICBpZiAobWt0ZW1wIChzZm4pID09IE5VTEwgfHwgKHNmcCA9IGZv
cGVuIChzZm4sICJ3KyIpKSA9PSBOVUxMKQorICBzZmQgPSBta3N0ZW1wKHNmbik7CisgICAgaWYg
KChzZmQgPT0gLTEpIHx8IChzZnAgPSBmb3BlbiAoc2ZuLCAidysiKSkgPT0gTlVMTCkKICAgICB7
CiAgICAgICBmcHJpbnRmIChzdGRlcnIsICIlczogJXNcbiIsIHNmbiwgc3RyZXJyb3IgKGVycm5v
KSk7CiAgICAgICBzcHJpbnRmIChlcnJtc2csICJDYW5ub3Qgb3BlbiB0ZW1wIGZpbGUiKTsK
</data>        

          </attachment>
    </bug>

</bugzilla>