Bug 1379587 (CVE-2016-6823) - CVE-2016-6823 ImageMagick: Integer overflow within BMP encoder/writer
Summary: CVE-2016-6823 ImageMagick: Integer overflow within BMP encoder/writer
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2016-6823
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1378790
Blocks: 1378785
TreeView+ depends on / blocked
 
Reported: 2016-09-27 07:46 UTC by Andrej Nemec
Modified: 2021-02-17 03:16 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-03 22:47:11 UTC
Embargoed:


Attachments (Terms of Use)

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:

https://github.com/ImageMagick/ImageMagick/commit/e7094d16cd8aee6bb48cf1d369f617f7edf89993
https://github.com/ImageMagick/ImageMagick/commit/4cc6ec8a4197d4c008577127736bf7985d632323

Debian bug report:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834504

References:

http://seclists.org/oss-sec/2016/q3/611

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:

https://github.com/ImageMagick/ImageMagick/commit/c1cf4802653970c050d175a6496fa1f11b7c089e

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
Statement:

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/.


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