Bug 808139 (CVE-2011-3048)

Summary: CVE-2011-3048 libpng: memory corruption flaw
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: paul, tgl
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-18 09:29:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 809595, 809596, 809597, 812712, 812713, 812714, 812715    
Bug Blocks: 808160    

Description Vincent Danen 2012-03-29 17:07:46 UTC
A flaw was found in libpng's out-of-memory handling in png_set_text2() where it failed to enlarge the info_ptr->text array and didn't restore the prior state correctly, leaving a dangling pointer.  Since this failure was not considered a hard error, if there were more text chunks in the file, control came back again, which led to to writing file-determined data through the dangling pointer.  In order for this to be exploited to be more than a simple crash of the application linked to libpng, the attack would need to be very targeted.  This flaw has been fixed in libpng 1.4.11 [1] which indicated:

Revised png_set_text_2() to avoid potential memory corruption (fixes CVE-2011-3048).

A patch is available in git [2].

[1] http://sourceforge.net/projects/libpng/files/libpng14/1.4.11/
[2] http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng/libpng;a=commitdiff;h=78322ccdeb994c311f6175fcefdb5761f85722cb#patch24

Some applications that ignore text chunks when processing PNG image files are not vulnerable to this because the vulnerable code is not called.  Firefox is one example of such an application that is not vulnerable.

Comment 1 Vincent Danen 2012-03-29 17:14:29 UTC
This is also fixed in the following libpng versions: 1.0.59, 1.2.49, 1.4.11, 1.5.10, and 1.6.0beta20

Comment 2 Vincent Danen 2012-04-03 18:09:36 UTC
Created libpng tracking bugs for this issue

Affects: fedora-all [bug 809597]

Comment 3 Vincent Danen 2012-04-03 18:09:39 UTC
Created libpng10 tracking bugs for this issue

Affects: epel-6 [bug 809595]
Affects: fedora-all [bug 809596]

Comment 4 Fedora Update System 2012-04-08 03:28:28 UTC
libpng10-1.0.59-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2012-04-08 03:34:11 UTC
libpng10-1.0.59-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2012-04-12 02:25:09 UTC
libpng-1.5.10-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2012-04-12 03:10:40 UTC
libpng10-1.0.59-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2012-04-14 17:59:44 UTC
libpng10-1.0.59-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2012-04-24 14:56:06 UTC
libpng-1.2.49-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2012-04-24 14:59:26 UTC
libpng-1.2.49-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 errata-xmlrpc 2012-04-25 12:46:25 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5
  Red Hat Enterprise Linux 6

Via RHSA-2012:0523 https://rhn.redhat.com/errata/RHSA-2012-0523.html