<?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>78118</bug_id>
          
          <creation_ts>2005-01-15 11:08 0000</creation_ts>
          <short_desc>x11-libs/xview CAN-2005-0076: Potentional arbitrary code execution</short_desc>
          <delta_ts>2005-06-28 02:27:50 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>
          
          <status_whiteboard>B? [noglsa] jaervosz</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jaervosz@gentoo.org</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>humpback@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-01-15 11:08:43 0000</bug_when>
            <thetext>Erik Sj</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-01-15 11:08:43 0000</bug_when>
            <thetext>Erik Sjölund discovered that programs linked against xview are
vulnerable to a number of buffer overflows in the XView library.  When
the overflow is triggered in a program which is installed setuser root
a malicious user could perhaps execute arbitrary code as privileged
user.

These commands will create a segmentation fault:

$ ln -s  /usr/X11R6/bin/xvmount  /tmp/`perl -e &apos;print &quot;A&quot; x 200&apos;`
$  /tmp/`perl -e &apos;print &quot;A&quot; x 200&apos;`  -Wt

The overflowed variable seems to be sufficiently far away from the
stack frame, but I&apos;m not totally sure that it is impossible to
overwrite it as well.  I&apos;m attaching a proposed patch.

Please let me know if you need coordination for this bug.
This package is probably part of most other distributions as well.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-01-15 11:10:31 0000</bug_when>
            <thetext>Created an attachment (id=48564)
CAN-2005-0076.patch
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2005-01-15 11:33:01 0000</bug_when>
            <thetext>My system lacks the /usr/X11R6/bin/xvmount but does have xview so I&apos;m not sure if we are effected or not. Do you have the util?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2005-01-15 11:48:27 0000</bug_when>
            <thetext>n/m found it but it fails to even compile for me in the first place so can&apos;t test.

pkg does not seem to be owned by any official herd or have a clear maintainer listed in a metadata.xml. The last ebuild seems to be initially provided by genstef. adding to CC:

genstef please test but do not put this patch into CVS until a disclosure date is reached</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>genstef@gentoo.org</who>
            <bug_when>2005-01-15 12:14:44 0000</bug_when>
            <thetext>I think we will just update the debin patch here as soon as they commit it, I suppose they also know about it?

I think I am not the best man for testing it, I do not even use xview, so i remove myself from CC:

I tagree that we should not disclose the details of this bug for now.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-01-16 11:34:00 0000</bug_when>
            <thetext>Not sure we should accept this one. If we don&apos;t have xvmount, or any other SUID root linked to xview, then we should drop this as INVALID.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-01-17 05:38:29 0000</bug_when>
            <thetext>We don&apos;t have xvmount (or I can&apos;t find it). Depending on xview we just have :
    media-sound/workman
    app-editors/jove (if USE=X)

None of this is SUID root or SUID whatever. Closing this bug as INVALID, even if it should still be fixed when the Debian patch will be updated.

Please reopen if you disagree.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lewk@gentoo.org</who>
            <bug_when>2005-02-10 08:11:38 0000</bug_when>
            <thetext>*** Bug 81505 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vorlon@gentoo.org</who>
            <bug_when>2005-02-14 01:15:16 0000</bug_when>
            <thetext>(re)opening since debian issued http://www.debian.org/security/2005/dsa-672
so a new patchset is available now

Guess we should apply that, eventhough we are not directly affected

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>humpback@gentoo.org</who>
            <bug_when>2005-02-16 15:16:53 0000</bug_when>
            <thetext>I actualy use xview all the time, i would not like to see this dead. I&apos;ve been watching the debian patch and the it seems that most of it is about Alpha compatibility, so if i&apos;m to try and solve this do you guys think we should use the debian patch or just the one here?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>humpback@gentoo.org</who>
            <bug_when>2005-02-16 15:39:09 0000</bug_when>
            <thetext>Created an attachment (id=51380)
xview-3.2-r1.ebuild.patch

Well after looking at the ebuild it seems we already use the debian patches :)
So here goes a patch to our ebuild, it simply changes the patchset. It builds
ok and works on x86.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-02-17 01:21:12 0000</bug_when>
            <thetext>Humpback: please commit your fix incvs, as it seems you&apos;re the only one to use xview anyway :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>humpback@gentoo.org</who>
            <bug_when>2005-02-17 08:36:07 0000</bug_when>
            <thetext>-r3 is in portage marked x86, there was a problem with -r2 that it would not build with recent versions of xorg.
