<?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>178004</bug_id>
          
          <creation_ts>2007-05-11 07:59 0000</creation_ts>
          <short_desc>media-libs/libpng null pointer dereference in png_handle_tRNS (CVE-2007-2445)</short_desc>
          <delta_ts>2007-06-24 23:27:38 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <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>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <status_whiteboard>A3 [glsa]</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jaervosz@gentoo.org</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>neeo@xl.wp.pl</cc>

      

      
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2007-05-11 07:59:30 0000</bug_when>
            <thetext>It seems that a grayscale image with a malformed (bad CRC) tRNS chunk
will crash libpng and mozilla.  In my experience it also brought down
my Windows display manager.

The reason is that png_ptr-&gt;num_trans is set to 1 and then there is
an error return after checking the CRC, so the trans[] array is never
allocated.  Since png_ptr-&gt;num_trans is nonzero, libpng tries to use
the array later.  Here is the fix, thanks to Mats Palmgren:

At line 1316 of pngrutil.c, change

   if (png_crc_finish(png_ptr, 0))
      return;

to

   if (png_crc_finish(png_ptr, 0))
   {
      png_ptr-&gt;num_trans = 0;
      return;
   }

Libpng-1.2.17rc1 does not contain this fix.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2007-05-11 08:01:44 0000</bug_when>
            <thetext>This will go public once libpng-1.2.17 is released.

Vapier please attach an updated ebuild if you want pretesting.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>falco@gentoo.org</who>
            <bug_when>2007-05-16 09:49:21 0000</bug_when>
            <thetext>public on http://www.libpng.org/pub/png/libpng.html</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>falco@gentoo.org</who>
            <bug_when>2007-05-16 09:49:42 0000</bug_when>
            <thetext>*** Bug 178729 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>armin76@gentoo.org</who>
            <bug_when>2007-05-16 09:59:55 0000</bug_when>
            <thetext>According to the webpage:  1.2.17 is broken, 1.2.18 should be used</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-05-18 19:49:05 0000</bug_when>
            <thetext>1.2.18 is in portage</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2007-05-19 06:53:06 0000</bug_when>
            <thetext>Arhces please test and mark stable. Target keywords are:

libpng-1.2.18.ebuild:KEYWORDS=&quot;alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>roeland@rullzer.com</who>
            <bug_when>2007-05-19 07:36:25 0000</bug_when>
            <thetext>AMD64:

Compiles clean.
Passes tests
No Collision

Exporting png files in the gimp still works. Displaying png files also works. So we&apos;re good to go.

Portage 2.1.2.7 (default-linux/amd64/2007.0/no-multilib, gcc-4.1.1, glibc-2.5-r2, 2.6.21-gentoo x86_64)
=================================================================
System uname: 2.6.21-gentoo x86_64 AMD Turion(tm) 64 Mobile Technology MT-28
Gentoo Base System release 1.12.9
Timestamp of tree: Sat, 19 May 2007 01:50:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-java/java-config: 1.3.7, 2.0.31-r5
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS=&quot;amd64&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot;-march=athlon64 -msse3 -O2 -pipe&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c&quot;
CXXFLAGS=&quot;-march=athlon64 -msse3 -O2 -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;collision-protect distcc distlocks metadata-transfer multilib-strict sandbox sfperms strict test userpriv&quot;
GENTOO_MIRRORS=&quot;http://gentoo.nedlinux.nl ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/&quot;
LINGUAS=&quot;en nl&quot;
MAKEOPTS=&quot;-j4&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/portage-overlay&quot;
SYNC=&quot;rsync://godfather/gentoo-portage&quot;
USE=&quot;X alsa amd64 apache2 bash-completion bitmap-fonts bzip2 cli cracklib crypt cvs dri dvd dvdr exif flac gdbm gif graphviz gstreamer highlight history iconv imagemagick ipod isdnlog jpeg jpeg2k kde latex libg++ logrotate md5sum midi mmx mp3 mplayer music ncurses nls nomotif nptl nptlonly nsplugin ogg opengl oss pcre pdf perl png pppd python qt readline reflection samba session spl sse sse2 ssl tcpd test tetex tiff truetype truetype-fonts type1-fonts unicode vorbis xine xml xml2 xorg xv xvid zlib&quot; ALSA_CARDS=&quot;intel8x0&quot; ALSA_PCM_PLUGINS=&quot;adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol&quot; ELIBC=&quot;glibc&quot; INPUT_DEVICES=&quot;keyboard mouse synaptics&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; LINGUAS=&quot;en nl&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;sis&quot;
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>corsair@gentoo.org</who>
            <bug_when>2007-05-19 08:58:51 0000</bug_when>
            <thetext>ppc64 stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>armin76@gentoo.org</who>
            <bug_when>2007-05-19 11:13:46 0000</bug_when>
            <thetext>alpha/ia64/x86 stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jer@gentoo.org</who>
            <bug_when>2007-05-19 16:15:49 0000</bug_when>
            <thetext>Stable for HPPA.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fauli@gentoo.org</who>
            <bug_when>2007-05-19 22:21:24 0000</bug_when>
            <thetext>amd64 stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gustavoz@gentoo.org</who>
            <bug_when>2007-05-21 13:02:05 0000</bug_when>
            <thetext>sparc stable.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dertobi123@gentoo.org</who>
            <bug_when>2007-05-21 19:59:01 0000</bug_when>
            <thetext>ppc stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kumba@gentoo.org</who>
            <bug_when>2007-05-27 00:29:44 0000</bug_when>
            <thetext>mips stable.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>falco@gentoo.org</who>
            <bug_when>2007-05-27 13:49:21 0000</bug_when>
            <thetext>please vote first.

And i vote yes for a GLSA, because libpng is widely used and we already used to send GLSAs for a libpng DoS.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2007-05-27 14:35:57 0000</bug_when>
            <thetext>Only B3+4 and A4 rated issues get a vote according to policy.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>falco@gentoo.org</who>
            <bug_when>2007-05-27 15:19:11 0000</bug_when>
            <thetext>ok (it&apos;s A3)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>falco@gentoo.org</who>
            <bug_when>2007-06-01 07:13:38 0000</bug_when>
            <thetext>200705-24, thanks everybody</thetext>
          </long_desc>
      
    </bug>

</bugzilla>