[cairo-bugs] [Bug 104325] New: cairo 1.14.12 hangs in read_png called from cairo_image_surface_create_from_png_stream on malformed png

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Dec 18 19:23:01 UTC 2017


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

            Bug ID: 104325
           Summary: cairo 1.14.12 hangs in read_png called from
                    cairo_image_surface_create_from_png_stream on
                    malformed png
           Product: cairo
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: critical
          Priority: medium
         Component: png functions
          Assignee: cworth at cworth.org
          Reporter: orivej at gmx.fr
        QA Contact: cairo-bugs at cairographics.org

This is a regression since cairo 1.14.10 revealed by cairocffi tests.

With a PNG file truncated to 30 bytes [1], cairo 1.4.12 hangs on CPU in
read_png(), infinitely calling png_get_IHDR() and never reaching this line:
https://cgit.freedesktop.org/cairo/tree/src/cairo-png.c?h=1.14&id=d53db01d01a48c48a1633a8d531f979a99d316bd#n591

The bug was introduced in
https://cgit.freedesktop.org/cairo/commit/?h=1.14&id=d53db01d01a48c48a1633a8d531f979a99d316bd

To reproduce, run cairocffi tests against cairo on Linux.

Discovered at
https://github.com/NixOS/nixpkgs/commit/fc5756ea5e4a73624e0cfbb0e3eef247fc312547

[1]
https://github.com/Kozea/cairocffi/blob/9cba2e6039869db6710a5fb6a1af0f139509fc00/cairocffi/test_cairo.py#L253

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo-bugs/attachments/20171218/6059123b/attachment.html>


More information about the cairo-bugs mailing list