Bug 1312337 (CVE-2016-9082) - CVE-2016-9082 cairo: Out of bounds read in read_png/write_png in cairo-png.c
Summary: CVE-2016-9082 cairo: Out of bounds read in read_png/write_png in cairo-png.c
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2016-9082
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
: 1382656 1382658 1382659 1382662 (view as bug list)
Depends On: 1384554 1384555 1384556
Blocks: 1312341 1382656 1382664
TreeView+ depends on / blocked
 
Reported: 2016-02-26 13:10 UTC by Adam Mariš
Modified: 2021-02-17 04:16 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-19 19:58:58 UTC
Embargoed:


Attachments (Terms of Use)
Backtrace report (1.35 KB, text/plain)
2016-02-26 13:14 UTC, Adam Mariš
no flags Details

Description Adam Mariš 2016-02-26 13:10:34 UTC
It was found that specially crafted SVG file can trigger crash in png_write_row when converting the given SVG using librsvg2 and cairo. Crash happens inside libpng when trying to access invalid pointer.

Acknowledgements:

Name: Gustavo Grieco

Comment 1 Adam Mariš 2016-02-26 13:14:49 UTC
Created attachment 1130832 [details]
Backtrace report

Comment 3 Adam Mariš 2016-10-13 10:17:21 UTC
*** Bug 1382656 has been marked as a duplicate of this bug. ***

Comment 4 Adam Mariš 2016-10-13 10:38:05 UTC
CVE request:

http://seclists.org/oss-sec/2016/q4/44

Upstream bug:

https://bugs.freedesktop.org/show_bug.cgi?id=98165

Comment 5 Adam Mariš 2016-10-13 14:21:05 UTC
Created cairo tracking bugs for this issue:

Affects: fedora-all [bug 1384554]

Comment 6 Adam Mariš 2016-10-13 14:21:17 UTC
Created mingw-cairo tracking bugs for this issue:

Affects: fedora-all [bug 1384555]
Affects: epel-7 [bug 1384556]

Comment 7 Stefan Cornelius 2016-10-19 19:54:29 UTC
The upstream bug mentions a separate issue that may cause out-of-bounds writes. While this looks correct initially, I don't think that this is feasible:
The memory is allocated using _cairo_malloc_ab(), which has a built-in overflow check. As far as I can tell, this will catch the problem before we can reach the problematic code.

This leaves only the out-of-bounds read, which, all things considered, isn't really that dangerous.

Comment 8 Paul Howarth 2016-10-21 10:17:11 UTC
*** Bug 1382658 has been marked as a duplicate of this bug. ***

Comment 9 Paul Howarth 2016-10-21 10:18:31 UTC
*** Bug 1382659 has been marked as a duplicate of this bug. ***

Comment 10 Paul Howarth 2016-10-21 10:20:10 UTC
*** Bug 1382662 has been marked as a duplicate of this bug. ***

Comment 11 Adam Mariš 2016-10-27 11:26:23 UTC
Proposed patch:

https://bugs.freedesktop.org/attachment.cgi?id=127421


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