Credits must go to seemant for finding the new home for the package.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-02-17 08:46:38 0000</bug_when>
            <thetext>alpha, hppa: please test and mark stable. Will be closed without a GLSA since we don&apos;t ship SUID xview-powered apps.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kloeri@gentoo.org</who>
            <bug_when>2005-02-19 10:28:04 0000</bug_when>
            <thetext>Alpha needs som PIC love before it can be marked stable.

Here&apos;s the part of emerge log with the errors, just in case anybody else wants to take a poke at this bug :)

a - wmgr_menu.o
a - wmgr_decor.o
make[4]: Leaving directory `/var/tmp/portage/xview-3.2-r3/work/xview-3.2p1.4-18c/lib/libxview/wmgr&apos;
rm -f libxview.so.3.2.4~
(cd ./xshared; alpha-unknown-linux-gnu-gcc -shared -Wl,-soname -Wl,`basename libxview.so.3.2.4 | sed &apos;s/\(\.[0-9]\).*$/\1/&apos;` -o
libxview.so.3.2.4~ ?*.o -L/usr/X11R6/lib   -lXext  -lX11 -lutil -L../../libolgx -lolgx -lc)
/usr/lib/gcc-lib/alpha-unknown-linux-gnu/3.3.2/../../../../alpha-unknown-linux-gnu/bin/ld: csr_change.o: gp-relative relocation
against dynamic symbol ttysw_gray17_pr
/usr/lib/gcc-lib/alpha-unknown-linux-gnu/3.3.2/../../../../alpha-unknown-linux-gnu/bin/ld: csr_change.o: gp-relative relocation
against dynamic symbol ttysw_gray17_pr
collect2: ld returned 1 exit status
make[3]: *** [libxview.so.3.2.4] Error 1
make[3]: Leaving directory `/var/tmp/portage/xview-3.2-r3/work/xview-3.2p1.4-18c/lib/libxview&apos;
make[2]: *** [all] Error 1
make[2]: Leaving directory `/var/tmp/portage/xview-3.2-r3/work/xview-3.2p1.4-18c/lib&apos;
make[1]: *** [all] Error 1
make[1]: Leaving directory `/var/tmp/portage/xview-3.2-r3/work/xview-3.2p1.4-18c&apos;
make: *** [World] Error 2
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vorlon@gentoo.org</who>
            <bug_when>2005-02-23 12:20:55 0000</bug_when>
            <thetext>any progress on alpha yet?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-03-02 07:06:40 0000</bug_when>
            <thetext>Contacted kloeri -- he will try to get this one done soon.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-03-10 02:34:45 0000</bug_when>
            <thetext>kloeri any news on this one yet?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kloeri@gentoo.org</who>
            <bug_when>2005-04-01 06:33:12 0000</bug_when>
            <thetext>Finally gave in and -alpha&apos;ed the xview ebuilds.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-04-01 07:47:21 0000</bug_when>
            <thetext>yeepee.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hansmi@gentoo.org</who>
            <bug_when>2005-06-27 14:16:06 0000</bug_when>
            <thetext>GMsoft and KillerFox haven&apos;t been able to get xview working on hppa. I propose
that we&apos;ll remove the hppa keyword from all ebuilds until it works again.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-06-28 01:08:37 0000</bug_when>
            <thetext>No problem for me.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hansmi@gentoo.org</who>
            <bug_when>2005-06-28 02:27:50 0000</bug_when>
            <thetext>Removed from hppa.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>48564</attachid>
            <date>2005-01-15 11:10 0000</date>
            <desc>CAN-2005-0076.patch</desc>
            <filename>CAN-2005-0076.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGxpYi9saWJ4dmlldy9iYXNlL3h2X3BhcnNlLmN+CTIwMDUtMDEtMTUgMTc6MTE6NTQuMDAw
