<?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>61749</bug_id>
          
          <creation_ts>2004-08-26 01:38 0000</creation_ts>
          <short_desc>sys-libs/zlib-1.2.*: denial of service vulnerability</short_desc>
          <delta_ts>2004-11-02 13:24:13 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>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://www.openpkg.org/security/OpenPKG-SA-2004.038-zlib.html</bug_file_loc>
          <status_whiteboard>A3 [glsa] jaervosz</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>vorlon@gentoo.org</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>base-system@gentoo.org</cc>
    
    <cc>ben@easynews.com</cc>

      

      
          <long_desc isprivate="0">
            <who>vorlon@gentoo.org</who>
            <bug_when>2004-08-26 01:38:01 0000</bug_when>
            <thetext>Debian Bug that triggered the following advisory: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=252253

-----------

Package:             zlib
Vulnerability:       denial of service
OpenPKG Specific:    no

Affected Releases:   Affected Packages:           Corrected Packages:
OpenPKG CURRENT      &lt;= zlib-1.2.1-20040207       &gt;= zlib-1.2.1-20040825
                     &lt;= ghostscript-8.14-20040816 &gt;= ghostscript-8.14-20040825
                     &lt;= openpkg-20040811-20040811 &gt;= openpkg-20040825-20040825
OpenPKG 2.1          &lt;= zlib-1.2.1-2.1.0          &gt;= zlib-1.2.1-2.1.1
                     &lt;= ghostscript-8.14-2.1.1    &gt;= ghostscript-8.14-2.1.2
                     &lt;= openpkg-2.1.1-2.1.1       &gt;= openpkg-2.1.2-2.1.2
OpenPKG 2.0          &lt;= zlib-1.2.1-2.0.0          &gt;= zlib-1.2.1-2.0.1
                     &lt;= ghostscript-8.13-2.0.3    &gt;= ghostscript-8.13-2.0.4
                     &lt;= openpkg-2.0.3-2.0.3       &gt;= openpkg-2.0.4-2.0.4

Dependent Packages:  
[...]

Description:
  Triggered by a Debian bug report [1], a denial of service vulnerability
  was found in the ZLib compression library [0] versions 1.2.x
  (older versions are not affected). The problem arises from incorrect
  error handling in the inflate() and inflateBack() functions. The
  Common Vulnerabilities and Exposures (CVE) project assigned the id
  CAN-2004-0797 [2] to the problem.

  Please check whether you are affected by running &quot;&lt;prefix&gt;/bin/openpkg
  rpm -q zlib&quot;. If you have the &quot;zlib&quot; package installed and its version
  is affected (see above), we recommend that you immediately upgrade it
  (see Solution) and its dependent packages (see above) as well [3][4].

[...]</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vorlon@gentoo.org</who>
            <bug_when>2004-08-26 01:54:18 0000</bug_when>
            <thetext>Created an attachment (id=38229)
Patch used by OpenPKG

Attachment contains the patch against zlib-1.2.1 used by OpenPKG (patching
infback.c and inflate.c)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2004-08-26 02:45:46 0000</bug_when>
            <thetext>base-system please verify and provide an updated ebuild if needed.


Debian seems to be fixing it:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=252253</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2004-08-26 08:01:05 0000</bug_when>
            <thetext>I can&apos;t verify the vuln is real without a test case which means I can&apos;t verify the patch does what it&apos;s supposed to.
Sorry the only thing I can verify is that it patches clean, rebuilds and a few things that link to zlib still work.

I&apos;ve put zlib-1.2.1-r3 in the tree however with the OpenPKG patch named as zlib-1.2.1-CAN-2004-0797.patch
KEYWORDS=&quot;~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~ppc64 ~s390&quot;
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2004-08-26 08:31:37 0000</bug_when>
            <thetext>Note: A revdep-rebuild probably should be done for any package that linked with the libzlib.a or uses zlib in a static environment.

To get an idea try doing.
/usr/bin/revdep-rebuild -X zlib -pv</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2004-08-26 10:41:07 0000</bug_when>
            <thetext>marked stable for arm/hppa/amd64/ia64</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2004-08-26 11:30:33 0000</bug_when>
            <thetext>Arches please mark zlib-1.2.1-r3 stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gustavoz@gentoo.org</who>
            <bug_when>2004-08-26 11:47:43 0000</bug_when>
            <thetext>sparc stable.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>avenj@gentoo.org</who>
            <bug_when>2004-08-26 16:31:49 0000</bug_when>
            <thetext>Stable on x86</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2004-08-26 19:03:45 0000</bug_when>
            <thetext>ppc/alpha is now stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2004-08-26 19:22:04 0000</bug_when>
            <thetext>mips stable too now too</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tgall@gentoo.org</who>
            <bug_when>2004-08-26 20:10:59 0000</bug_when>
            <thetext>stable on ppc64 </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2004-08-26 21:33:51 0000</bug_when>
            <thetext>This is ready for GLSA. Security please draft and condordes double check.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2004-08-26 22:22:34 0000</bug_when>
            <thetext>GLSA drafted. Security please review.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vorlon@gentoo.org</who>
            <bug_when>2004-08-27 00:45:33 0000</bug_when>
            <thetext>Debian seems to patch those two files in the same way. Although the upload is not in their pool yet, it can be found at http://incoming.debian.org/ (http://incoming.debian.org/zlib_1.2.1.1-7.diff.gz).
