Bug 1379587 (CVE-2016-6823)

Summary: CVE-2016-6823 ImageMagick: Integer overflow within BMP encoder/writer
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abhgupta, dmcphers, ethan, jhorak, jialiu, jokerman, kseifried, lmeyer, mmccomas, nmurray, pahan, slawomir, tiwillia
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-03 22:47:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1378790    
Bug Blocks: 1378785    

Description Andrej Nemec 2016-09-27 07:46:36 UTC
A vulnerability was found in ImageMagick. Converting a maliciously crafted image (e.g. PNM) into BMP format can trigger an integer overflow within the BMP coder, possibly leading to a heap-based buffer overflow.

Upstream fix:


Debian bug report:




Comment 1 Andrej Nemec 2016-09-27 07:51:54 UTC
Created ImageMagick tracking bugs for this issue:

Affects: fedora-all [bug 1378790]

Comment 2 Stefan Cornelius 2016-09-27 12:12:55 UTC
The POC actually causes an endless loop. We're probably missing some EOF checks in loops. Upstream seems to have tackled the loop problem in:


Additionally, the patch for the integer overflow does not really work for me. The compiler optimizes the check into nothing. Even if that's changed, it still does not seem to work properly.

Comment 3 Stefan Cornelius 2018-04-03 22:47:26 UTC

Red Hat Product Security has rated this issue as having Moderate security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.