Red Hat Bugzilla – Bug 1314438
CVE-2016-3177 giflib: Use-after-free in gifcolor utility
Last modified: 2016-08-30 21:26:57 EDT
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.
Name: Josselin Feist
Created giflib tracking bugs for this issue:
Affects: fedora-all [bug 1318264]
Created mingw-giflib tracking bugs for this issue:
Affects: fedora-all [bug 1318265]
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.
This issue did not affect the versions of giflib as shipped with Red Hat Enterprise Linux 5, 6, and 7.