libpng PNG tRNS Chunk Processing Error Lets Remote Users Deny Service
SecurityTracker Alert ID: 1018078|
SecurityTracker URL: http://securitytracker.com/id/1018078
(Links to External Site)
Date: May 17 2007
Denial of service via network|
Fix Available: Yes Vendor Confirmed: Yes |
Version(s): 0.90 through 1.2.16|
A vulnerability was reported in libpng. A remote user can cause denial of service conditions.|
A remote user can create a PNG image with a specially crafted tRNS chunk that, when loaded by the target user, will cause the target application to crash.
The vendor indicates that it is not known whether arbitrary code execution is possible or not.
The vulnerability resides in 'pngrutil.c'.
A remote user can create a PNG image that, when loaded by the target user, will cause the target application to crash.|
The vendor has issued fixed versions (1.0.25 and 1.2.17). A patch is also available in the vendor's advisory.|
The libpng advisory is available at:
Vendor URL: downloads.sourceforge.net/libpng/libpng-1.2.18-ADVISORY.txt (Links to External Site)
Access control error|
Linux (Any), UNIX (Any)|
This archive entry has one or more follow-up message(s) listed below.|
Source Message Contents
Date: Thu, 17 May 2007 07:48:01 -0400|
Libpng Security Advisory
15 May 2007
A grayscale PNG image with a malformed (bad CRC) tRNS chunk
will crash some libpng applications.
This vulnerability could be used to crash a browser when a
user tries to view such a malformed PNG file. It is not known
whether the vulnerability could be exploited otherwise.
The reason is that png_ptr->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->num_trans is nonzero, libpng tries to use
the array later.
This bug was first introduced in libpng version 0.90, in 1996. All
versions from libpng-0.90 through libpng-1.2.16 are vulnerable.
Here is the fix, thanks to Mats Palmgren:
--- pngrutil.c_1.2.16 2007-05-11 23:11:55.395466000 -0500
+++ pngrutil.c 2007-05-14 04:37:32.101297000 -0500
@@ -1314,7 +1314,10 @@
if (png_crc_finish(png_ptr, 0))
+ png_ptr->num_trans = 0;
png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans,
This patch can be applied to any vulnerable version of libpng.
Libpng version 1.0.25 and 1.2.17, which are being released concurrently
with this advisory, have been patched.
This vulnerability has been assigned the identifiers
CVE-2007-2445 and CERT VU#684664.
PNG Development Group