Bug 1939159 (CVE-2021-3477)

Summary: CVE-2021-3477 OpenEXR: Heap-buffer-overflow in Imf_2_5::DeepTiledInputFile::readPixelSampleCounts
Product: [Other] Security Response Reporter: Michael Kaplan <mkaplan>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: cbpilm, jeischma, jridky, kwizart, rdieter, rh-spice-bugs
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: OpenEXR 3.0.0-beta, OpeneXR 2.4.3 Doc Type: If docs needed, set a value
Doc Text:
There's a flaw in OpenEXR's deep tile sample size calculations. An attacker who is able to submit a crafted file to be processed by OpenEXR could trigger an integer overflow, subsequently leading to an out-of-bounds read. The greatest risk of this flaw is to application availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-02 23:21:23 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: 1939185, 1944785, 1944786, 1944787, 1944788    
Bug Blocks: 1929339, 1944836    

Description Michael Kaplan 2021-03-15 17:27:40 UTC
Heap-buffer-overflow in Imf_2_5::DeepTiledInputFile::readPixelSampleCounts

Comment 1 Michael Kaplan 2021-03-15 17:27:45 UTC
External References:

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26956

Comment 2 Michael Kaplan 2021-03-15 17:40:29 UTC
Created OpenEXR tracking bugs for this issue:

Affects: fedora-all [bug 1939185]

Comment 3 Todd Cullum 2021-03-30 16:34:20 UTC
I *believe* this is the upstream patch: https://github.com/AcademySoftwareFoundation/openexr/commit/467be80b75642efbbe6bdace558079f68c16acb1

It is not quite clear from the oss-fuzz output (I don't have access to the "detailed report."

Flaw summary:

Integer overflow in DeepTiledInputFile::initialize() of src/lib/OpenEXR/ImfDeepTiledInputFile.cpp could lead to an out-of-bounds read in DeepTiledInputFile::readPixelSampleCounts() based on the file's tileDesc.xSize and tileDesc.ySize.

Comment 6 Cary Phillips 2021-04-23 01:48:39 UTC
This is fixed in OpenEXR v2.5.4, v2.5.5, and v3.0.1 and beyond.

Comment 7 Cary Phillips 2021-05-25 21:41:23 UTC
This is also fixed in OpenEXR v2.4.3
https://github.com/AcademySoftwareFoundation/openexr/blob/master/CHANGES.md#version-243-may-17-2021