search menu icon-carat-right cmu-wordmark

CERT Coordination Center

libpng fails to limit number of rows in header

Vulnerability Note VU#643615

Original Release Date: 2010-07-02 | Last Revised: 2010-07-12

Overview

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.

Description

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).

Note that this issue affects all versions of libpng prior to 1.2.44 and libpng-1.4.3 and all libpng-1.0.X.

Impact

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.

Solution

Upgrade
The PNG Development Group has issued an upgrade to address this issue. See libpng version 1.2.44 and 1.4.3 for more information.

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.

Vendor Information

643615
 

libpng Affected

Updated:  July 01, 2010

Statement Date:   June 26, 2010

Status

Affected

Vendor Statement

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.
See http://www.libpng.org/pub/png/libpng.html

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.

Vendor Information

We are not aware of further vendor information regarding this vulnerability.


CVSS Metrics

Group Score Vector
Base
Temporal
Environmental

References

Acknowledgements

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.

Other Information

CVE IDs: CVE-2010-1205
Severity Metric: 12.96
Date Public: 2010-06-25
Date First Published: 2010-07-02
Date Last Updated: 2010-07-12 19:31 UTC
Document Revision: 19

Sponsored by CISA.