Bug 747311 - VUL-0: CVE-2011-3026: libpng: Heap-buffer-overflow in png_decompress_chunk
Summary: VUL-0: CVE-2011-3026: libpng: Heap-buffer-overflow in png_decompress_chunk
Status: RESOLVED FIXED
Alias: None
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P2 - High : Major
Target Milestone: ---
Deadline: 2012-02-23
Assignee: Petr Uzel
QA Contact: Security Team bot
URL:
Whiteboard: maint:released:11.4:45627 maint:relea...
Keywords: DSLA_REQUIRED, DSLA_SOLUTION_PROVIDED
Depends on:
Blocks:
 
Reported: 2012-02-16 09:35 UTC by Matthias Weckbecker
Modified: 2013-08-05 13:56 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
-- 1.9.x patch (1.03 KB, patch)
2012-02-16 09:37 UTC, Matthias Weckbecker
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Weckbecker 2012-02-16 09:35:31 UTC
A heap-based buffer overflow was found in libpng. An attacker could create a
carefully crafted PNG file in such a way that it would cause an application
linked with libpng to execute arbitrary code when the file was opened by a
victim.

Reference:
http://googlechromereleases.blogspot.in/2012/02/chrome-stable-update.html
https://code.google.com/p/chromium/issues/detail?id=112822
Comment 1 Matthias Weckbecker 2012-02-16 09:37:59 UTC
Created attachment 476447 [details]
-- 1.9.x patch
Comment 2 Swamp Workflow Management 2012-02-16 09:43:05 UTC
The SWAMPID for this issue is 45549.
This issue was rated as important.
Please submit fixed packages until 2012-02-23.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 3 Petr Gajdos 2012-02-16 11:03:46 UTC
(In reply to comment #2)
> The SWAMPID for this issue is 45549.
> This issue was rated as important.
> Please submit fixed packages until 2012-02-23.

Stuck with php. This deadline will not be met.
Comment 4 Petr Gajdos 2012-02-17 09:31:05 UTC
NEEDINFO not intended.
Comment 5 Bernhard Wiedemann 2012-02-20 11:00:20 UTC
This is an autogenerated message for OBS integration:
This bug (747311) was mentioned in
https://build.opensuse.org/request/show/105993 Factory / libpng12
https://build.opensuse.org/request/show/105994 Factory / libpng14
https://build.opensuse.org/request/show/105995 Factory / libpng15
Comment 6 Petr Gajdos 2012-02-20 11:45:04 UTC
Fixed Factory, 12.1 and 11.4/libpng12 by update.
Fixed 11.4/libpng14 by patch based on patch from upstream:
ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.9-1.5.8-diff.txt
Comment 7 Petr Gajdos 2012-02-20 11:45:33 UTC
(In reply to comment #6)
> Fixed Factory, 12.1 and 11.4/libpng12 by update.
* version update.
Comment 8 Bernhard Wiedemann 2012-02-20 12:00:10 UTC
This is an autogenerated message for OBS integration:
This bug (747311) was mentioned in
https://build.opensuse.org/request/show/106021 11.4 / libpng14
https://build.opensuse.org/request/show/106022 11.4 / libpng12
https://build.opensuse.org/request/show/106024 12.1 / libpng12
https://build.opensuse.org/request/show/106025 12.1 / libpng14
Comment 9 Petr Gajdos 2012-02-20 13:04:00 UTC
For SLESes I have used:

--- pngrutil.c.orig
+++ pngrutil.c
@@ -326,22 +326,24 @@ png_decompress_chunk(png_structp png_ptr
                 chunklength - prefix_size,
                0/*output*/, 0/*output size*/);

+      if (prefix_size >= (~(png_size_t)0) - 1 ||
+         expanded_size >= (~(png_size_t)0) - 1 - prefix_size
 #ifdef PNG_USER_CHUNK_MALLOC_MAX
       /* Now check the limits on this chunk - if the limit fails the
        * compressed data will be removed, the prefix will remain.
        */
-      if ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
+      || ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
           prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1)
-         png_warning(png_ptr, "Exceeded size limit while expanding chunk");
-      else
 #endif
+      )
+         png_warning(png_ptr, "Exceeded size limit while expanding chunk");

       /* If the size is zero either there was an error and a message
        * has already been output (warning) or the size really is zero
        * and we have nothing to do - the code will exit through the
        * error case below.
        */
-      if (expanded_size > 0)
+      else if (expanded_size > 0)
       {
          /* Success (maybe) - really uncompress the chunk. */
         png_size_t new_size = 0;
Comment 10 Petr Gajdos 2012-02-20 13:06:42 UTC
11sp1: 17821
10sp4: 17822
 9sp4: 17823
Comment 11 Petr Gajdos 2012-02-20 13:08:11 UTC
(In reply to comment #3)
> > Please submit fixed packages until 2012-02-23.
> 
> Stuck with php. This deadline will not be met.

Done unexpectedly sooner.
Comment 12 Swamp Workflow Management 2012-02-28 15:18:34 UTC
Update released for: libpng12, libpng12-0, libpng12-0-debuginfo, libpng12-0-debuginfo-32bit, libpng12-0-debuginfo-x86, libpng12-compat-devel, libpng12-debugsource, libpng12-devel
Products:
openSUSE 11.4 (debug, i586, x86_64)
Comment 13 Swamp Workflow Management 2012-02-28 15:19:08 UTC
Update released for: libpng14, libpng14-14, libpng14-14-debuginfo, libpng14-compat-devel, libpng14-debugsource, libpng14-devel
Products:
openSUSE 11.4 (debug, i586, x86_64)
Comment 14 Swamp Workflow Management 2012-02-28 16:08:39 UTC
Update released for: libpng, libpng-32bit, libpng-debuginfo, libpng-devel, libpng-devel-32bit
Products:
SLE-SERVER 10-SP3-TERADATA (x86_64)
Comment 15 Swamp Workflow Management 2012-02-28 16:09:00 UTC
Update released for: libpng, libpng-devel
Products:
SUSE-CORE 9-SP3-TERADATA (x86_64)
Comment 16 Swamp Workflow Management 2012-02-28 18:01:41 UTC
Update released for: libpng, libpng-32bit, libpng-64bit, libpng-debuginfo, libpng-devel, libpng-devel-32bit, libpng-devel-64bit, libpng-x86
Products:
SLE-DESKTOP 10-SP4 (i386, x86_64)
SLE-SERVER 10-SP4 (i386, ia64, ppc, s390x, x86_64)
Comment 17 Swamp Workflow Management 2012-02-28 18:30:03 UTC
Update released for: libpng-devel, libpng-devel-32bit, libpng12-0, libpng12-0-32bit, libpng12-0-debuginfo, libpng12-0-debuginfo-32bit, libpng12-0-debuginfo-64bit, libpng12-0-debuginfo-x86, libpng12-0-debugsource, libpng12-0-x86, libpng3
Products:
SLE-DEBUGINFO 11-SP1 (i386, ia64, ppc64, s390x, x86_64)
SLE-DESKTOP 11-SP1 (i386, x86_64)
SLE-DESKTOP 11-SP1-FOR-SP2 (i386, x86_64)
SLE-SDK 11-SP1 (i386, ia64, ppc64, s390x, x86_64)
SLE-SDK 11-SP1-FOR-SP2 (i386, ia64, ppc64, s390x, x86_64)
SLE-SERVER 11-SP1 (i386, ia64, ppc64, s390x, x86_64)
SLE-SERVER 11-SP1-FOR-SP2 (i386, ia64, ppc64, s390x, x86_64)
SLE-SERVER 11-SP1-TERADATA (x86_64)
SLES4VMWARE 11-SP1 (i386, x86_64)
Comment 18 Matthias Weckbecker 2012-02-29 14:02:44 UTC
released