ports/148214: graphics/png image decode buffer overrun

dirk.meyer at dinoex.sub.org dirk.meyer at dinoex.sub.org
Mon Jun 28 16:50:01 UTC 2010


>Number:         148214
>Category:       ports
>Synopsis:       graphics/png image decode buffer overrun
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 28 16:50:00 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Dirk Meyer
>Release:        FreeBSD 8.1-PRERELEASE
>Organization:
privat
>Environment:

>Description:

Several versions of libpng through 1.4.2 (and through 1.2.43 in the older
series) contain a bug whereby progressive applications such as web browsers
(or the rpng2 demo app included in libpng) could receive an extra row of
image data beyond the height reported in the header, potentially leading
to an out-of-bounds write to memory (depending on how the application is
written) and the possibility of execution of an attacker's code with the
privileges of the libpng user (including remote compromise in the case of
a libpng-based browser visiting a hostile web site). This vulnerability
has been assigned ID CVE-2010-1205 (via Mozilla).

An additional memory-leak bug, involving images with malformed sCAL chunks,
is also present; it could lead to an application crash (denial of service)
when viewing such images.

http://www.libpng.org/pub/png/libpng.html
CVE-2010-1205

>How-To-Repeat:

	Update needs appoval from portmrg@

>Fix:

	The API changes in 1.4.3. seems backward compatible.
	Old xv and gqview binaries tested sucessful with new shared lib.

	The dither function have been enabled in the port 1.4.1_1,
	because a few ports still uses this API.
	In 1.4.3. the API is back with new name.
	Old knews binary tested sucessful with new shared lib.

	Impact: Packages should eb rebuild to record the new dependency.

	Please have an exp run to see if there is any breakage.

	Please approve the patch below.

diff -ur --exclude=CVS --exclude=Makefile.local -N ./Makefile /usr/ports/current/png/Makefile
--- ./Makefile	2010-06-28 18:22:36.000000000 +0200
+++ /usr/ports/current/png/Makefile	2010-06-28 18:27:08.000000000 +0200
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	png
-PORTVERSION=	1.4.1
-PORTREVISION=	1
+PORTVERSION=	1.4.3
 CATEGORIES=	graphics
 MASTER_SITES=	SF/lib${PORTNAME}/01-lib${PORTNAME}-master/${PORTVERSION}
 DISTNAME=	lib${PORTNAME}-${PORTVERSION}
@@ -16,8 +15,6 @@
 MAINTAINER=	dinoex at FreeBSD.org
 COMMENT=	Library for manipulating PNG images
 
-FORBIDDEN=	vulnerable to remote buffer overflow
-
 MAKEFILE=	${WRKSRC}/scripts/makefile.freebsd
 ALL_TARGET=	all libpng-config test
 MAKE_FLAGS=	ccopts="${CFLAGS}" ldopts="${LDFLAGS}" -f
diff -ur --exclude=CVS --exclude=Makefile.local -N ./distinfo /usr/ports/current/png/distinfo
--- ./distinfo	2010-06-05 09:56:47.000000000 +0200
+++ /usr/ports/current/png/distinfo	2010-06-28 15:34:17.000000000 +0200
@@ -1,6 +1,6 @@
-MD5 (libpng-1.4.1.tar.xz) = d4cb0236cce9ce8ff49a22994a01f9e0
-SHA256 (libpng-1.4.1.tar.xz) = 87b97d19f5460c1e31c22df8896ce98fab1532d57a0ae66b58226f08e4475e71
-SIZE (libpng-1.4.1.tar.xz) = 523000
-MD5 (libpng-1.4.1-apng.patch) = f7cfe836d963564bb658eeec610d6086
-SHA256 (libpng-1.4.1-apng.patch) = 59d7feed7fd87a77cbd395f63b37759007e8c7cc21a21e8c14e0811a6aa9ed91
-SIZE (libpng-1.4.1-apng.patch) = 54364
+MD5 (libpng-1.4.3.tar.xz) = 322e2e0c0dea7a374ce6e60d9a72e604
+SHA256 (libpng-1.4.3.tar.xz) = 3728f11d9b0b9943d855f558f3ee2334af50cc9197a9218825787a303b5037d3
+SIZE (libpng-1.4.3.tar.xz) = 539048
+MD5 (libpng-1.4.3-apng.patch) = c37a273158cabcd0495d44c9d1a5cedf
+SHA256 (libpng-1.4.3-apng.patch) = 7b94cb5089244d8d7be686a9f9a901dda11a65c8b05f48c33d790f843ac96e99
+SIZE (libpng-1.4.3-apng.patch) = 54364
diff -ur --exclude=CVS --exclude=Makefile.local -N ./files/patch-libpng.pc.in /usr/ports/current/png/files/patch-libpng.pc.in
--- ./files/patch-libpng.pc.in	2010-03-28 08:59:46.000000000 +0200
+++ /usr/ports/current/png/files/patch-libpng.pc.in	2010-06-28 15:35:20.000000000 +0200
@@ -12,7 +12,7 @@
  
  Name: libpng
  Description: Loads and saves PNG files
- Version: 1.4.1
+ Version: 1.4.3
 -Libs: -L${libdir} -lpng14
 +Libs: -L${libdir} -lpng -lz -lm
  Cflags: -I${includedir}
diff -ur --exclude=CVS --exclude=Makefile.local -N ./files/patch-pngconf.h /usr/ports/current/png/files/patch-pngconf.h
--- ./files/patch-pngconf.h	2010-03-28 19:32:30.000000000 +0200
+++ /usr/ports/current/png/files/patch-pngconf.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
---- pngconf.h.orig	2010-02-25 12:38:29.000000000 +0100
-+++ pngconf.h	2010-03-28 19:35:29.000000000 +0200
-@@ -499,7 +499,7 @@
- #  ifndef PNG_NO_READ_INVERT
- #    define PNG_READ_INVERT_SUPPORTED
- #  endif
--#if 0 /* removed from libpng-1.4.0 */
-+#if 1 /* removed from libpng-1.4.0 */
- #  ifndef PNG_NO_READ_DITHER
- #    define PNG_READ_DITHER_SUPPORTED
- #  endif

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list