Bug 1790059 (CVE-2019-5064) - CVE-2019-5064 opencv: Heap buffer overflow in persistence_json.cpp while parsing crafted JSON file
Summary: CVE-2019-5064 opencv: Heap buffer overflow in persistence_json.cpp while pars...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2019-5064
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: 1790060
Blocks: 1790061
TreeView+ depends on / blocked
 
Reported: 2020-01-11 15:05 UTC by Pedro Sampaio
Modified: 2021-02-16 20:46 UTC (History)
12 users (show)

Fixed In Version: opencv 4.2.0
Doc Type: If docs needed, set a value
Doc Text:
A heap buffer overflow vulnerability was found in the data structure persistence functionality of OpenCV. Specifically, a specially crafted JSON file could cause a buffer overflow, resulting in multiple heap corruptions and potential code execution. A remote attacker could exploit this flaw by providing a specially crafted JSON file to trigger this vulnerability.
Clone Of:
Environment:
Last Closed: 2020-04-20 16:31:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Pedro Sampaio 2020-01-11 15:05:56 UTC
An exploitable heap buffer overflow vulnerability exists in the data structure persistence functionality of OpenCV, version 4.1.0. A specially crafted JSON file can cause a buffer overflow, resulting in multiple heap corruptions and potentially code execution. An attacker can provide a specially crafted file to trigger this vulnerability.

References:

https://talosintelligence.com/vulnerability_reports/TALOS-2019-0853

Comment 1 Pedro Sampaio 2020-01-11 15:06:16 UTC
Created opencv tracking bugs for this issue:

Affects: fedora-all [bug 1790060]

Comment 2 Mauro Matteo Cascella 2020-04-20 10:14:58 UTC
External References:

https://talosintelligence.com/vulnerability_reports/TALOS-2019-0853

Comment 3 Mauro Matteo Cascella 2020-04-20 13:08:40 UTC
Mitigation:

Avoid loading OpenCV data structures from external untrusted JSON files.

Comment 5 Mauro Matteo Cascella 2020-04-20 13:27:49 UTC
Statement:

This flaw did not affect the versions of OpenCV as shipped with Red Hat Enterprise Linux 6, 7, and 8, as they did not include the vulnerable code, which was introduced in a later version of the library.

Comment 6 Mauro Matteo Cascella 2020-04-20 13:54:46 UTC
Upstream fix:
https://github.com/opencv/opencv/commit/f42d5399aac80d371b17d689851406669c9b9111

Comment 7 Product Security DevOps Team 2020-04-20 16:31:51 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-2019-5064


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