Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 611664

Summary: x11-libs/gdk-pixbuf: (CVE-2017-6313) Integer underflow in io-icns.c
Product: Gentoo Security Reporter: Ian Zimmerman <nobrowser>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugzilla.gnome.org/show_bug.cgi?id=779016
Whiteboard:
Package list:
Runtime testing required: ---

Description Ian Zimmerman 2017-03-04 01:35:04 UTC
According to the upstream tracker (see ${URL}):

In the load_resources function (io-icns.c:63), inside the size switch (line 101), all the cases set plen or mlen to: blocklen - sizeof (IcnsBlockHeader);
See lines 109, 117, 127, 134, 139, 146, 151, 158 and 163.
blocklen is set in line 95:

blocklen = GUINT32_FROM_BE (header->size);

There are no checks on the size of blocklen and if it is set to less than sizeof (IcnsBlockHeader) (should be 8) there is an integer underflow.

This is dangerous because it's value is later passed to gdk_pixbuf_loader_write (line 262) when size is 256. This allows an attacker to craft a file that will end up calling to a desired loader with a bogus size that is much larger than the actual buffer size.


Reproducible: Always
Comment 1 Harri Nieminen (Moiman) 2017-03-04 05:46:05 UTC
Duplicates of https://bugs.gentoo.org/show_bug.cgi?id=611390
Comment 2 Agostino Sarubbo gentoo-dev 2017-03-04 10:59:41 UTC

*** This bug has been marked as a duplicate of bug 611390 ***