Hide Forgot
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.
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
Created libpng tracking bugs for this issue Affects: fedora-all [bug 809597]
Created libpng10 tracking bugs for this issue Affects: epel-6 [bug 809595] Affects: fedora-all [bug 809596]
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.
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.
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.
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.
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.
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.
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.
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