The new Changelog for zlib there says:

+zlib (1:1.2.1.1-6) testing; urgency=high
+
+  * Fix the error handling in the new inflate implementation to avoid
+    incorrectly continuing to process in the error state.  Thanks to Johan
+    Thelmén &lt;johan.thelmen@cygate.se&gt; for his help in finding and fixing this
+    bug.  This is CAN-2004-0797 (closes: #252253).
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vorlon@gentoo.org</who>
            <bug_when>2004-08-27 00:45:33 0000</bug_when>
            <thetext>Debian seems to patch those two files in the same way. Although the upload is not in their pool yet, it can be found at http://incoming.debian.org/ (http://incoming.debian.org/zlib_1.2.1.1-7.diff.gz).
The new Changelog for zlib there says:

+zlib (1:1.2.1.1-6) testing; urgency=high
+
+  * Fix the error handling in the new inflate implementation to avoid
+    incorrectly continuing to process in the error state.  Thanks to Johan
+    ThelmÃ©n &lt;johan.thelmen@cygate.se&gt; for his help in finding and fixing this
+    bug.  This is CAN-2004-0797 (closes: #252253).
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2004-08-27 12:04:12 0000</bug_when>
            <thetext>GLSA 200406-26</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>moixa@gmx.ch</who>
            <bug_when>2004-08-28 01:12:29 0000</bug_when>
            <thetext>The ebuild definetely should warn about static linked binaries and provide instructions on how to rebuild them!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2004-09-22 20:53:13 0000</bug_when>
            <thetext>s390 stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2004-11-02 13:24:13 0000</bug_when>
            <thetext>*** Bug 69877 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>38229</attachid>
            <date>2004-08-26 01:54 0000</date>
            <desc>Patch used by OpenPKG</desc>
            <filename>zlib.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">U2VjdXJpdHkgQnVnZml4ZXMgKENBTi0yMDA0LTA3OTcsIE9wZW5QS0ctU0EtMjAwNC4wMzgtemxp
Yik6CgpJbmRleDogaW5mYmFjay5jCi0tLSBpbmZiYWNrLmMub3JpZwkyMDAzLTA4LTEyIDAxOjQ4
OjA2ICswMjAwCisrKyBpbmZiYWNrLmMJMjAwNC0wOC0yNSAxMjozNzowNyArMDIwMApAQCAtNDM0
LDYgKzQzNCw5IEBACiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgfQogCisgICAgICAg
ICAgICBpZiAoc3RhdGUtPm1vZGUgPT0gQkFEKQorICAgICAgICAgICAgICAgIGJyZWFrOworCiAg
ICAgICAgICAgICAvKiBidWlsZCBjb2RlIHRhYmxlcyAqLwogICAgICAgICAgICAgc3RhdGUtPm5l
eHQgPSBzdGF0ZS0+Y29kZXM7CiAgICAgICAgICAgICBzdGF0ZS0+bGVuY29kZSA9IChjb2RlIGNv
bnN0IEZBUiAqKShzdGF0ZS0+bmV4dCk7CkluZGV4OiBpbmZsYXRlLmMKLS0tIGluZmxhdGUuYy5v
cmlnCTIwMDMtMTAtMjYgMDc6MTU6MzYgKzAxMDAKKysrIGluZmxhdGUuYwkyMDA0LTA4LTI1IDEy
OjM3OjA3ICswMjAwCkBAIC04NjEsNiArODYxLDkgQEAKICAgICAgICAgICAgICAgICB9CiAgICAg
ICAgICAgICB9CiAKKyAgICAgICAgICAgIGlmIChzdGF0ZS0+bW9kZSA9PSBCQUQpCisgICAgICAg
ICAgICAgICAgYnJlYWs7CisKICAgICAgICAgICAgIC8qIGJ1aWxkIGNvZGUgdGFibGVzICovCiAg
ICAgICAgICAgICBzdGF0ZS0+bmV4dCA9IHN0YXRlLT5jb2RlczsKICAgICAgICAgICAgIHN0YXRl
LT5sZW5jb2RlID0gKGNvZGUgY29uc3QgRkFSICopKHN0YXRlLT5uZXh0KTsK
</data>        

          </attachment>
    </bug>

</bugzilla>