oCERT Advisories

#2008-003 libpng zero-length chunks incorrect handling

Description:

Applications using libpng that install unknown chunk handlers, or copy unknown chunks, may be vulnerable to a security issue which may result in incorrect output, information leaks, crashes, or arbitrary code execution.

The issue involves libpng incorrectly handling zero length chunks which results in uninitialized memory affecting the control flow of the application.

Affected version:

The libpng project indicates libpng-1.0.6 through 1.0.32, libpng-1.2.0 through 1.2.26, and libpng-1.4.0beta01 through libpng-1.4.0beta19 built with PNG_READ_UNKNOWN_CHUNKS_SUPPORTED or PNG_READ_USER_CHUNKS_SUPPORTED (default configuration) are affected.

Fixed version:

libpng version 1.2.27 and 1.0.33 are in beta and will be released on or about April 26, 2008 according to libpng maintainer

libpng-1.2.27beta01

Credit: Tavis Ormandy, oCERT Team | Google Security Team

CVE: CVE-2008-1382

Timeline:

2008-04-05: contacted libpng maintainers
2008-04-05: vendor confirms
2008-04-05: verification of vendor suggested patch
2008-04-12: libpng-1.2.27beta01 released
2008-04-12: libpng project advisory released
2008-04-12: advisory release

References:
http://libpng.sourceforge.net/Advisory-1.2.26.txt

Permalink:
http://www.ocert.org/advisories/ocert-2008-003.html

© oCERT.org - Some rights reserved.