Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 611664 - x11-libs/gdk-pixbuf: (CVE-2017-6313) Integer underflow in io-icns.c
Summary: x11-libs/gdk-pixbuf: (CVE-2017-6313) Integer underflow in io-icns.c
Status: RESOLVED DUPLICATE of bug 611390
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
Depends on:
Reported: 2017-03-04 01:35 UTC by Ian Zimmerman
Modified: 2017-03-04 10:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
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
Comment 2 Agostino Sarubbo gentoo-dev 2017-03-04 10:59:41 UTC

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