Bug 1314438 - (CVE-2016-3177) CVE-2016-3177 giflib: Use-after-free in gifcolor utility
CVE-2016-3177 giflib: Use-after-free in gifcolor utility
Status: CLOSED UPSTREAM
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20160315,reported=2...
: Security
Depends On: 1318264 1318265
Blocks: 1314440
  Show dependency treegraph
 
Reported: 2016-03-03 10:37 EST by Adam Mariš
Modified: 2016-08-30 21:26 EDT (History)
21 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-30 21:26:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2016-03-03 10:37:11 EST
Multiple use-after-free vulnerabilities in gifcolor.c were found in 5.1.2. Two possible consecutive calls to EGifCloseFile with the same first parameter (GifFile) could lead to two calls to free(GifFile) / free(Private->HashTable) / free(Private). In particular, the second call of free(GifFile) appears in egif_lib.c, where there is no check to know if 'ErrorCode!=NULL' for this free. Since Private is freed with the first call to EGifCloseFile, and used during the second call, resulting into use-after-free.
Comment 1 Adam Mariš 2016-03-03 10:37:23 EST
Acknowledgments:

Name: Josselin Feist
Comment 2 Adam Mariš 2016-03-16 07:44:51 EDT
Upstream bug:

https://sourceforge.net/p/giflib/bugs/83/
Comment 3 Adam Mariš 2016-03-16 07:46:33 EDT
Created giflib tracking bugs for this issue:

Affects: fedora-all [bug 1318264]
Comment 4 Adam Mariš 2016-03-16 07:46:41 EDT
Created mingw-giflib tracking bugs for this issue:

Affects: fedora-all [bug 1318265]
Comment 5 Adam Mariš 2016-03-16 12:01:42 EDT
CVE request:

http://seclists.org/oss-sec/2016/q1/657
Comment 6 Andrej Nemec 2016-03-17 06:12:54 EDT
CVE assignment:

http://seclists.org/oss-sec/2016/q1/663
Comment 8 Stefan Cornelius 2016-04-21 04:55:46 EDT
I believe that was introduced via https://sourceforge.net/p/giflib/code/ci/116179a7d4681dda9afcdd43b5fbfb391b44918b/

RHEL code base does not include this patch and should not be vulnerable.

Statement:

This issue did not affect the versions of giflib as shipped with Red Hat Enterprise Linux 5, 6, and 7.

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