Bug 1973689 (CVE-2021-3610)

Summary: CVE-2021-3610 ImageMagick: heap-based buffer overflow in ReadTIFFImage() in coders/tiff.c
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: fedora, jhorak, mike, pahan
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ImageMagick 7.0.11-14 Doc Type: If docs needed, set a value
Doc Text:
A heap-based buffer overflow vulnerability was found in ImageMagick in ReadTIFFImage() in coders/tiff.c. This issue is due to an incorrect setting of the pixel array size, which can lead to a crash and segmentation fault.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-21 22:40:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1973691, 1973692    
Bug Blocks: 1967292, 1973694    

Description Guilherme de Almeida Suckevicz 2021-06-18 13:45:08 UTC
A heap-based buffer overflow vulnerability was found in ImageMagick in ReadTIFFImage() in coders/tiff.c because of an incorrect setting of the pixel array size which can lead to crash and segmentation fault. This flaw affects ImageMagick versions prior to 7.1.0-0 and 7.0.11-14.

Reference and upstream patch:
https://github.com/ImageMagick/ImageMagick/commit/930ff0d1a9bc42925a7856e9ea53f5fc9f318bf3

Comment 1 Guilherme de Almeida Suckevicz 2021-06-18 13:45:51 UTC
Created ImageMagick tracking bugs for this issue:

Affects: epel-8 [bug 1973691]
Affects: fedora-all [bug 1973692]

Comment 2 Todd Cullum 2021-06-21 21:40:41 UTC
Flaw summary:

ImageMagick's ReadTIFFImage() function in coders/tiff.c assigned a size (`extent`) used to allocate memory via AcquireQuantumMemory()[1]. `extent` was calculated improperly and was too small, which could lead to an out-of-bounds read subsequently such as when converting an image. The upstream patch calculates `extent` to be a larger value in order to avoid this.

1. https://imagemagick.org/api/MagickCore/memory_8c.html#a417a408aa35c9f385d31d2e40eed4b27

Comment 3 Product Security DevOps Team 2021-06-21 22:40:25 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-3610