Bug 1177327 (CVE-2015-0973) - CVE-2015-0973 libpng: Heap-buffer overflow png_combine_row() with very wide interlaced images
Summary: CVE-2015-0973 libpng: Heap-buffer overflow png_combine_row() with very wide i...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2015-0973
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
: CVE-2014-9495 (view as bug list)
Depends On:
Blocks: 1176755 1179187
TreeView+ depends on / blocked
 
Reported: 2014-12-26 06:53 UTC by Huzaifa S. Sidhpurwala
Modified: 2019-09-29 13:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-26 07:05:56 UTC


Attachments (Terms of Use)

Description Huzaifa S. Sidhpurwala 2014-12-26 06:53:47 UTC
A heap-based overflow was found in the png_combine_row() function of the libpng library, when very large interlaced images were used. This flaw was fixed in libpng-1.5.21 and 1.6.16.

Upstream patch:

http://sourceforge.net/p/libpng/code/ci/dc294204b641373bc6eb603075a8b98f51a75dd8/

External Reference:

http://seclists.org/oss-sec/2014/q4/1133

Comment 1 Huzaifa S. Sidhpurwala 2014-12-26 07:04:24 UTC
When a very large interlaced PNG image in created, such that its width or height exceeds the maximum value allowed for png_uint_32 data type (which is same as uint_32), it results in an integer overflow followed by a heap-based buffer overflow in the png_combine_row() function.

The version of libpng as shipped with Red Hat Enterprise Linux, however imposes a limit on the maximum width and height of PNG image, which can be processed by the library.

In Red Hat Enterprise Linux 5 and 6 via pngconf.h:

#  define PNG_USER_WIDTH_MAX 1000000L
#  define PNG_USER_HEIGHT_MAX 1000000L

In Red Hat Enterprise Linux 7 via pngusr.dfa as:

"option SAFE_LIMITS on" 

which in turn leads to:

#ifdef PNG_SAFE_LIMITS_SUPPORTED
   /* 'safe' limits */
#  ifndef PNG_USER_WIDTH_MAX
#     define PNG_USER_WIDTH_MAX 1000000
#  endif
#  ifndef PNG_USER_HEIGHT_MAX
#     define PNG_USER_HEIGHT_MAX 1000000
#  endif
#  ifndef PNG_USER_CHUNK_CACHE_MAX
#     define PNG_USER_CHUNK_CACHE_MAX 128
#  endif
#  ifndef PNG_USER_CHUNK_MALLOC_MAX
#     define PNG_USER_CHUNK_MALLOC_MAX 8000000
#  endif

in pngpriv.h

Comment 2 Huzaifa S. Sidhpurwala 2014-12-26 07:05:10 UTC
Statement:

Not vulnerable. This issue does not affect the version of libpng as shipped with Red Hat Enterprise Linux 5, 6 and 7. For a more detailed explanation please refer to: https://bugzilla.redhat.com/show_bug.cgi?id=1177327#c1

Comment 3 Huzaifa S. Sidhpurwala 2014-12-26 07:05:56 UTC
This issue does not affect the version of libpng as shipped with Fedora 20 and 21.

Comment 4 Huzaifa S. Sidhpurwala 2015-01-07 04:40:27 UTC
*** Bug 1179186 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2015-03-09 08:19:21 UTC
libpng10-1.0.63-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2015-03-09 08:28:27 UTC
libpng10-1.0.63-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-03-09 08:37:23 UTC
libpng10-1.0.63-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2015-03-15 00:59:37 UTC
libpng10-1.0.63-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.


Note You need to log in before you can comment on or make changes to this bug.