Libpng contains a vulnerability in the way it handles images containing an extra row of image data beyond the height reported in the image header.
A vulnerability exists in the way libpng receives an extra row of image data beyond the height reported in the header of the image. According to the PNG Development Group:
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 could allow an unauthenticated, remote attacker to execute arbitrary code via a specially crafted PNG image. The attacker supplied code would be run in the context of an application using an affected version of libpng.
A workaround for vendors of products or applications using derivative versions of libpng is to check for row_num greater than or equal to the image height, at the beginning of the user-supplied row callback function.
Updated: July 01, 2010
Statement Date: June 26, 2010
This libpng bug was publicly disclosed yesterday via checkins to the Mozilla repositories
and subsequently by release of libpng-1.4.3 and 1.2.44, in which the bug is fixed.
An additional memory-leak bug with reading a malformed PNG sCAL chunk was also
disclosed and fixed.
All versions of libpng prior to 1.2.44 and libpng-1.4.3 and all libpng-1.0.X versions
are vulnerable. Libpng-1.0.X is no longer supported and will not receive
security updates, as announced in February 2010 when libpng-1.0.53 was released.
We are not aware of further vendor information regarding this vulnerability.
This issue was reported by the PNG Development Group in libpng version 1.2.44 and 1.4.3.
This document was written by Michael Orlando.
|Date First Published:||2010-07-02|
|Date Last Updated:||2010-07-12 19:31 UTC|