"From: Glenn Randers-Pehrson <glennrp> A security bug has been reported to mozilla. 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->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. 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->num_trans = 0; return; } Libpng-1.2.17rc1 does not contain this fix." Allocated CVE-2007-2445 This issue is not currently public
The bug report seems slightly in error: as best I can tell, the failure can only occur with palette-color PNGs, not grayscale ones. (There is a suitable image attached to bug #239542.) Also, note that merely reading a corrupted file will not induce a crash; the application must ask libpng to perform an image transformation that requires use of the transparency information. I have not been able to crash pngtopnm for instance. However, opening a corrupted file in Firefox crashes.
now public, removing embargo
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2007-0356.html