MDAwMDAwICswMTAwCisrKyBsaWIvbGlieHZpZXcvYmFzZS94dl9wYXJzZS5jCTIwMDUtMDEtMTUg
MTc6MjA6MjMuMDAwMDAwMDAwICswMTAwCkBAIC0zMTIsNyArMzEyLDcgQEAgeHZfcGFyc2Vfb25l
KGFwcF9uYW1lLCBhcmdjLCBhcmd2KQogICAgIGlmIChhcmdjIDw9IHNsb3QtPm51bV9hcmdzKSB7
CiAJY2hhciAgICAgICAgICAgIGR1bW15WzEyOF07CiAKLQkodm9pZCkgc3ByaW50ZihkdW1teSwg
CisJKHZvaWQpIHNucHJpbnRmKGR1bW15LCBzaXplb2YoZHVtbXkpLAogCQkJWFZfTVNHKCIlczog
bWlzc2luZyBhcmd1bWVudCBhZnRlciAlcyIpLCAKIAkJCWFwcF9uYW1lLAogCQkgICAgICAgYXJn
dlswXSk7CkBAIC0zOTIsNyArMzkyLDcgQEAgeHZfcGFyc2Vfb25lKGFwcF9uYW1lLCBhcmdjLCBh
cmd2KQogCWlmIChkZWZhdWx0c19sb29rdXAoYXJndlsxXSwga25vd25fc2NhbGVzKSA9PSAtMSkg
ewogCQljaGFyIGR1bW15WzEwMjRdOwogCQkKLQkJKHZvaWQpIHNwcmludGYoZHVtbXksIAorCQko
dm9pZCkgc25wcmludGYoZHVtbXksIHNpemVvZihkdW1teSksCiAJCQlYVl9NU0coIiVzOiB1bmtu
b3duIHNjYWxlIFwiJXNcIiB1c2VkIHdpdGggJXMgb3B0aW9uIiksCiAJCQkgICAgICAgYXBwX25h
bWUsIGFyZ3ZbMV0sIGFyZ3ZbMF0pOwogCQl4dl9lcnJvcihYVl9OVUxMLApAQCAtNjExLDcgKzYx
MSw3IEBAIE5lZ0FyZzoKICAgICB7CiAJY2hhciAgICAgICAgICAgIGR1bW15WzEyOF07CiAKLQko
dm9pZCkgc3ByaW50ZihkdW1teSwgCisJKHZvaWQpIHNucHJpbnRmKGR1bW15LCBzaXplb2YoZHVt
bXkpLAogCQlYVl9NU0coIiVzOiBjYW4ndCBoYXZlIG5lZ2F0aXZlIGFyZ3VtZW50ICVzIGFmdGVy
ICVzIiksCiAJCSAgICAgICBhcHBfbmFtZSwgYXJndltiYWRfYXJnXSwgYXJndlswXSk7CiAJeHZf
ZXJyb3IoWFZfTlVMTCwK
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>51380</attachid>
            <date>2005-02-16 15:39 0000</date>
            <desc>xview-3.2-r1.ebuild.patch</desc>
            <filename>patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHh2aWV3LTMuMi1yMi5lYnVpbGQJMjAwNS0wMi0xNiAyMzoyNjowOC40NTgxMTIyMjQgKzAw
MDAKKysrIC91c3IvcG9ydGFnZS94MTEtbGlicy94dmlldy94dmlldy0zLjItcjEuZWJ1aWxkCTIw
MDUtMDEtMTYgMTU6NDQ6NTkuMDAwMDAwMDAwICswMDAwCkBAIC0xMyw3ICsxMyw3IEBACiAjICAq
IHh2aWV3IGlzIGEgY29udHJpYnV0aW9uIG1hZGUgdG8gU3VuIE1pY3Jvc3lzdGVtcyAoPykgdG8g
dGhlIFggY29tbXVuaXR5LCBidXQKICMgICAgZml4ZXMgZm9yIGl0IGRvbid0IGFwcGVhciB0byBi
ZSBhcm91bmQgb3RoZXIgdGhhbiBpbiB0aGUgb3RoZXIgZnJlZSBkaXN0cmlidXRpb25zLgogIyAg
KiBJdCBkb2VzIGxpdHRsZSBoYXJtLCBvbmx5IHNvbWUgZGVmYXVsdHMgYXJlIGNoYW5nZWQgd2hp
Y2ggd2UgY2FuIHJlZGVmaW5lIGFueXdheQotU1JDX1BBVENIPSIke01ZX1BOLy0vX30tMTZ3b29k
eTIuZGlmZiIKK1NSQ19QQVRDSD0iJHtNWV9QTi8tL199LTE4LmRpZmYiCiAKICMgV2UgdXNlIHRo
ZSB4dmlldyB0YXJiYWxsIGF2YWlsYWJsZSBmcm9tIHRoZSBYIG9yZ2FuaXphdGlvbiwgYnV0IHhm
cmVlODYgYXBwZWFycwogIyB0byBiZSB1cCBhbmQgYXZhaWxhYmxlIG1vcmUgb2Z0ZW4gc28gd2Ug
dXNlIHRoYXQgKGl0J3MgdGhlaXIgcHJpbWFyeSBtaXJyb3IpLgo=
</data>        

          </attachment>
    </bug>

</bugzilla>